Knowledge Base

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

Investigating hosted virtual machine lock files (1003857)

Symptoms

  • Your virtual machine does not start.
  • You cannot boot your virtual machine.
  • You see one of these errors:
    • Cannot open the disk or one of the snapshot disks it depends on.
    • Failed to lock the file.
    • The virtual machine is already powered on.
    • Error while opening the virtual machine: no permission to access this virtual machine
    • Check for missing files failed.
    • Your host's BIOS does not have valid NUMA information.
    • Please update the host's BIOS or associate the virtual machine with the processors in a single NUMA node (CEC).


files-locked  locked-vm-files  lock-files  non-deleted-lock-files  vm-locked

Purpose

This article guides you through the process of determining if any lock files are preventing a virtual machine from being powered on.

Resolution

There are some circumstances in which one or more lock files exist in a virtual machine's directory even though the virtual machine is powered off. When this occurs, the only way that the virtual machine can be powered on is to manually remove the lock files.
 
The following steps provide information on how to remove lock files that are preventing a powered off virtual machine from powering on:
 
  1. Verify that the virtual machine is powered off. For more information, see Investigating if a hosted virtual machine is powered on (1003844).

    Warning
    : It is very important that you do not delete any lock files associated with a virtual machine if it is actually powered on. Doing so interferes with the virtual machine and may result in unrecoverable data loss.

  2. Navigate to the location of the virtual machine's files. For more information, see Locating a hosted virtual machine's files (1003880).

    Note: If different, the locations of the virtual machine configuration (.vmx) file as well as of all of the virtual disk files need to be checked in the following step.

  3. Look for and delete any file, directory, or folder that ends in either .lck or .LOCKFILE . Please take a backup of the file before deleting until the issue is confirmed fixed.

    • If you are at a Windows command prompt and in the directory where the lock file exists, type del <filename> , where <filename> is the name of the file, and press Enter.

      Note: If it is a directory, then type rd <directory> /s , where <directory> is the name of the directory, and press Enter.

    • If you are at a Linux shell prompt and in the directory where the lock file exists, type rm <filename> , where <filename> is the name of the file, and press Enter.

      Note: If it is a directory, then type rm -rf <directory> , where <directory> is the name of the directory, and press Enter.

Additional Information

Lock files are created when a virtual machine is powered on.  Their purpose is to prevent multiple VMware processes from accessing the same virtual machine at the same time.  The existence of a lock file indicates to VMware that the associated virtual machine is powered on.  If a lock file exists, and an attempt is made to power on the virtual machine, VMware will prevent this and an error message will be displayed.  The exact error message will vary, depending on the nature of the lock file, the product in use, and the version of the product.
 
Lock files are most often located in a virtual machine's directory in error when the virtual machine was shut down unexpectedly and the VMware product in use did not have time to perform the normal routine removal of these files.

See Also

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

  • 41 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)
  • 41 Ratings
Actions
KB: