I have 3 batch scripts which I use instead of the startmenu power buttons.
do_shutdown.bat (shutdown pc with a 10 sec waiting period, not to give the vm's 10 sec time to savestate, but to allow me to cancel the shutdown within 10 seconds. The countdown starts after the vm's have been shut down)
"C:\VirtualBox\VBoxManage.exe" controlvm "Ubuntu Server" savestate
"C:\VirtualBox\VBoxManage.exe" controlvm "Ubuntu Minimal" savestate
shutdown /s /t 10
do_reboot.bat (reboots immediately after the vm's got shut down)
"C:\VirtualBox\VBoxManage.exe" controlvm "Ubuntu Server" savestate
"C:\VirtualBox\VBoxManage.exe" controlvm "Ubuntu Minimal" savestate
shutdown /r /t 0
do_cancel.bat (allows me to cancel the pc-shutdown within the 10 second waiting period. It then restarts the vm's again, since they got shut down with the do_shutdown.bat)
shutdown /a
C:\VirtualBox\VBoxManage.exe startvm "Ubuntu Minimal" --type headless
C:\VirtualBox\VBoxManage.exe startvm "Ubuntu Server" --type headless
Instead of savestate
you can also use one of the following
poweroff - pulls the plug
(probably not a good idea...)
acpipowerbutton - presses the power off button for a clean shutdown
("The system is going down for power off NOW!" to all consoles)
acpisleepbutton - tells the os to go to sleep
(probably just as bad as poweroff)
Install the guest additions? Does that not provide the functionality required? – Canadian Luke – 2015-08-19T23:31:25.420
@CanadianLuke It does not. :) – Matt Jenkins – 2015-11-06T11:09:33.907