VMware Cloud Community
rfunk
Enthusiast
Enthusiast
Jump to solution

Unable to access a file since it is locked - Removing a snapshot

Whenever I try to remove a snap from one of my guests, VC return the error message "Unable to access a file since it is locked"

Is there any way I can tell what has the file(s) locked? is there any way I can remove the snap from my guest?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
conyards
Expert
Expert
Jump to solution

I'm guessing that the VM is powered on when you try this operation. If you power the VM off you will be able to remove the snapshot.

Simon

https://virtual-simon.co.uk/

View solution in original post

0 Kudos
4 Replies
conyards
Expert
Expert
Jump to solution

I'm guessing that the VM is powered on when you try this operation. If you power the VM off you will be able to remove the snapshot.

Simon

https://virtual-simon.co.uk/
0 Kudos
admin
Immortal
Immortal
Jump to solution

Sounds like you've got a VMDK name conflict, take a look at this KB for a fix.

http://kb.vmware.com/kb/5096672

As the previous poster said you need to power the VM off to remove the snapshot first.

0 Kudos
rfunk
Enthusiast
Enthusiast
Jump to solution

I opened a SR with VMware on this issue. I’m still not sure what caused the lock file issue during the snap delete process. VMware had me clone the machine using the vmkfstools –I command which work OK.

After I cloned the machine it came up ok and all of the data was there. I then tried to delete the snap on the original VM guest machine to see what would happen. It appears that this process would have work as well as so conyards gets the star.

The reason that VMware wanted me to clone the system to a new VM is that the original system was left intact if anything went wrong with the cloning.

0 Kudos
kastro
Enthusiast
Enthusiast
Jump to solution

Mittell is right.

You need to shutdown VM, remove vdisk, rename it with vmkfstools -E command and then add this vdisk back to VM.

Bye

Message was edited by:

kastro

0 Kudos