How to Unlock Vmware

Written by chris hoffman Google
  • Share
  • Tweet
  • Share
  • Email

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

Instructions

  1. 1

    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.

  2. 2

    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."

  3. 3

    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."

  4. 4

    List all virtual machines on the system and their file locations by typing "vmware-cmd -l" into the console and pressing "Enter."

  5. 5

    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.

  6. 6

    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."

  7. 7

    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.

  8. 8

    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.

  9. 9

    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.

  10. 10

    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.

  11. 11

    Restart the computer running VMware if the file is still locked. Restarting unlocks all locked files but interrupts any running virtual machines.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.