none
Deleted VM, but HD space still taken up by .vhdx file, and is undeletable.

    Question

  • I was messing around with VM's for the first time today, just to run an instance of Ubuntu within Windows, however, when I went to delete the VM, it was deleted, but I found that the virtual hard drive was still in existence, and is taking up 10 gigabytes.  While I have plenty of Hard Drive space, this bothers me to no end, how do I get rid of it?  It tells me the file can't be deleted because it is open in system.  What do I do?
    Wednesday, November 13, 2013 5:23 AM

Answers

  • Hyper V manager will hold onto Virtual Hard drives after the machine is deleted if it has Snapshots, it will merge in the background and once this is done you will be able to delete. Rebooting does not help because the merge will pause during the reboot and restart with the host, although you didn't need the Virtual hard drive you would have eventually been able to remove. I think if you used powershell to view the VM status you would have seen a true status of merging.
    Wednesday, November 13, 2013 12:59 PM

All replies

  • I know this is not a best solution, but restart server and try to delete again :)

    Yusuf.


    PowerShell MVP http://www.yusufozturk.info

    Wednesday, November 13, 2013 5:34 AM
  • No luck there.
    Wednesday, November 13, 2013 5:55 AM
  • Thanks to those who replied, I resolved this myself by booting windows in safe mode and deleting the files.  Seems a bit awkward though to do every time.  Maybe there's an easier way I'm missing.
    • Edited by Brimst0ne Wednesday, November 13, 2013 6:27 AM Spelling Mistakes Galore :V
    Wednesday, November 13, 2013 6:26 AM
  • Hyper V manager will hold onto Virtual Hard drives after the machine is deleted if it has Snapshots, it will merge in the background and once this is done you will be able to delete. Rebooting does not help because the merge will pause during the reboot and restart with the host, although you didn't need the Virtual hard drive you would have eventually been able to remove. I think if you used powershell to view the VM status you would have seen a true status of merging.
    Wednesday, November 13, 2013 12:59 PM