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

Comments

  • Anonymous
    February 16, 2010
    The comment has been removed

  • Anonymous
    December 13, 2010
    Be sure to add antivirus scanning exclusions for .vhd & .xml. AV can snag an XML being created, thus your entire VM vanishes.

  • Anonymous
    September 26, 2011
    Thank you for this, I was about to have a heart-attack.