-
1. Re: Any better way to automatically suspend VMs on host (Win7x64) shutdown than this way?
pmunro Dec 12, 2011 2:29 AM (in response to 0WayneH0)1 person found this helpfulI run a script that hibernates the machine doing a shutdown -h, no need to suspend the VM individually; may need to issue a powercfg.exe -H on to turn on hibernation support before hand.
-
2. Re: Any better way to automatically suspend VMs on host (Win7x64) shutdown than this way?
markdv77 Dec 12, 2011 3:12 AM (in response to 0WayneH0)1 person found this helpful0WayneH0 wrote:
The problem with what I have, even though it seems to work pretty well when testing shutdown from the host UI, is that I need to manually keep the script up to date (in terms of VMs on my system) and I have about 20 VMs at the current time, but that can and does change and I expect having to keep the script up to date will become an annoyance over time.
Hi,
It's possible to get a list of running vms using "vmrun list", which returns a list of paths to the .vmx files of running VMs.
Which is perfect for synthezising the appropriate shutdowns commands dynamically.
It would require some more advanced scripting than your current script... And I'm a linux user myself so I can't help you there.
Regards, Mark.
-
3. Re: Any better way to automatically suspend VMs on host (Win7x64) shutdown than this way?
0WayneH0 Dec 12, 2011 8:37 AM (in response to pmunro)Yes hibernation would make life simpler all round; I never considered that since I thought (incorrectly) that it may not play well with my system encryption, but I'm not sure where I got that idea from since it should be fine. I'm not sure if my UPS software will issue a hibernate command or just a balls out shutdown though. I'll have to see if it's only going to issue a shutdown command whether I can override that somehow. I also just read that the UPS I have will itself shut off 2 minutes after the shutdown command is executed, so if I have multiple VMs running 2 minutes might not be enough to suspend them all and shut down the way I have it configured now. Maybe hibernate is the best way to go if I can get it to work (i.e., get the UPS to initiate a hibernate either directly or indirectly); the only way I can see myself figuring this out is by simulating a power outage (unplugging the UPS).
Thanks for the info.
~~~~~~
Actually it looks like my UPS software will hibernate, so I just need to capture that and issue the command to my other machine running on the same UPS. That will save all the VM shutdown hoops I am currently jumping through.
-
4. Re: Any better way to automatically suspend VMs on host (Win7x64) shutdown than this way?
0WayneH0 Dec 12, 2011 8:23 AM (in response to markdv77)Hey thanks for the tip; that I did not know and it will be handy if the hibernate thing doesn't go my way.
Thanks.