top of page

Virtual Machine file lock error

Getting error file lock error while powering on VM ?

Are you getting file lock error while powering on Virtual Machine ? or something like this "Error connecting to path/virtual machine/vmx because the VMX is not started" Let's understand the nature & cause of this problem. To prevent the concurrent changes on Virtual Machines file and its file system, Esx Host set lock system on files. In some cases, these lock not released in VM powered off state which caused other Esx host fail to power on the virtual machine. This generally happens when you migrate the VM under cold migration process or move VM files from one Datastore to another Datastore or it could be some other method also.

Lock status of the file can be obtained by using the vmkfstools command:

If the owner entry is 00000000-00000000-0000-000000000000, it indicates that the file has either a read-only lock or a multi-writer lock or there is no lock on the file like in above screenshot scenario else output would be like "4655cd6b-3c4a19f2-17bc-00145e909070" which indicate the host MAC address and locking file.

Definition of Modes are as below.

  • mode 0 = no lock

  • mode 1 = is an exclusive lock (vmx file of a powered on VM, the currently used disk (flat or delta), *vswp, etc.)

  • mode 2 = is a read-only lock (e.g. on the ..-flat.vmdk of a running VM with snapshots)

  • mode 3 = is a multi-writer lock (e.g. used for FT VMs).

Few option though you can fix this issue like

Power-off the Virtual Machine and remove only lck file (Caution)

Migrate the VM's to another host and take restart which holding the VM lock file

Stop & restart management services of Esx host that holding VM lock file.

4 views0 comments


Post: Blog2_Post
bottom of page