- Ensure the ACPI is enabled in your virtual machine settings.
- Login to your Windows guest and launch Group Policy Object Editor (gpedit.msc).
- Locate the following key and change the settings to enabled.
Computer Configuration\Windows Settings\ Security Settings\Local Policies\Security Options\ Shutdown: Allow system to be shut down without having to log on
- If you want to be able shutdown guest even there is a logged in user add the following to file ShutdownWarningDialogTimeout.reg and enter it into windows registry.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows] "ShutdownWarningDialogTimeout"=dword:00000001
virsh -c qemu:///system shutdown w2k3Once the above settings is enabled you should be able gracefully shutdown your windows guests using virtual machine ACPI power management.