Hi,
the file .lck must be deleted from the virtual machine folder
or
How to remove vmx.lck file , Unable to poweron VM
Cause
This issue occurs when the
.lck-xxx file located in the virtual machine folder holds a lock on the vmdk file. When an ESXi/ESX host accesses a virtual machine disk file on a NFS based datastore a
.lck-xxx lock file is generated in the same directory as the disk file. This file prevents other ESXi/ESX hosts from accessing the virtual disk file.
To resolve this issue, delete the
.lck-xxxx file located in the virtual machine folder.
Caution: Ensure the vmdk files are not in use by another virtual machine before performing these steps. Removing a valid .lck can cause instability.
To delete the .lck-xxxx file:
- Ensure the virtual machine is powered off.
- Connect to the ESXi/ESX host using Secure Shell (SSH). For more information, see Connecting to an ESX host using a SSH client (1019852).
- Go to the virtual machine folder, run the command:
cd /vmfs/volumes/datastore_name/virtual_machine_folder
- List all files including the hidden files, run the command:
ls -la
- Remove the lock file, run the command:
rm .lck-xxxx
Where xxxx is a sequence of numbers. For example, lck-001455721.
Note: Ensure the virtual machine is not running.
- Power on the virtual machine.
Note
: When the virtual machine is powered on, you see a new .lck-xxxx
file generated in the virtual machine folder. This is expected behavior.
ARomeo