VMware Communities
gbohn
Enthusiast
Enthusiast

How to force power-off to a recalcitrant guest- Workstation 14 Pro

Hi;

Every once in a while I have run into a situation where (on a Windows 7 host) I have used 'VM / Power / Restart Guest' to try and restart a guest, but the guest stalls and doesn't restart. It appears to stall.

When this happens, I can no longer try 'VM / Power / Power-off' to force the guest to power-off instead. All the power choices are now greyed out.

Is there an official way to recover from this? I ended up restarting the Windows host (and using 'force restart'), but it seems like there should be a better way. Or perhaps this should never happen?

I have Workstation Pro configured to keep the guests running if I end the Host UI, so simply ending the GUI on the host presumably won't help by itself.

Thanks;

0 Kudos
7 Replies
daphnissov
Immortal
Immortal

You can just restart the Workstation worker service in the Services snap-in. Basically kills the world that its running.

0 Kudos
gbohn
Enthusiast
Enthusiast

I didn't seem to find a 'Workstation worker service'. as far as listed services go, I have

VMWare Authorization service

VMWare DHCP Service

VMWare NAT service

VMware USB Arbitration service

and

VMware Workstation server

I'm pretty sure I've disabled 'VMware workstation server' in the past without it preventing me from running things.

What is the specific Windows service name you are referring to? Or maybe you are referring to a specific (non-service) process?

wila
Immortal
Immortal

Hi,

In this case I would probably try vmrun.

Eg.

vmrun -T ws stop "c:\my VMs\myVM.vmx" hard

The vmrun command is installed somewhere in your VMware install folder (sorry don't know the exact path from memory)

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
gbohn
Enthusiast
Enthusiast

Since I can't produce the condition at will, I can't test this for real until the next time it happens.

But, trying it on an unsuspecting VM Guest (not in limbo) seems to work o.k..

Thanks!

0 Kudos
wila
Immortal
Immortal

Hi,

Just for your information.

The option "hard" in that command line is comparable to you pulling the power plug on a physical machine.

For testing the option "soft" is better as then the guest OS is asked to power down nicely. At least... as long as VMware Tools is installed and running. If VMware Tools is not running (or installed) then IIRC it behaves the same as the "hard" option.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
am312
Contributor
Contributor

My VM is locked up and refusing to close.  trying the command suggested does not work since Workstation seems to think the VM is powered off.  But it's not.   I'd be happy to kill the Workstation executable in Windows Task Manager but would rather avoid anything that might risk corrupting my vm in any way.

C:\Program Files (x86)\VMware\VMware Workstation>vmrun.exe -T ws stop "c:\virtual_machines\oracle-linux85\Oracle Linux 8 64-bit.vmx" hard
Error: The virtual machine is not powered on: c:\virtual_machines\oracle-linux85\Oracle Linux 8 64-bit.vmx

 

0 Kudos
SilentHill2020
Contributor
Contributor

Thank you so much for the vmrun command. Worked like a charm on a stuck Win10 guest !