Tuesday, September 25, 2012

Hyper V 2012: Can’t delete Virtual Machine

Issue: Try to import new CRM2011 machine to Hyper V, some problem occur. But the VM can't be deleted.

There are many reasons why your VM is no longer needed such as you’ve moved to another farm or you simply don’t need the virtual machine. 

Delete Fails in MMC & Hyper-V-VMMS Source Errors in Event Viewer

You’ve noticed a “straggler” left behind in your SCVMM console and you attempt to delete it and VMM says no thank you.  You can’t repair (which you expected since the files are gone, etc.) nor can you force it to delete. But error message appear.

View the Event Viewer (Custom Views –> Roles –> Hyper-V.)  You immediately notice a lot of errors similar to the following for the VM you are attempting to delete
Clean Up
To resolve this problem, do the following:
  1. Connect to your Hyper-V Server
  2. Open Windows Explorer
  3. Open the path %systemroot%\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines (NOTE:  This is a hidden folder and requires Operating System files to be displayed)
  4. You will notice a set of XML documents, one for each Virtual Machine on this host.  locate the one with the same matching GUID from your event viewer message as outlined below -


  5. Right-click on the XML file with the same GUID, and select delete
  6. Close Windows Explorer
  7. Open Hyper-V MMC console
  8. Notice that the virtual machine is gone…

Cleaning up Virtual Machine Manager

VMM will almost instantly determine that this virtual machine is now missing and you can do the famous delete and it will succeed.
Simply right-click and select delete. Finish. 

0 comments:

Post a Comment