2

I am running VMWare Server 2.0 on a Debian Lenny system as a host OS. I am getting this error when I try to start a Virtual Machine

Cannot open the disk '/var/lib/vmware/Virtual Machines//.vmdk' or one of the snapshot disks it depends on. Reason: Failed to lock the file.

So I looked around on the web and found that I need to delete the .lck folder and file in order to get this error

This seems to happen any time I reboot my Debian Server. The Virtual Machines sometimes do not recover and this lck file is causing problems.

Should I create a cron script that does a rm *.lck on each of my machines on reboot? Looking for any direction on how to resolve this. It seems when i do a "reboot" command it is maybe not gracefully shutting down the VMware containers so the lock files are still intact?

Chopper3
  • 101,299
  • 9
  • 108
  • 239
muncherelli
  • 759
  • 1
  • 4
  • 22

3 Answers3

2

This usually means that the vmware subsystem on your Debian system is not getting shut down properly. The .lck file is created to reduce the likelyhood that two VMware subsystems will try to access the VM at the same time.

You probably need to check your VM configuration to ensure that the VMs are being shut down (or suspended) as appropriate when the host is being shut down. This usually requires the installation of VMware Tools into the VMs to work properly.

David Mackintosh
  • 14,293
  • 7
  • 49
  • 78
  • I changed the option from "Power Off" to "Shut Down Guest" and I'm making sure VMWare Tools are installed on each VM. We'll see if that works. – muncherelli Feb 02 '11 at 16:45
0

If you do not have vmware tools installed on the guest you can always select suspend to be safe.

Shaggy63
  • 47
  • 1
0

I added "rm /path/to/vm/*.lck -R" to my vmware startup (/etc/rc5.d/S90vmware) at the beginning of the file, so if my server doesn't get shut down gracefully (power failure for example), when I bring the server back up, my VMs still startup without any manual intervention. worth a shot. Wish VMware Server would do this on its' own.

joe
  • 16
  • This is actually exactly what I did... Perfect answer! And I really wish it did this on its own as well... LAME! Thanks! – muncherelli Mar 21 '11 at 15:21