Windows XP Mode in virtualBox

In order to run Windows XP under virtualBox, I did the following:

Firstly, in order to activate the XP Mode VM in virtualBox, I set HKLM\SOFTWARE\Microsoft\Windows NT\WPAEvents\CurrentVersion\WPAEvents\OOBETimer to FF D5 71 D6 8B 6A 8D 6F D5 33 93 FD and then denied SYSTEM's permission to the WPAEvents key.

To check activation, run %systemroot%\system32\oobe\msoobe.exe /a. Bad idea, grace period (a.k.a. time bomb) still expires this way and can be reset at most 4 times using rundll32.exe syssetup,SetupOobeBnk.

Although both processors show up in Device Manager, they don't show up in Task Manager. The "Computer" tab does not show a multiprocessor ACPI. In order to allow multiple processors to be used inside the VM, I have to install the multiprocessor HAL halmacpi.dll and kernel ntkrnlmp.exe. I find those files in sp3.cab and copied them to %systemroot%\system32. Then I added the options /kernel=ntkrnlmp.exe /hal=halmacpi.dll to the last line in \boot.ini and rebooted. Edit \boot.ini by selecting Startup and Recovery Settings from the System Properties "Advanced" tab.

After rebooting, new hardware is detected and both processors now show up in Task Manager.

Finally, it's a good idea to turn off the login window by running control userpasswords2 and clearing the "users must enter a user name and password" tick box.

VirtualBox gets upset about screen resolution

I've just spent considerable time trying to get a Fedora 12 (beta) VirtualBox guest running (on a Windows 7 host). The guest was working perfectly before, and when I shut it down it was running in seamless mode. Apparently this was a bad idea.

When trying to boot the guest, I got the normal splash screen, but instead of the login window I just got a black screen with a blinking cursor in the corner. When I logged in on another virtual terminal, I found the following messages in the X log file:

[...]
(II) VBoxVideo(0): Not using built-in mode "1920x1170" (unknown reason)
(II) VBoxVideo(0): No remaining probed modes for output VBOX1
(II) VBoxVideo(0): Output VBOX1 connected
(WW) VBoxVideo(0): Unable to find initial modes
(EE) VBoxVideo(0): Output VBOX1 enabled but has no modes
(EE) VBoxVideo(0): Initial CRTC configuration failed!
(II) UnloadModule: "vboxvideo"
[...]
This indicated that the driver was unhappy with the desired resolution for an increadibly helpful "unknown reason". Apparently, attempting to set the resolution used in seamless mode was failing, possibly because it was too high for windowed mode.

As it turns out, VirtualBox stores the last resolution in the machine description file in the guest property /VirtualBox/GuestAdd/Vbgl/Video/SavedMode:

$ VBoxManage guestproperty get Fedora /VirtualBox/GuestAdd/Vbgl/Video/SavedMode
VirtualBox Command Line Management Interface Version 3.0.8
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Value: 1920x1170x32

After spotting this, the fix was reasonably straight-forward:

$ VBoxManage guestproperty set Fedora /VirtualBox/GuestAdd/Vbgl/Video/SavedMode 800x600x32
fixed the problem.