Virtual Machine "Disappears" from Hyper-V Manager or changes to a VM cannot be applied

Recently I saw some strange errors:

- A complete VM was not listed in Hyper-V Manager anymore.

-or-

Making changes to a VM and clicking Apply caused error messages like: The requested operation cannot be performed on a file with a user-mapped section open. (0x800704C8)

When opening the machine configuration XML File in Notepad, I noticed that the file was not ended properly. The correct last line would be:

/configuration>

Instead, there where characters following like /configuration> > or, parts of the configuration where repeated and a 2nd /configuration> existed in the File.

So it appears that the Configuration file was shortened due to the changes, but the EOF was not properly set.

The resolution to this problem was to disable the Virusscanner on the XML File. We could recover the .XML file by deleting the extra information
It's a general recommendation anyway to exclude Hyper-V Processes (VMMS.EXE, VMWP.EXE) and VM Files (*.VHD, *.AVHD, *-XML ) from scanning. You should instead use an AV Scanner inside the VMs.

Cheers
Robert