Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1908668
  • 博文数量: 346
  • 博客积分: 10221
  • 博客等级: 上将
  • 技术积分: 4079
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-01 19:43
文章分类

全部博文(346)

文章存档

2012年(1)

2011年(102)

2010年(116)

2009年(127)

我的朋友

分类:

2010-08-11 10:09:27

刚才准备做网站(数据备份都在VM里面),没想到启动不起来,咋一看,出现This Virtual Machine Appears To Be In Use字号,不过貌似我没有启动任何VM啊,何来in use...

不过想起9.30号那天我硬关机(非正常关机),或许是这方面的原因。







本来想实在不行就重做系统了,不过查阅了相关文献就解决了...

我发现我那启动不起来的VM系统文件夹下多了很多lck文件,kenclarksblog讲的很清楚,把他们都给del了(windows/linux均如此),重开VM,之后系统就恢复了,咋一看!这么简单,原来如此...

相关文献:kenclarksblog

This Virtual Machine Appears To Be In Use…

When I clicked on the lock button (which had replaced VMWare Fusion’s normal “play” button), I got an error message indicating “The virtual machine appears to be in use”:

Seeing as how I was not using the VM (…at least to the best of my knowledge), I clicked on “Take Ownership”, and got an error message that said “Taking ownership of this virtual machine failed”:

What to do? I started googling for the error messages to see if I could find a resource or VMWare support document that described how to troubleshoot them, but to my surprise it took me awhile and some digging to find something. Luckily, which in essence recommended removing VMWare’s lock files on the virtual machine.

This solution worked perfectly for me, so I wanted to document in a little more detail how I implemented it on my Mac.

PLEASE NOTE! This involves using the Terminal and Unix shell commands, so if you are not familiar with either, you should proceed at your own risk. I do not believe anything below is all that complicated for someone with general Terminal / Unix experience, but for example if you are asking yourself right now what the Terminal is or have never dropped into the Terminal before, these directions will not be detailed enough for you.

1. Quit VMWare Fusion.

Before you start, make sure that you have totally quit VMWare Fusion, and it is not running in the background.

2. Launch Terminal.

I decided to go into Terminal to remove the lock files given the Finder does not show hidden files and folders by default. (You could theoretically do all of this in the Finder if you but for me it was easier to just go straight to Terminal).

3. Change to the Virtual Machine directory.

By default, VMWare creates a directory under your user Documents folder called “Virtual Machines.localized” with subfolders for each VM.

On your Mac this directory name will likely be different than mine (it is based on the name of your actual VM). However as an example, on my Mac the directory is:

/Users/kenclark/Documents/Virtual Machines.localized/Windows XP Professional.vmwarevm

Therefore, the command to change into that directory (from the default terminal prompt which starts you in your home directory, i.e. /Users/kenclark) is:

cd Documents/Virtual\ Machines.localized/Windows\ XP\ Professional.vmwarevm/


4. 
Verify there are lock files in this directory.

Once you are in the VM’s directory, you should see a number of lock files intermixed with the VM files. To do this, just enter the following Unix command to list the directory contents:

ls -l

As an example, on my Mac I saw four lock files in addition to VMWare’s system files. They were:

Windows XP Professional-000001.vmdk.lck
Windows XP Professional.vmdk.lck
Windows XP Professional.vmem.lck
Windows XP Professional.vmx.lck

5. Create a directory to back up the lock files.

Theoretically you could simply delete the lock files, but I am more conservative and did not want to risk really messing anything up on my Mac. I created a temp directory for the lock files rather than deleting them.

Here’s the command to make a backup directory I am calling “lockfiles-temp”. (Please note I am assuming you are in the Virtual Machine directory when you do this).

mkdir lockfiles-temp

6. Move the lock files into the temp directory.

Again I moved the lock files rather than deleting them to ensure I could rollback if this did not work. Here is the command:

mv *.lck ./lockfiles-temp

At this point you should verify the move was successful, by executing another directory listing:

ls -l

When you do this, you should see no lock files in the VM directory.

7. Launch VMWare and Start your Virtual Machine.

Now, power up VMWare and you should see a new screen that shows your virtual machine is unlocked and either “Powered Off” (as mine shows below) or “Suspended” – in either case it will be ready to start up.

Mission Accomplished!
阅读(2119) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~