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)

CNIL
Metrics and Logs

(formerly, Opvizor Performance Analyzer)

VMware vSphere & Cloud
PERFORMANCE MONITORING, LOG ANALYSIS, LICENSE COMPLIANCE!

Monitor and Analyze Performance and Log files:
Performance monitoring for your systems and applications with log analysis (tamperproof using immudb) and license compliance (RedHat, Oracle, SAP and more) in one virtual appliance!

Subscribe to Our Newsletter

Get the latest product updates, company news, and special offers delivered right to your inbox.
Share on twitter
Share on linkedin
Share on facebook
Share on email

Subscribe to our newsletter

White Paper — Registration

We will send you the research paper via email.

CodeNotary — Webinar

White Paper — Registration

Please let us know who you are, so we can send you the CodeNotary Trusted Software Supply Chain white paper.

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.