VirtualBox - XP guest does not see multiple cores/multiple processors

13

11

Environment:

  • Host OS: Win7 Pro 64bit
  • Guest OS: WinXP 32bit
  • VirtualBox version: 4.1.4r74291
  • Processor: Intel Core i7 2630QM with virtualization enabled

The Problem:

I need the guest system to use multiple cores. I have enabled the following options in VirtualBox:

  • IO APIC (motherboard tab)
  • PAE/NX (processor tab)
  • VT-x/AMD-V (acceleration)
  • nested paging (acceleration)

All other options on the System submenu are switched of. The 'processors' slider is set to 8.

The problem is that the guest system runs correctly, but only one processor/core is visible.

lbednaszynski

Posted 2011-10-18T11:21:26.473

Reputation: 233

Answers

7

XP has 2 different HALs that are used for multi and single processor. If you installed XP when the virtual environment only had one processor then you may have to change the HAL or re-install.

You can find instructions on how to change the HAL on Microsoft's support site.

You'll need to select the ACPI multiprocessor option.

Matthew Steeples

Posted 2011-10-18T11:21:26.473

Reputation: 2 130

well Microsoft site says that WinXP should automatically change the HAL - my did not. Strange thing, when I checked out my device manager there were 8 processors, but in task menager I could only see 1. So I reinstalled system and tadam - everythings fine. Thanks! – lbednaszynski – 2011-10-21T19:27:06.067

24

I had a similar issue, and I stumbled on this: http://www.nforcershq.com/forum/updating-the-hal-for-multiprocessor-support-t70331.html

I downloaded the devcon utility from Microsoft and issued these commands:

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

Then I rebooted and now XP can see all 4 cores.

Make a backup of the image before starting in case the system won't boot anymore!

dawez

Posted 2011-10-18T11:21:26.473

Reputation: 501

1Short and good answer, thank you! Worked for me on two occasions. Note: I was unable to boot Win XP after doing this until I actually set up the virtual machine to have more than 1 CPU. Also, you can add more CPUs later on and they will be detected properly. – jlh – 2014-10-11T12:55:09.850

So, if I did correctly understand, after doing this hack the VM will not work anymore with 1 CPU, @jlh ? – Sopalajo de Arrierez – 2015-11-19T22:21:15.937

4This worked well for me. I got my Virtual Box VM to finally see the 2nd CPU. – CadentOrange – 2012-10-16T08:01:07.950

2Quick, easy and done on WinXP SP3. – Fiasco Labs – 2013-12-15T03:41:48.943

3

The core (pun intended) issue is that Windows XP contains two kernels: single-core and multi-core. Likely, the guest OS only detected 1-core during installation and your Windows XP guest is running on the single-core hal and kernel. Follow the directions below to enable booting with the multi-core hal and kernel.

This worked for me (VirtualBox XP Pro)...

1) Go into c:\windows (your install path), search for sp3.cab. Open this cab file with 7-zip (although explorer may be able to natively open the file, if it can't then download 7-zip from sourceforge).

2) a) Extract halmacpi.dll to c:\windows\system32

b) Extract ntkrnlmp.exe to c:\windows\system32

3) Edit c:\boot.ini

Note: You will need to uncheck the Read-only property so you can save your changes. Set back to Read-only once complete.

Copy the line that looks like this:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn

Make the copied entry look like this:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP MultiCore" /fastdetect /NoExecute=OptIn /kernel=ntkrnlmp.exe /hal=halmacpi.dll

Now you have a dual-boot option to utilize single or multicore (TaskManager will show two CPU graphs if this was successful). If multicore boots and works properly, then you can delete the single core entry from boot.ini.

James

Posted 2011-10-18T11:21:26.473

Reputation: 423