VMware Cloud Community
sureshasai
Enthusiast
Enthusiast
Jump to solution

How to unlock the VMDK file VM's disk files are lock down frequently

Hi,

How to unlock the VMDK file VM's disk files are lock down frequently

how could i unlock the VM's ? and how to prevent that

0 Kudos
1 Solution

Accepted Solutions
rsk007
Enthusiast
Enthusiast
Jump to solution

Cause:

This issue occurs due to a number of reasons:

  • The common reason would be a powered on virtual machine contains locks on all files in use by the owning ESXi host to facilitate read and write access.
  • Other locks may be created by hot-adding disks to snapshot based backup appliances during the backup process.
  • Failure to create a lock / start a virtual machine can occur if an unsupported disk format is used or if a lock is already present.

for more information please find VMware KB below:

Troubleshooting issues resulting from locked virtual disks (2107795)

Investigating virtual machine file locks on ESXi (10051)

Finding the lock owners of a VMDK or file on a VMFS datastore in VMware ESXi 5.5 P05 and later (2110...

If you found my answers helpful please consider marking them as helpful or correct.

Santhosh Ranga
LinkedIn: https://www.linkedin.com/in/santhosh-ranga-43a88b124/

View solution in original post

0 Kudos
3 Replies
rsk007
Enthusiast
Enthusiast
Jump to solution

Cause:

This issue occurs due to a number of reasons:

  • The common reason would be a powered on virtual machine contains locks on all files in use by the owning ESXi host to facilitate read and write access.
  • Other locks may be created by hot-adding disks to snapshot based backup appliances during the backup process.
  • Failure to create a lock / start a virtual machine can occur if an unsupported disk format is used or if a lock is already present.

for more information please find VMware KB below:

Troubleshooting issues resulting from locked virtual disks (2107795)

Investigating virtual machine file locks on ESXi (10051)

Finding the lock owners of a VMDK or file on a VMFS datastore in VMware ESXi 5.5 P05 and later (2110...

If you found my answers helpful please consider marking them as helpful or correct.

Santhosh Ranga
LinkedIn: https://www.linkedin.com/in/santhosh-ranga-43a88b124/
0 Kudos
sureshasai
Enthusiast
Enthusiast
Jump to solution

HI,

Thanks for the guidence.

0 Kudos
zappit
Contributor
Contributor
Jump to solution

ESXi 5.5 host with Windows Server 2016. Repeat power outages.

It was far too time-consuming to try to repair the locks, edit files, and so much more. The company was down and thank God there was a quick fix.

Note this is a stand-alone ESXi 5.5 server. Troubleshooting the problem I ended up upgrading to 6.0

I got additional errors "failed to start the virtual machine. module disk power on failed. cannot open the disk"

Quick fix. In a panic to save time, I copied the .vmdk file over to a new folder, and the older corrupted .vmx~ which was replaced with a newer .vmx version. 

I copied the 200GB .vmdk file and the previous .vmx version (which was named .vmx~ and slightly larger/older than the new one) into a new folder.

I created a new instance from the web interface via "Register an Existing" vmguest. Not sure if this would have worked on version 5.5. In this huge mess since I upgraded to 6.0 and used the web interface in an attempt to import the corrupted image.

Starting the Windows Server 2016 instance it asked if I Copied or Moved it. I selected "Copy".

My Windows Server 2016 came up to do maintenance/repair within the WIndows 2016 light blue screen. Then after Win2016 attempted to repair, it did so and booted fine. 

I got this idea from the previous post to copy the image to a workstation and use VMWare Workstation to try and repair one of the three error messages I was receiving. I had a damaged image, locked files, a failed snapshot, etc.

0 Kudos