locked
Hyper-V Delete Save State

    Question

  •  Hopefully someone can make sense of the following:

    Of five virtual machines created so far, two have ended up in the Saved state for no discernable reason - no deliberate attempt was made to take a snapshot for example. In the first instance, the VM entered the Save state just after it was created; and in the second, after the VM was shut down following a Windows install. In both cases errors as follows were reported in the Event Log:

    “Cannot access the data folder of the virtual machine. “

    And

    “The Virtual Machines configuration …etc. at 'D:\Hyper-V\VMS\...etc.' is no longer accessible: The requested operation cannot be performed on a file with a user-mapped section open. (0x800704C8)”

    Also: In the VM settings there is an error: BIOS Load failed: the WMI object contained an invalid value in property BIOSNumLock (also AutomaticStartupAction, AutomaticShutdownAction).

    Selecting the “Delete Saved State” option caused the Hyper-V Manager to pause and then display a red icon. Any attempt to start or delete the VM eventually returned an error saying the mmc had failed. On a final attempt to delete the saved state the whole system appeared to hang and clicking anywhere on the Task Bar returned this message: “Microsoft Windows: The application is not responding. The program may respond again if you wait. Do you want to end this process?” No indication of the particular process was given. Clicking the End Process button did nothing and the system continued to hang with the hourglass cursor. The only way out of this was to reboot the system after which the failing VMs disappeared from Hyper-V Manager, and this error appeared in the Event Log:

    Cannot load a virtual machine configuration because it is corrupt … Delete the virtual machine configuration file (.XML file) amd [sic] recreate the virtual machine.

    To provide some background, all virtual machine data is stored in: D:\Hyper-V, with virtual hard drives held under D:\Hyper-V\VHD, and virtual machines under D:\Hyper-V\VMS.

    Advanced permissions of all of the above folders are returned as:

    Administrators                     Full control              D:\
    SYSTEM                                   Full Control             D:\
    Authenticated Users            Modify                     D:\
    Users                                      Read & execute      D:\

    Advanced permissions of the subfolders under D:\Hyper-V\VHD are:

    Virtual Machines                 Special                    <not inherited>
    Administrators                     Full control              D:\
    SYSTEM                                   Full Control             D:\
    Authenticated Users            Modify                     D:\
    Users                                      Read & execute      D:\

    And advanced permissions for the subfolders under D:\Hyper-V\VMS are:

    Administrators                     Special                    <not inherited>
    CREATOR OWNER                  Special                    <not inherited>
    Virtual Machines                 Special                    <not inherited>
    Administrators                     Full control              D:\
    SYSTEM                                   Full Control             D:\
    Authenticated Users            Modify                     D:\
    Users                                      Read & execute      D:\

    Oddly, one VM is exceptional to the above (but it did not enter the Save state); it has only these entries:

    Administrators                     Full control               D:\
    SYSTEM                                   Full Control              D:\
    Authenticated Users            Modify                      D:\
    Users                                       Read & execute       D:\

    Until now, Windows 2008 and Hyper-V looked very impressive but confidence is beginning to ebb after the above experience. Frankly I am astonished Task Manager would not load, nor the system respond to Ctrl+Alt+Delete after the Hyper-V Manager got into its error state, forcing a manual reboot.

    I have not yet attempted to recover the VMs as per the instruction given in the error message being more concerned to discover why the problem occurred in the first place. Any advice that you can give will be gratefully received as always. However, I have just noticed this link regarding Anti-Virus software which could in some part be responsible, but I will submit this report anyway: http://support.microsoft.com/kb/961804.

    Thanks

     

     

     

     

     

     

     

    Saturday, March 13, 2010 4:05 PM

Answers

  • To Aaron & Vincent:

    It would appear the root of the problem is in the last line of the .XML files of the two failing VMs, which each contain a superfluous less than (>) character at the end of the line, that is: </configuration>>. After replacing (>>) with (>), both VMs are now working!

    In my view this is caused by a bug in Win2008 or Hyper-V.

    It is still puzzling why the permissions settings on the folders of the five VMs created, so far, are not consistent; but they are all now working at last, regardless.

     

     

     

    Thank you both for your help with this.
    Tuesday, March 16, 2010 3:32 PM

All replies

  • Open up the folder for the VM that contains the config file for the virtual machine (it will be like: 21EC2020-3AEA-1069-A2DD-08002B30309D.xml). Note the file name (which is the GUID of the virtual machine.)

    Assuming your virtual machine's name is ExampleVM, open an administrator command prompt and go to D:\HyperV\VMs and run this command:

    icacls ".\ExampleVM" /T /grant "NT VIRTUAL MACHINES\YOURGUIDHERE":F /I

    For example using my made up GUID:

    icacls ".\ExampleVM" /T /grant "NT VIRTUAL MACHINES\21EC2020-3AEA-1069-A2DD-08002B30309D":F /I''

    Additionally, shut down your antivirus program to ensure that it is not attempting to scan the files in that folder.

    Then, attempt to start the virtual machine in question.

    Let me know how this goes,

    Aaron
    Saturday, March 13, 2010 6:17 PM
  • Hi,

     

    Have you installed any other applications on the Hyper-V host machine? Did you have antivirus software installed?

     

    The issue you encountered is very strange. Base on my research, the issue may related to the pRAM. If possible, please reinstall the system, try to create a VM after the operating system finish. If the issue continues, the issue may cause by the hardware.

     

    The WMI object contained an invalid value in property BIOSNumLock

    http://blog.quirkshop.co.uk/2010/03/11/the-wmi-object-contained-an-invalid-value-in-property-biosnumlock/

     

    Important Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

     

     

    Best Regards,

    Vincent Hu

     

    Monday, March 15, 2010 6:38 AM
    Moderator
  • Hi Aaron

    Thank you for your reply; there appeared to be a couple of typos in your command, so I assumed in my case it should read as follows:

    icacls ".\VM01" /T /grant "NT VIRTUAL MACHINE\623A89DE-C872-4809-9E3A-33CA58256630":F /L

    Unfortunately this does not cure the problem, as the Event Log still records an error after the service is restarted:

    Cannot load a virtual machine configuration because it is corrupt. (Virtual machine ID 623A89DE-C872-4809-9E3A-33CA58256630) Delete the virtual machine configuration file (.XML file) amd recreate the virtual machine.

    It is not clear what is meant in practical terms by “… recreate the virtual machine” because deleting the .XML file still leaves the VM partially created: does it make any sense to you?

    Thanks

    Monday, March 15, 2010 5:34 PM
  • Hi Vincent: Thank you for your reply.

    The only applications explicitly installed on the new Windows 2008 R2 Server is anti virus AVG Server Edition 9.0 and the Hyper-V Role. A complete list of the installed programs and updates is as follows

    AVG 9.0
    Broadcom Drivers and Management Applications
    Maxtrox graphic Software (remove only)
    Microsoft Visual C++ 20005 Redistributable
    Visual C++ 8.0 Runtime Setup Package (x64)

    KB977894, KB979306, KB978262, KB978251, KB978207, KB977074, KB976662, KB975560, KB975467, KB974571, KB974431, KB972270, KB971468, KB974455

    The following exclusions have been applied in AVG,

    C:\Users\Public\Documents\Hyper-V\Virtual hard disks\
    C:\ProgramData\Microsoft\Windows\Hyper-V\
    D:\Hyper-V\VHD\
    D:\Hyper-V\VMS\

    C:\Windows\System32\vmms.exe
    C:\Windows\System32\vmwp.exe

    Regarding the quickshop link you quoted, I do not understand what is meant by “pRAM”; do you have any information on this? Note: the Num Lock option is not accessible in the BIOS settings if there is a fault in the VM.

    As the Windows 2008 R2 Server is brand new and came pre-installed from Dell, I cannot believe it is necessary to re-install the system; I would rather return it!

    Regards

    Monday, March 15, 2010 5:36 PM
  • To Aaron & Vincent:

    It would appear the root of the problem is in the last line of the .XML files of the two failing VMs, which each contain a superfluous less than (>) character at the end of the line, that is: </configuration>>. After replacing (>>) with (>), both VMs are now working!

    In my view this is caused by a bug in Win2008 or Hyper-V.

    It is still puzzling why the permissions settings on the folders of the five VMs created, so far, are not consistent; but they are all now working at last, regardless.

     

     

     

    Thank you both for your help with this.
    Tuesday, March 16, 2010 3:32 PM
  • Hi spmikec:

    I am experiencing the same issue. Where are the .xml files located (pardon the newbie type question)

    • Proposed as answer by ScottNeptune Thursday, May 13, 2010 1:57 AM
    Wednesday, March 24, 2010 8:25 AM
  • I also am having a similar issue where the VMs will be in Saved-Critical...   It happened after I shutdown and removed an External USB drive in which I had exported and then reimported the VMs.   I had rebooted my 2nd server in my cluster and now all the VMs hosted by my VM are in a "saved-critical".    I had changed the "snapshot" location from the External drive To my Cluster volume just before I had restarted(the 2nd server).    The VMs show the snapshot location as being the cluster drive but I look and don't find the snapshot or xml file that it needs.  For some reason those are still on my Ext USB drive but since the VMs are in a saved-critical status it dosn't let me change that setting...  soooooo  very frusterating..  I had to rebuild my VM'ed FileServer due to a similer issue were it just disapeared.   Does anyone have a recomended backup solution for VMs?   please respond to scottneptune@gmail.com
    Thursday, May 13, 2010 2:04 AM
  • I also just had this issue.  Did you find any reason why the extra (>) was in there?  Did it happen again to you?  I had 2 VM's running on a 2008 R2 Host w/ Hyper-V role installed.  When I tried to delete the snapshot on 1 it had the same issue as you.  I left it in that state, created a export of the 2nd one and then tried to delete the snapshot for it.  It had the same issue.  After deleting the (>) in each of the xml files and restarted the services they came up fine.  I was then able to delete the snapshots normally.
    Thursday, May 27, 2010 4:27 PM