VMWare "Failed to lock the File" Error

Recently I have created multiple virtual machines using VMWare Workstation 9. I wanted to prepare template VMs already installed, updated, patched and configured... Just ready to load and start my super clean VM lab. So after hours of work, all  my vms were ready with a nice Sysprep finish :) But when I started to use them, I realized that I could not open my vms...
I was just copying the template VM folder that I created earlier into another folder and just renaming the folder for my personal use, but i never renamed the actual files of vms. I would go from my VMware Workstation and do "File", "Open" . Surprise!


"Failed to lock the file. Cannot open the disk 'C:\path\vmfilename.vmdk' or one of the snapshot disks it depends on.

Here is what I found. Actually, I think it will be even better if I just state the most important part of the VMWare knowledge base article # 1038189 regarding this problem. Here is the WHY? ;

The error Failed to lock the file means that another process is opening the file and the process you are using cannot open the file properly. 

This typically occurs if you:

  • Start two copies of the .vmx file
  • Power on a virtual machine with mounted disks (via the vmware-mount utility)
  • Try to turn on a virtual machine through the user interface during a snapshot operation
  • Try to add the same virtual disk to the machine twice.

And here is what you should do to remedy the stuation;

To resolve this issue, remove the disk from the virtual machine and re-add it. When you re-add it, you can use the datastore browser to locate the disk on one of your datastores.

Basically, all I needed to do is remove the virtual disk trough my vm's settings and re-add it.

Comments

Popular posts from this blog

System.Messaging.MessageQueueException (0x80004005): A workgroup installation computer does not support the operation (Public Queue create issue)

Veeam Backup Error : Failed to prepare guest for hot backup. Error: VSSControl

warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead - Chef Development Kit Update