I am using Server 2012 R2 Datacenter Core. It is one of our Hyper-V hosts. I manage it from my workstation using Hyper-V manager, and manipulate files through the admin share.
I created a VM, then copied a VHDX into the Hard Disks folder. I then attempted to start the VM with that VHDX, but (since it is an old image and asked for an Admin password I don't have), I decided I would build from scratch. I shut down the VM, removed the drive, and attempted to delete the VHDX so I could create a new one with the same name. I get "The action can't be completed because the file is open in System". This has been happening for several hours. I initially suspected our AV solution, but it can't be taking this long to scan a 17GB file (I think).
Now, I've had this happen on Win7 systems before, and there's a plethora of methods for forcing a file to be deleted. In this case though, I can't just go to the host and boot it offline, or install SuperKillerFileDeleterUltraGuaranteedBox.
So how do I get rid of it?
P.S. I also realize I could just name the new VHDX something else - it doesn't have to be the same as the VM name. But that's just insulting, and anyway I can't just leave an unused 17GB file on the server forever.