Apr 032013

Windows XP - Advanced Configuration and Power Interface (ACPI) PCI used to have physical machine running XP that could not be upgraded (don’t let me start about reasons… :/). Since having old machine around gets annoying quite quickly, I used Sysinternals disk2vhd in order to have it work in VirtualBox. And it worked flawlessly. Or so I thought.

Few days ago I tried to run a bit higher load on this virtual machine and I was surprised to learn that only single processor was used regardless of two virtual ones that were available. Task manager simply reported one processor while it was clear from Device Manager that there were two available. This curiosity probably had lot to do with detected Advanced Configuration and Power Interface (ACPI) PC which actually has no multiprocessor support.

When I checked boot.ini its content was:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /KERNEL=ntkrpuni.exe /HAL=halacpi.dll

Notice how there uniprocessor HAL is forced by using /KERNEL=ntkrpuni.exe /HAL=halacpi.dll. This happens when you use disk2vhd to do physical to virtual conversion. In order to make it more compatible, it will restrict it to single processor. To have any chance of detecting second processor you must remove both /KERNEL and /HAL arguments completely.

Next step is to actually replace HAL. Official way of doing this is Windows recovery but there is also a possibility of using devcon.exe command-line tool. Its example code page lists Forcibly update the HAL as example 44. This sounds exactly as something we would need.

Procedure is simple:

> devcon sethwid @ROOT\ACPI_HAL\0000 := +acpiapic_mp !acpipic_up
ROOT\ACPI_HAL\0000 : acpiapic_mp
Modified 1 hardware ID(s).

> devcon update c:\WINDOWS\inf\hal.inf acpiapic_mp
Updating drivers for acpiapic_mp from c:\WINDOWS\inf\hal.inf.
Drivers updated successfully.

If everything went ok, you will need to restart. And then restart once more when asked to. After second boot your Windows XP system will (hopefully) use both processors.

PS: If you ever want to get back to using single processor, it is even simpler – just re-add /KERNEL=ntkrpuni.exe /HAL=halacpi.dll to your boot.ini entry.

PPS: Do not forget to backup your virtual machine before doing this stuff.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>