VMware Communities
etroy
Contributor
Contributor

Can't take ownership after main machine automatically rebooted by Windows update

I have VMWare workstation installed on a 64 bit Win XP Pro machine. Today, right after the computer automatically rebooted due to a damn automatic Windows update, I found that I could not start either of my virtual machines. One is a Win XP 32 pro machine, and the other a 64 bit linux machine. I was running the 32 bit windows machine when this occurred. Now, when I start VMWare, there are no tabs except home. Under favorites, I thave Other Linux 2.6.x kernel 64 bit and windows xp professional. (Usually they also show up in tabs at top.) If I select either one in the favorites, and click "open" I get error message stating "this virtual mahcine appears to be in use. If this virtual machine is already in use, press the Cancel button to avoid damaging it. If this virtual machine is not in use, press the take ownership button to obtain ownership. Configuration file I:\My Virtual Machine\Windows XP Professional.vmx" If I click take ownership, I get the same message, if I click cancel, nothing happens. I get the same problem on the linux virtual machine, although it was not running when windows automatic update shut down my main win xp x64 pro machine. How do I correct this problem and get back to work?

Thanks in advance

6 Replies
etroy
Contributor
Contributor

I don't know what went wrong, but, after I shut down the main 64 bit machine, again, and restarted it, I was able to open the virtual 32 bit machine. So, I don't know what the problem was, but it is now resolved.

Reply
0 Kudos
MKhedr
Contributor
Contributor

I have the same issue on Win Server 2008, the server restarted. And after the auto update, all open virtual machines at the time of restart are not working.

Can't take ownership of them.

The running VMware processes does not seem to be the one using them.

Does VMware create an inuse file or flag in the config file to prevent multiple VMware players to run the machine?

It seems that this flag is not reset when a machine restart, and that leave the virtual machine inaccessible...!!!!

Reply
0 Kudos
kingneutron
Expert
Expert

--With Vmware closed, Browse in Explorer to the VM subdirectory on the host and delete *.LCK -- you may also need to delete Directory/directories that function as Locks. Then bring Vmware back up.

./. If you have appreciated my response, please remember to apply Helpful/Correct points. TIA

./. If you have appreciated my response, please remember to apply Helpful/Correct points. TIA
MKhedr
Contributor
Contributor

The VM's works now... :smileyblush:

Thanks.

Reply
0 Kudos
Tanav
Enthusiast
Enthusiast

please follow the below procedure if your VM is locked.

Sometimes a file or set of files in a VMFS become locked and any attempts to edit them or delete will give a device or resource busy error, even though the vm associated with the files is not running. If the vm is running then you would need to stop the vm to manipulate the files. If you know that the vm is stopped then you need to find the ESX server that has the files locked and then stop the process that is locking the file(s).

  • 1. Logon to the ESX host where the VM was last known to be running.

  • 2. vmkfstools -D /vmfs/volumes/path/to/file to dump information on the file into /var/log/vmkernel

  • 3. less /var/log/vmkernel and scroll to the bottom, you will see output like below:

  • a. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)FS3: 130: <START vmware-16.log>

  • b. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)Lock [type 10c00001 offset 30439424 v 21, hb offset 4154368

  • c. Nov 29 15:49:17 vm22 vmkernel: gen 66493, mode 1, owner 46c60a7c-94813bcf-4273-0017a44c7727 mtime 8781867] ß Bold type added to number for emphasis.

  • d. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)Addr <4, 588, 7>, gen 20, links 1, type reg, flags 0x0, uid 0, gid 0, mode 644

  • e. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)len 23973, nb 1 tbz 0, zla 2, bs 65536

  • f. Nov 29 15:49:17 vm22 vmkernel: 2:00:15:18.435 cpu6:1038)FS3: 132: <END vmware-16.log>

  • 4. The owner of the lock is on line 3c, the last part is all you need, in this case 0017a44c7727

  • 5. esxcfg-info | grep -i 'system uuid' | awk -F '-' '{print $NF}' will display the system uuid of the esx server. You need to run the esxcfg-info command on each esx server in the cluster to discover the owner.

  • 6. When you find the ESX server that matches the uuid owner, logon to that ESX server and run the command: ps -elf|grep vmname where vmname is the problem vm. Example output below:

  • a. 4 S root 7570 1 0 65 -10 - 435 schedu Nov27 ? 00:00:02 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user/pool2 -@ pipe=/tmp/vmhsdaemon-0/vmxf7fb85ef5d8b3522;vm=f7fb85ef5d8b3522 /vmfs/volumes/470e25b6-37016b37-a2b3-001b78bedd4c/iu-lsps-vstest/iu-lsps-vstest.vmx0

  • 7. Since there is a process running, pid 7570 in the example, you need to kill it by following steps 5-12 on stopping a VM above

  • 8. Once the kill is complete the files should be released.

Reply
0 Kudos
RDPetruska
Leadership
Leadership

Tanav,

While your information may be useful, there is no such thing as a VMFS file system for the hosted products such as Workstation, which is what the posters are using (since this is the Workstation forum). To unlock a VM on the hosted platforms, merely remove any .lck files and/or folders when the VM is not being accessed in any way by the VMware software.

Reply
0 Kudos