Hi All,
Command: esxcli vm process list does not list the VM that is off. I have a lock on one of the VMs file and need to kill it. The VM is powered off. How can i find the world ID for this VM?
thanks in advance
are you logged into the correct esxi server?
Yes, I can browse to the datastore and see the correct folder and VM files
that is certainly a new one! I can't think of anything. Is it registered to another esx server, and the lock is being caused there? if the vm is not powered on, I cannot think of why you would have a lock on the vm's files.
Can you migrate the other vm's off and reboot the esx server?
Powered off VMs won't show word ID, follow below steps.
1. Ensure the virtual machine is powered off.
2. Connect to the ESXi/ESX host using Secure Shell (SSH)
3. Go to the virtual machine folder, run the command:
cd /vmfs/volumes/datastore_name/virtual_machine_folder
4. List all files including the hidden files, run the command:
ls -la
5. 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.
6. 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.
A powered-off VM has no world ID. The "world" is basically a process, if it's not running it naturally has no ID assigned.
You can find all VMs registered on a host, including powered-off VMs, with this command:
# vim-cmd vmsvc/getallvms
To check details on which host/process has a file locked, see this article:
VMware KB: Investigating virtual machine file locks on ESXi/ESX
If you've found the host holding the lock, try to restart the management agents on that host.
i do not see a file with .lck file
vmware log shows:
2016-03-18T15:46:07.900Z| Worker#0| I120: [msg.fileio.lock] Failed to lock the file
2016-03-18T15:46:07.900Z| Worker#0| I120: [msg.disk.noBackEnd] Cannot open the disk '/vmfs/volumes/51999e41-093b0bdc-9504-7845c44997e1/win2k12_r2_std_03032016/win2k12_r2_03032016.vmdk' or one of the snapshot disks it depends on.
there is no snapshots and i tried to consolidate
i am getting this error in vCenter and seeing in vmware.log when powering on the VM
An error was received from the ESX host while powering on VM win2k12_r2_03032016.
Cannot open the disk '/vmfs/volumes/51999e41-093b0bdc-9504-7845c44997e1/win2k12_r2_std_03032016/win2k12_r2_03032016.vmdk' or one of the snapshot disks it depends on.
Failed to lock the file
Please try this KB - https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=21101...
Move this VM to another datastore and then check. If that's not resolve issue then restart host agent using /etc/init.d/hostd restart
got support on the line and they found that one of the VMs that were build using this template VMX files was pointing to the template's VMDK and caused the lock. edited vmx file and pointed to a right vmdk was a solution