VMware Cloud Community
LenelTim
Contributor
Contributor

Unable to revert to snapshots

Just applied ESXi 6.5 Update 2.  Now I am finding I am unable to revert to any previous snapshots(or new ones).  The vm is shutdown and was shutdown during the prior snapshot processes.  I checked the folder and there is no .lck file.  I am at a loss as to what file could be locked.  I see nothing for that folder when doing lsof either.  Any thoughts?  Thanks

The error is shown below:

   Revert To Current Snapshot

      haTask-13-vim.VirtualMachine.revertToCurrentSnapshot-112100968

          Failed - Unable to access file since it is locked

          An error occurred while reverting to a snapshot: One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot.

Reply
0 Kudos
10 Replies
vXav
Expert
Expert

Have you tried removing the VM from inventory and re-adding it?

When I get strange behavior like that I usually try this.

Reply
0 Kudos
GalNeb
Enthusiast
Enthusiast

you didn't mention if you are on a SAN (VMFS), a NAS, VSAN, or VVOL.  The locking mechanisms are different for each.  On a NAS, you are looking for hidden files starting with Period (.), that is the easy case, delete the files from a putty session.  For SAN it is a lot more of a problem, look for KB10051:  https://kb.vmware.com/kb/10051

Old enough to know better, young enough to try anyway
Reply
0 Kudos
LenelTim
Contributor
Contributor

Yes I have detached and reattached the vm.  No change.  And I am finding it is also happening on ESXi 6.5 Update 1 servers.  I can find no open files.  Even fails command line method. 

Reply
0 Kudos
vcallaway
Enthusiast
Enthusiast

Your image based backup solution doesn't have locks on them does it?

Reply
0 Kudos
LenelTim
Contributor
Contributor

Sorry.  Direct attached storage.  That should make it much easier to diagnose but I have not found it being the case. 

Reply
0 Kudos
LenelTim
Contributor
Contributor

No image based (nor any other type) of backup is in use.  There really is no reason this should be locked.  I am baffled.

Reply
0 Kudos
GalNeb
Enthusiast
Enthusiast

Direct Attached storage means that it is a VMFS datastore where the locking is basically hidden.  Have you moved the VM from one host to another at any time?  If so, move it back to where it was when it was last powered on and try it from there.  It may have locks tied to that original esxi host.  The other poster's comment about the backups having a lock could also be valid.  Use the vmkfstools command in the KB to verify if there are any locks on all of the various files.  The error may tell you the specific file, otherwise you will need to check the vmx and all of the -flat.vmdk files.

Old enough to know better, young enough to try anyway
Reply
0 Kudos
LenelTim
Contributor
Contributor

Never moved.  These vm's are in essence locked to each server.  I have 6 total and have not done any vmotion or other features.  I have not even implemented autostart up.  This is a test lab environment and if I cant restore snapshots Im...  Well..  [insert favorite blasphemy here]!!

VMFS 6 and updated the vm compatibility too.  Stumped...

Reply
0 Kudos
LenelTim
Contributor
Contributor

Also not using VCenter, only the Web interface.  I notice when I Manage the shapshots the thumbnail image goes into refreshing (spinning).  I am not sure what its trying to do? 

Reply
0 Kudos
LenelTim
Contributor
Contributor

Nobody has any other ideas?  I am at a total loss here and snapshots are well... Kinda very important.

Reply
0 Kudos