Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

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.

share|improve this answer
    
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
add comment

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.

share|improve this answer
    
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 2 '11 at 16:45
    
I do believe that did the trick! Thanks so much! –  muncherelli Feb 2 '11 at 18:09
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.