How to release a locked Hyper-V VHD that is used by another process

hyper-v

While I was starting my vm I got this error

Microsoft Emulated IDE Controller Error(Instance ID
83F863B-8DCA-9EDA-2CA8B33039B4): Failed to Power on with Error 'The
process cannot access the file because it is being used by another
process .'.

What's wrong with it?

Best Answer

It's also possible for Windows to lock a VHD file. I ran into this by double-clicking on a VHD, which causes recent version of Windows to open it up like a folder. However, it appears that the system then holds a lock on the file, which prevents Hyper-V from using it to start a VM. Rebooting fixed that problem.