VMware虚拟机运行时出错:cannot open the disk xxxxxxxxxxx.vmdk. failed to lock the file

在windows下运行linux中创建的虚拟机时出错,无法运行。
错误提示大概为:
cannot open the disk xxxxxxxx.vmdk or one of the snapshot disks itdepends on.
reason: failed to lock the file.

网上中文帖子里面教的方法都是废的。

国外网友很简单:把虚拟机文件夹里【.lck】后缀的文件/文件夹删除即可。


方法1(转自:http://blog.chinaunix.net/uid-24250828-id-3012727.html )


打开VMware出现Cannot open the disk *.vmdk or one of the snapshot disks it depends on.Reason: Failed to lock the file.错误的解决办法!

   今天我公司做的虚拟化服务器出现故障意外重启了,主系统启动之后,在启动VMware虚拟机的时候出现了Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file.的错误,一个虚拟机无法启动将影响到很多用户的使用,所以我马上开始寻找解决Reason: Failed to lock the file的办法!于是我到百度搜索了一下这个错误的具体原因,搜索结果中给出了两种解决办法!

解决办法一:
   1、在VMware该虚拟机路径下的所有.lck文件和文件夹下删除或迁移至其它目录,一般就可以解决了。
   2、如果再次启动VMware的Windows Vista系统失败,尝试右键虚拟机出错的系统->Settings->Hardware->Hard Disk->Utilities->Map->映射虚拟硬盘到Z:/
   3、断开虚拟硬盘,重新加载,启动。系统就可以正常启动了

经实验此办法以失败结 束。如果有遇到Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file错误的朋友不妨也试一下。如果您实验成功了,请给我们留言,以便我们进行更好的技术交流

解决办法二:

   使用记事本打开*.VMX文件上加上一行代码disk.locking = "FALSE",重新启动该虚拟机。

使用方法二,问题得到 解决,重新启动VMware正常启动,不会再出现Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file.错误。

希望各位从事虚拟化的朋友能有所帮助,也欢迎各位来我站踊跃投稿!

方法2(转自: http://www.ardamis.com/2009/11/20/vmware-cannot-open-the-disk-xxxxxx-vmdk-or-one-of-the-snapshot-disks-it-depends-on/ )

VMware “Cannot open the disk ‘XXXXXX.vmdk’ or one of the snapshot disks it depends on.”

From time to time, I want to copy just the minimum files for a VMware virtual machine: the two .vmdk files and the .vmx file. After moving those files to a new location or deleting a snapshot file, attempting to boot the virtual machine returns the following error message:

Cannot open the disk ‘XXXXXX.vmdk’ or one of the snapshot disks it depends on.
Reason: The system cannot find the file specified.

I’ve found that following the steps below fixes the problem and allows me to boot the virtual machine as it existed at the time of creation. DO NOT USE these steps if you need to retain any changes to the machine:

Open the *.vmx file in a text editor and find the line that refers to the old snapshot file, which will look something like:
scsi0:0.fileName = “XXXXXX-000002.vmdk”
or
ide0:0.fileName = “XXXXXX-000002.vmdk”

Change the value to the filename of the ~1kb .vmdk file (which happens to be the same as the name of the VM). For example, if your virtual machine was named “Windows XP Professional”, the line would read:

scsi0:0.fileName = “Windows XP Professional.vmdk”

Power on the VM. It should boot normally, but because the snapshot file is missing, the machine will boot to an earlier state.


你可能感兴趣的:(linux)