Debian – VMWare Server lck file keeps coming back

debianvmware-server

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?

Best Answer

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.