Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Cannot power on a virtual machine located in an NFS datastore (2037507)

Symptoms

  • You are unable to power on a virtual machine which is located in an NFS datastore
  • Powering on  a virtual machine that is located in an NFS datastore fails
  • You see the error:

    Failed to lock the file. Cannot open the disk '/vmfs/volumes/UUID/VM_Name/VM_Name.vmdk' or one of the snapshot disks it depends on. 
  • In the /vmfs/volumes/datastore_name/virtual_machine_folder/vmware.log file, you see entries similar to:

    vmx| DISKLIB-VMFS : "/vmfs/volumes/UUID/VM_Name/VM_Name-flat.vmdk" : failed to open (Failed to lock the file): AIOMgr_Open failed. Type 3
    vmx| DISK: Cannot open disk "/vmfs/volumes/UUID/VM_Name/VM_Name.vmdk": Failed to lock the file (16392).
    vmx| Msg_Post: Error
    vmx| [msg.disk.noBackEnd] Cannot open the disk '/vmfs/volumes/UUID/VM_Name/VM_Name.vmdk' or one of the snapshot disks it depends on.

  • In the /var/log/vmkernel file, you see entries similar to:

    NFSLock: 2819: failed to get lock on file VM_Name.vmdk 0x000000000000 on ip> (ip): Busy
    WARNING: NFSLock: 2128: disk is being locked by other consumer
    NFSLock: 2819: failed to get lock on file <VM_Name>-flat.vmdk 0x000000000000 on ip (ip): Busy

Cause

This issue occurs if the .lck-xxx file located within the virtual machine folder holds a lock on the vmdk file.

Note: When an ESX host accesses a virtual machine disk file on an NFS-based datastore, a special .lck-xxx lock file is generated in the same directory where the disk file resides. This file prevents other ESX hosts from accessing this virtual disk file.

Resolution

To resolve this issue, delete the .lck-xxxx file located within the virtual machine folder.

To delete the .lck-xxxx file:

  1. Ensure that the virtual machine powered off.
  2. Connect to the ESX host using SSH. For more information, see Connecting to an ESX host using a SSH client (1019852)
  3. Go to the virtual machine folder using this command:

    cd /vmfs/volumes/datastore_name/virtual_machine_folder

  4. Run this command to list all the files, including the hidden files:

    ls -la 

  5. Run this command to remove the lock file:

    rm .lck-xxxx

    Where xxxx is a sequence of numbers. For example, lck-001455721.

    Note: Ensure that the virtual machine is not running. If you are not comfortable with removing the lock file, contact VMware Support.

  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 an expected behavior.

See Also

Update History

03/06/2013 - Added ESXi 5.0.x to Products

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 0 Ratings
Actions
KB: