Page 1 of 1

ACPI: Can I force a clean shutdown of a Windows 7 guest?

Posted: 24. Sep 2014, 17:53
by ryanjaeb
Hi,

I have a backup strategy for VMs where each VM is shut down and then backed up. However, I keep running into a problem when trying to shut down Windows guests via ACPI power button. I use the following command to try to shut down the guest:

Code: Select all

VBoxManage controlvm "vm-name" "acpipowerbutton"
The difficultly I'm having is that Windows isn't guaranteed to shut down when the power button is pressed. I know that VirtualBox can't change that, so I'm wondering what other options I have. So far I've seen or considered the following:

1. Connect to the guest over the network and issue a shutdown command. Needing to know the IP address of the guest is a major drawback for me and I would prefer a better option.

2. I've seen references to issuing commands via a serial port. I didn't explore this much.

3. Can I remap the ACPI button press action in Windows 7?

4. Is it possible to issue commands to the guest via the guest additions if they're installed?

5. Fallback to 'savestate' if the guest doesn't shut down in X seconds. My main issue with this is that I don't know how to detect and deal with a guest that's simply too slow to shut down. I wouldn't want to 'savestate' on a machine mid shut down.

I'm wondering if anyone else shuts down their VMs before backing them up and, if so, how they do it.