find-the-esxi-that-owns-the-vmdk-lock-or-other-file-lock-on-a-vmfs-datastore

Unfortunately from time to time you can end up in a situation where your virtual machine is not reacting anymore on operations like vMotion, power-on or releasing a snapshot.

The cause is very often a locked VMDK file or CBT file (changed block tracking used by backup software) by a different ESXi than the one running your virtual machine and the corresponding process. That can be a leftover from purple screens, SAN connection failures or complete power outage.

Taking the example of powering on the virtual machine, the host the virtual machine is registered on tries to lock the VM files and start the VM runtime. As the locking doesn’t work because the file/s are already locked by a ESXi Host (typically the ESXi host the VM used to run before) the operation throws an error.

The same happens with Backups and VM snapshots – a common cause for invalid snapshots detected by our Health check solutions and even fixable by out Snapwatcher Tool.

Locked vMDK file, locked cbt file, vmdk lock owners

If you don’t use any tools, you need to work your way through the log files and some CLI commands.

Manual steps to release the VMDK lock

  1. find the IP address of the locking host – lock owner
  2. find the host locking the file (by IP address)
  3. find the locking process and release the file lock

Further information to detect lock owners and release the VM file lock

There are two great VMware Knowledge Base articles that describe the step by step process, if you want to go the manual way:

Investigating virtual machine file locks on ESXi/ESX (10051)

Finding the lock owners of a VMDK or file on a VMFS datastore in VMware ESXi 5.5 P05 (2110152)

RELATED ARTICLES

Save energy without reducing VM performance in your VMware vSphere cluster
16 August 2022
Over the last couple of decades energy consumption went up massively in every data center and while the…
Dennis
Metrics & Logs support for IoT - Bringing Secure Monitoring and Logging to the Edge
7 July 2022
Simple uptime monitoring for Internet-of-Things (IoT) is well-known and requires knowing if the devices are up and running.…
Dennis
Monitoring Azure SQL Managed Instance with Opvizor Metrics & Logs
17 January 2022
When you have critical applications and business processes that rely on Azure resources, it's critical to keep an…
Dennis

White Paper — Registration

You will receive the research paper by mail.

Codenotary — Webinar

White Paper — Registration

Please let us know where we can send the whitepaper on Codenotary Trusted Software Supply Chain. 

Become a partner

Start Your Trial

Please enter contact information to receive an email with the virtual appliance download instructions.

Start Free Trial

Please enter contact information to receive an email with the free trial details.

Subscribe to our newsletter