Thursday, April 21, 2011

Hyper-V: The operation cannot be performed while the object is in its current state.

This message appears when you try to delete Virtual Machine from Hyper-V Manager:

The operation cannot be performed while the object is in its current state.

If you go manually to delete the folder where is VM located you will get an error message that you don't have permissions to do that. Into this folder there is config XML file:



Solution for this issue is to find the same XML file in :

C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

and to delete it.
Note: First you should enable: Show hidden files, folders and drives in Folder Option. 




After that when you open Hyper-V Manager you will see that the machine is gone.

6 comments:

  1. Yes, but it only removes the VM entry from Hyper V Manager and not the Actual Virtual Machine

    ReplyDelete
  2. Unlike the anonymous user above, this worked perfectly if you pay attention. Thanks for the help.

    ReplyDelete
  3. Wow, who's the idiot? I had a VM I needed to delete but it was in a stuck state where I couldn't do anything (start it, delete it, edit any aspect). This did the trick.

    ReplyDelete
  4. I was successful in deleting the VMs the regular way after just killing and restarting the Service "Hyper-V Virtual Machine Management" (vmms).

    ReplyDelete
  5. Thanks, deleting the file started the restoring of the VM after which it started.

    ReplyDelete