1

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

Uh Trog
  • 103
  • 3
  • 10
  • Could it be a simple NTFS permissions problem? Have you made sure you have the appropriate NTFS permissions on the file to delete it? – joeqwerty Mar 13 '15 at 19:28
  • I'm administrator of the system, and also of the Domain. And when I went to take ownership of this file to reset permissions, I'm also getting another "access denied" error. – Uh Trog Mar 15 '15 at 14:33

2 Answers2

1

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!

mianjee
  • 111
  • 1
0

On the Hyper-V host, open computer management (if the server is running Core, use any server that can connect remotely).

In computer manager, go to System tools, shared folder, and open files.

Look in the 'open file' window to the right, and see if there are any locks associated with the folder and file path of the vhd(x).

Remove those locks.