ESXi

 View Only
Expand all | Collapse all

Find World ID

  • 1.  Find World ID

    Posted Mar 18, 2016 04:01 PM

    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



  • 2.  RE: Find World ID

    Posted Mar 18, 2016 04:28 PM

    are you logged into the correct esxi server?



  • 3.  RE: Find World ID

    Posted Mar 18, 2016 05:10 PM

    Yes, I can browse to the datastore and see the correct folder and VM files



  • 4.  RE: Find World ID

    Posted Mar 18, 2016 05:17 PM

    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.



  • 5.  RE: Find World ID

    Posted Mar 18, 2016 05:18 PM

    Can you migrate the other vm's off and reboot the esx server?



  • 6.  RE: Find World ID

    Posted Mar 18, 2016 05:25 PM

    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.



  • 7.  RE: Find World ID

    Posted Mar 18, 2016 05:35 PM

    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



  • 8.  RE: Find World ID

    Posted Mar 18, 2016 05:41 PM

    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



  • 9.  RE: Find World ID



  • 10.  RE: Find World ID

    Posted Mar 18, 2016 06:25 PM

    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



  • 11.  RE: Find World ID

    Posted Mar 19, 2016 05:01 PM

    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



  • 12.  RE: Find World ID

    Posted Mar 18, 2016 05:26 PM

    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.