VMware develops virtual machine programs that run operating systems on other operating systems. Each operating system has its own virtual machine configuration and disc files on the host operating system. When a VMware ESX virtual machine is running, VMware locks the files so they can't be accessed or changed. VMware normally unlocks the files when it's done with them, but errors can occur where the files stay locked, rendering the virtual machines unbootable. You can troubleshoot and unlock the files using the VMware ESX console.
- Skill level:
- Moderately Challenging
Other People Are Reading
Try to power on the locked virtual machine using the VMware ESX interface. Write down the name of the locked VMware file mentioned in the error message, if the error message mentions one.
Log in to the VMware ESX system using an SSH client. If you don't already have one, VMware recommends the PUTTY SSH client for Windows. (See Resources.) Connect to the VMware ESX system with PUTTY by double-clicking the downloaded PuTTY.exe file, typing the IP address of the VMware ESX system into the "Host Name (or IP Address)" box, clicking "Open," typing your user ame and password at the prompts that appear and pressing "Enter."
Become the root, or administrator, user by typing "su -" into the terminal window, pressing "Enter," typing the root password at the password prompt and pressing "Enter."
List all virtual machines on the system and their file locations by typing "vmware-cmd -l" into the console and pressing "Enter."
Examine list of virtual machine files listed in the terminal window and identify the file corresponding to the locked virtual machine in the form "/vmfs/volumes/UUID/VMDIR/VMNAME.vmx," where "VMNAME" is the name of the virtual machine.
Enter the virtual machine's directory by typing "cd /vmfs/volumes/UUID/VMDIR/," replacing "/vmfs/volumes/UUID/VMDIR/" with the path of the folder containing the .vmx file, and pressing "Enter."
Locate the name of the locked file if the error message didn't display it by typing "tail vmware.log" and pressing "Enter." The virtual machine's log file lists the locked file.
Type "touch file" into the console, replacing "file" with the name of the locked file, and press "Enter." If this command completes successfully and doesn't result in an error message, the file is unlocked.
Search for processes maintaining locks on the file by typing "lsof | grep file" and pressing "Enter." If the command lists a process, end the process by typing "kill PID#," replacing "PID#" with the number under the process's PID column in the output of the "lsof" command.
Remove .lck files if the files are stored on NFS. Type "ls | grep .lck" and press "Enter." If any file names are displayed, type "rm file1.lck file2.lck", replacing "file1.lck file2.lck" with a list of the names of each locked file, and press "Enter" to delete them.
Restart the computer running VMware if the file is still locked. Restarting unlocks all locked files but interrupts any running virtual machines.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for