VMware Communities
_Royce_
Enthusiast
Enthusiast

Graceful shutdown of Auto Start VMs on Workstation Pro 17 when Host reboots

Testing Auto Started VMs on Win 10 Host and found something odd. VMs started manually (not enabled for Auto Start) are suspended when the Host reboots. They don't appear to be automatically resumed. 

On the other hand, Auto Started VMs are killed on Host reboot. They will show an event that windows wasn't properly shutdown in Event Viewer.

There doesn't appear to be a way to have Auto Started VMs suspended and resumed automatically when the host reboots. Or even cleanly Shutdown (without scripting something to do it, which may not be 100% reliable).

Any ideas?

0 Kudos
2 Replies
Kerkanr
Contributor
Contributor

Exactly. I was looking for a solution to shutdown guest when host shuts down but could not find anything. I ended up writing a simple script on Windows host that first shuts down the guest gracefully and then shuts down the host.

For reference I am quoting the script below (it has to be run as admin)

"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws stop "D:\Utilities\VMs\Windows 11\VWindows 11.vmx"
shutdown -s -t 0

_Royce_
Enthusiast
Enthusiast

But how did you deal with windows updates or other things that might trigger a reboot of the Host?

I've tried so many things but so far haven't been able to script something that can shutdown the running VMs before the main VMware processes gets told to shutdown and then it automatically suspends the running VMs so there's no time for my script to run.

Tags (1)
0 Kudos