HYPER-V Cluster W2012R2 Can’t delete VHDX on CSV

filesystemshyper-v-server-2012windows-clusterwindows-server-2012

I'm working on a Windows 2012 R2 Hyper-v. I've just done an EXPORT of a Virtual Machine to a CSV Volume to import later.

But I hanve't performed the import, and when I went to delete the exported folder I've got an access denied error of the VHDX file.

How can I identify which is the process that locks this file and delete it?
There no is any Virtual Machine with this file attached on it.

I've restarted the "Hyper-V Virtual management server" service without success.

Regards

Best Answer

I have managed to delete the folders in CSV which was locked by some unknown applications. This method didn't work for me.

So what I did:

Login to your failover cluster manager and right click on that CSV volume and select move it to 'best node'.

Then Login to that node and from PowerShell run the following commands to delete the folders in CSV volume.

Remove-Item -Force yourfoldername

That is it!