Introduction
NOTE!! Update July 2009:
- Information on this page is very outdated! It is only valid for old Xen versions 3.0.x.
- Xen 3.1.x and newer versions support ACPI properly, and Windows works with ACPI enabled.
One of the big problems of Windows XP under Xen is that Windows Setup chokes on Xen's ACPI, and thus you have to disable ACPI for Windows Setup to work. This results in the installed Windows XP being unable to shut itself down fully (Windows ends up on the 'it is safe to turn off your computer' screen, but the virtual machine is not automatically destroyed).
Summary
We fix Windows XP's inability to shut down the VM properly by manipilating the VM during Windows Setup so that it installs ACPI drivers, despite the fact that Xen's current ACPI implementation seems to cause Windows Setup to choke or stall.
Outline
- Use virt-install to help you create the HVM configuration file to install Windows
- Cancel the installation and tweak the configuration so that the first step of Windows Setup doesn't stall (ie: disable ACPI)
- Run the first part of Windows Setup (the text-based user interface that you see until it reboots)
- Before allowing Windows Setup to get into the graphics part of the install, tweak the configuration so that the ACPI drivers will be installed (ie: re-enable ACPI)
- Complete the installation of Windows
If this worked, you can now connect to the Window guest and have it shut down properly so that Xen cleans up the VM afterwards.
Example
For an example of this procedure, have a look at HowToXenWindowsOnCentOS5.
More information
There is still the problem of Xen triggering a clean shutdown of Windows (eg: xm shutdown virtualmachine), but we can still script this action with the use of something like PowerOff3.
