none
Can't delete a virtual machine RRS feed

  • Question

  •  Hi,

    THis is the first time I've come across this error and am not sure what to do, when I right click a virtual machine in hyper-v manager and click delete it says... "An error occurred while attempting to delete the selected virtual machine(s).  You might not have permission to perform this task." 

    I know I have permission because I can delete others ( I am domain/enterprise admin)

    Is there a "backdoor" way to delete it, or what can I do?

    Thanks
    Tuesday, July 1, 2008 3:03 PM

Answers

  • Make sure the machine is shutdown and all the snapshots for it are gone. I ran into this problem with a couple machines I was trying to get rid of when using the beta version of Hyper-V.

    Other than that, make sure the VMMS Service is running (It is, since you can see the machine to right click on it) as well as the Image Management Service. Either one of those not working right can cause interaction problems

    Are you remotely managing the Hyper-V console?
    Physically in front of it?
    RDP'ing into it using the Microsoft client?
    RDP'ing into it using another type of client?
    Can another user with admin privs delete the machine?






    Tuesday, July 1, 2008 8:05 PM
  • What else is in your env.? Are you using SCVMM with Hyper-V and a self-service portal? I think the persmissions error you get shown with the SSP is a little different but...

    Can the machine removed if you log in as the the machines Local Admin account? (assuming it's not a DC)
    Can the VHD file be interacted with? Can you copy it? If you can, try and delete the original file once you have a copy of it.
    Are there any file system warnings logged when you try and delete it through the Hyper-V UI? Event ID 55s/53s maybe?

    Thursday, July 3, 2008 4:31 PM

All replies

  • Make sure the machine is shutdown and all the snapshots for it are gone. I ran into this problem with a couple machines I was trying to get rid of when using the beta version of Hyper-V.

    Other than that, make sure the VMMS Service is running (It is, since you can see the machine to right click on it) as well as the Image Management Service. Either one of those not working right can cause interaction problems

    Are you remotely managing the Hyper-V console?
    Physically in front of it?
    RDP'ing into it using the Microsoft client?
    RDP'ing into it using another type of client?
    Can another user with admin privs delete the machine?






    Tuesday, July 1, 2008 8:05 PM
  • All services are running, I am running the console locally on the machine via Microsoft RDP, and another user can not delete it either.

    Thanks!
    Wednesday, July 2, 2008 12:19 PM
  • What else is in your env.? Are you using SCVMM with Hyper-V and a self-service portal? I think the persmissions error you get shown with the SSP is a little different but...

    Can the machine removed if you log in as the the machines Local Admin account? (assuming it's not a DC)
    Can the VHD file be interacted with? Can you copy it? If you can, try and delete the original file once you have a copy of it.
    Are there any file system warnings logged when you try and delete it through the Hyper-V UI? Event ID 55s/53s maybe?

    Thursday, July 3, 2008 4:31 PM
  • Delete xml file on C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

    It often happens with SAN, when disk dissapears (moved to another server).....

    --
    Muson
    • Proposed as answer by Prem Kiran Saturday, January 23, 2016 7:48 AM
    Thursday, September 3, 2009 9:01 AM
  • Is there a cluster involved here? Are you using Cluster Shared volumes?
    If you are using VMM, try delete it from VMM and not from Hyper-V to ensure its not the VMM agent locking the VM files.
    Have you made any changes to AZMAN roles ?
    • Proposed as answer by Dill Wednesday, February 15, 2012 7:57 AM
    Thursday, September 3, 2009 2:09 PM
  • Delete xml file on C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines
    This works. After deleting xml file you need to restart the Hyper-V Manager.

     

    Thank you Muson

    :) 



    Sunday, December 18, 2011 7:35 PM
  • Thanks, this worked for me also

     . . . Dill


    Dave . . . . .

    Wednesday, February 15, 2012 7:57 AM
  • Dill,

    I am having the same problem, so which solution actually worked for you?

    Thanks


    Mohsen Almassud

    Sunday, August 26, 2012 12:27 PM
  • Sorry for the delat

    Look at

    Muson

    Delete xml file on C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

    It often happens with SAN, when disk dissapears (moved to another server).....

    --
    Muson

    worked fine


    Thanks Dill . . . . .

    Tuesday, December 4, 2012 11:46 AM
  • Hi, I have a similar issue, I cannot rebuild a VM deleted from Hyper-V, using VMM it says that the server still exists. ive checked Hyper v host, there are not vhd's etc., no .xml with that server name, but somewhere there seems to be a record of the old vm name that i used. using a different name for the new vm is not an option. Any feedback would be appreciated.

    Hanneliese Fourie

    Friday, December 7, 2012 11:26 AM
  • Delete xml file on C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines
    This works. After deleting xml file you need to restart the Hyper-V Manager.

     

    Thank you Muson

    :) 




    This worked perfectly for me. Didn't even had to restart the Hyper-V Manager. Thanks!
    Thursday, March 12, 2015 7:38 AM
  • Worked perfectly, thanks 

    ElliTech

    Tuesday, July 2, 2019 8:28 PM
  • Control Panel\All Control Panel Items\Programs and Features

    Turn Windows features on or off

    Uncheck the box next to "Hyper-V"

    Restart the PC

    Delete all the files from "C:\Users\Public\Documents\Hyper-V\Virtual hard disks"

    • Proposed as answer by okkeh27 Thursday, October 10, 2019 8:38 AM
    Thursday, October 10, 2019 8:38 AM