The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140329-VMware-vSphere-Client-4.1-retry-with-compatibility-settings

    20140329-VMware-vSphere-Client-4.1-refuses-to-install-on-Windows-8.x-Requires-XP-SP2-and-up

    2014-03-06_0853-upright

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,250 other followers

Windows XP: changing the HAL to support multiple cores (actually: two CPUs)

Posted by Jeroen Pluimers on 2010/10/14

A while ago, I moved a single CPU Windows XP VM from VMware Workstation to ESXi 4.1 using the standalone VMware vCenter converter.
In ESXi, I increased the CPU count from 1 to 2, and wanting to to for 4 (since  I had been running Windows on a quadcore CPU before).

Well, that turned out to be harder than I thought…

Trying to get XP to run on 4 cores in a VM

The conversion went all right, except for one thing:
the VM would recognize 2 CPUs in the Device Manager, but only 1 in the Task Manager.

While researching this, sometimes during a boot, I was getting a “STOP 0x0000007f (0×00000000, 0×00000000, 0×00000000, 0×00000000)“.
Fixing that was easy:

  1. Shut down the VM
  2. Switch the CPU count of the VM in ESXi to 1
  3. Boot the VM in safe mode
  4. Reboot the VM in normal mode
  5. Shutdown the VM
  6. Switch the CPU count of the VM in ESXi to 2
  7. Boot the VM in safe mode
  8. Reboot the VM in normal mode

Most of the times, you can skip the “safe mode” reboot, but irregularly it is needed.
Better “safe” than sorry :-)

Lets have XP use the 2 cores

Having XP now booting with 2 CPU cores is promising.
The Device Manager correctly showed the 2 CPU cores.
But the Task Manager only showed one.

I went through the usual hoopla of making sure I have this ‘show 1 graph per CPU‘, but I already had that setting right.

The problem was the HAL.
The Device Manager showed the wrong HAL type:
it was “Advanced Configuration and Power Interface (ACPI) PC”  in stead of “ACPI Multiprocessor PC”.
This is because the machine started as a single CPU machine, for which the standard ACPI HAL is sufficient.

Though

For changing the HAL, Microsoft recommends an in-place reinstall of Windows.
I have done that before because of broken drivers, usually with bad results.

So I looked for a way to do this from within the Device Manager, which turns out to be impossible.
That page however, is the best I could find on changing the HAL, and points to “Problems updating to a dualcore CPU Not anymore“, which is an invalid URL because  www.hardware.info just reorganized their site and broke the existing links.

Google to the rescue:  the cache of that page, had a link to HALu-0.2.0.zip. That link was invalid too, but searching for HALu-0.2.0.zip revealed a few download locations, for instance in this virtual box forum thread.

HALu is a wrapper around devcon.exe, which is a command-line interface to the same underlying layer as the Device Manager is a GUI interface to.
You can download the complete devcon package from the Microsoft site.
After having found out about devcon, it appears that HALu is doing the same as this HAL_update.bat batch file on Mike Laverick’s RTFM Education site.
Mike explains this in much more detail (including upgrading from non ACPI systems) in this PDF.

Back to HALu: it is dead easy to use:

  1. Run it
  2. Select the “ACPI Multiprocessor PC” HAL
  3. Let it install
  4. Reboot (sometimes it needs to reboot twice)
  5. Check if Task Manager shows 2 CPUs
  6. Done

Having all the right keywords (devcon, ACPI, etc), I found other posts explaining how to do the multi-core HAL switch: there are many of them if you know what to search for :-)

If HALu doesn’t cut it, you can use this batch file from the “updating the HAL for multiprocessor support” message:

devcon sethwid @ROOT\ACPI_HAL\0000 := +acpiapic_mp !acpiapic_up
devcon update c:\windows\inf\hal.inf acpiapic_mp

Make sure you have devcon.exe and he above batchfile in the same directory.

Now I had a 2 core system, but wanted a 4 core system.

So I shut down the VM, bumped up the CPU count in the ESXi management interface to 4, then rebooted.
Device Manager showed 4 cores, but task manager only 2.

After a long search most of the results were forum postings.

A more official document is the Microsoft Windows XP Professional EULA. It indicates the maximum number of (apparently physical processors) is 2.
Similar for the Microsoft Windows XP Home EULA: it indicates a maximum of 1 processor.
There are similar documents for other versions and editions of Windows

Since VMware cannot simulate hyperthreaded cores or multi-core processors, you are stuck with a maximum of 2 virtual CPUs, each having one core.

Conclusion

  • Non-sever versions of Windows only support 2 physical CPUs.
    There are not many places to find this, the Windows XP EULA section “Installation and use” hints this.
  • Virtualization tools provide CPUs, not cores.
    So the maximum core count inside such non-server version of Windows is 2.
  • In order for Windows XP to support multiple CPUs, you will need a

–jeroen

3 Responses to “Windows XP: changing the HAL to support multiple cores (actually: two CPUs)”

  1. [...] solved!Change your ESXi machine's network hostname, DNS information (and SSL certificate)Windows XP: changing the HAL to support multiple cores (actually: two CPUs)Delphi operator overloading: table of operators, names, and some notes on usage and 'glitches'VMware [...]

  2. Lansett said

    Great! You made my day.
    Thanks a lot.

  3. Grzegorz said

    The batchfile method worked for me, big thank you! :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 1,250 other followers

%d bloggers like this: