[Solved] Adding 1 more CPU core to a Virtual Machine

Discussions about using Windows guests in VirtualBox.
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

[Solved] Adding 1 more CPU core to a Virtual Machine

Post by WeirdSystem »

I'd like to ask a question about adding 1 more CPU core to a Virtual Machine. You see, I have a VM emulating WinXP in a Win7 Host . During installation I set the VM to have 1 CPU core. However now I want to add 1 more core to this machine. My physical processor has 6 cores (or 12 virtual) and therefore I can afford 1 more core to the VM.
So I went to Options > tab System > tab Processor, and there I increased the number of cores from 1 to 2.
When I did this, at the bottom of the dialog box appeared a message saying:
Invalid Settings detected. The I/O APIC feature is not currently enabled in the Motherboard section of the System page. This is needed to support more that one virtual processor. It will be enabled automatically if you confirm your changes.
Before confirming this change, I took care to go to the Motherboard tab to see what is the above mentioned setting. Indeed there was a check box called: "Enabled I/O APIC". However, hovering the mouse over that check box there appears a tool tip saying:
When checked, the virtual machine will support the Input Output APIC, which might slightly decrease performance. NOTE : don't disable this feature after having installed a Windows guest operating system!
So what should I do now? Can I activate this option? The way I see it, I can because I am not going to Disable it, but to Enable it. However, in the manual it says that turning it on after installation of the Windows Guest OS won't have an effect...

I don't know; this might be simple, but I am afraid to do something, because I don't want to break my sweet VM I just built. That's why I am asking you before doing anything.
Last edited by WeirdSystem on 22. Dec 2017, 09:47, edited 3 times in total.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Adding 1 CPU more core to a Virtual Machine

Post by BillG »

If you want 2 CPUs, what do you have to lose by trying it? If you do not try that, your only option to get 2 CPUs in the guest is to create a new one with 2 CPUs anyway.

This is a Windows XP restriction.

https://support.microsoft.com/en-us/hel ... 2003-setup
Bill
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

Re: Adding 1 CPU more core to a Virtual Machine

Post by WeirdSystem »

Alright then. I guess I'll increase the number of CPUs. You, however, better have a good lawyer mister, because if this does not work, I am going to sue you! Don't worry, I am just kidding! :)
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

Re: Adding 1 CPU more core to a Virtual Machine

Post by WeirdSystem »

Well I changed the two options, but I still have only 1 core... Oh well; I guess I'll have to install Windows again...
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Adding 1 CPU more core to a Virtual Machine

Post by BillG »

And what happens if you try to increase the number of cores now? I have 4.
XPCPU.PNG
DeviceM.PNG
Bill
pt58
Posts: 52
Joined: 7. May 2015, 11:00

Re: Adding 1 CPU more core to a Virtual Machine

Post by pt58 »

WeirdSystem wrote:Well I changed the two options, but I still have only 1 core... Oh well; I guess I'll have to install Windows again...
Maybe a bit late now, but there is a Virtualbox thread discussing how to change the Windows XP HAL from single to multiprocessor using a utility called Halu:

viewtopic.php?f=1&t=24823&hilit=halu&start=15#p111502
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Adding 1 CPU more core to a Virtual Machine

Post by socratis »

BillG wrote:I have 4.
But BillG, you installed WinXP with I/O APIC already enabled. That forced the installation of the "ACPI Multiprocessor PC" HAL. Just right-click on your "computer" (WinXP guest) » Properties » Hardware » Device Manager » expand the Computer. See what it says...
WeirdSystem wrote:I guess I'll have to install Windows again...
Well, according to the MS article 309283 "HAL options after Windows XP or Windows Server 2003 Setup":
Device Manager does not permit the change from a Non-ACPI HAL to an ACPI HAL. You must use a new install of Windows XP or Windows Server 2003 for this kind of change. Change from an ACPI HAL to a Non-ACPI HAL only for troubleshooting purposes.
But, I found a couple of references (after a quick search), which say that the re-installation can be avoided. I have tried none of the following:
  • A reference to "HALu.zip" in the "Is dual core CPU the same as 2 CPUs in VirtualBox?" thread. A search on the webs claims that "HALu" is a wrapper around a Microsoft program, called "DevCon", part of the Windows Driver Kit (or WDK for short). The XP version is available all the way to the bottom of the page. These are downloads from Microsoft, if you don't trust the HALu.zip, but I assume that you've got to study how to use DevCon...
  • There is another solution that has been reported to work in several places (just search for the command below). It involves running the command:
    • rundll32 syssetup,SetupInfObjectInstallAction ACPIAPIC_MP_HAL 128 %windir%\inf\hal.inf
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

Re: Adding 1 CPU more core to a Virtual Machine

Post by WeirdSystem »

Oh Jesus ; this looks like Linear A to me and I haven't mastered B yet ! I think I'll go by the standard way ! Thanks for attending to this though !
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

Re: Adding 1 CPU more core to a Virtual Machine

Post by WeirdSystem »

I come back to ask something :
Since I am about to re-setup a VM machine eitherway , I think I have nothing to lose trying the command you told me :
rundll32 syssetup,SetupInfObjectInstallAction ACPIAPIC_MP_HAL 128 %windir%\inf\hal.inf
So in order to so , let me ask :
- Before running the above command I think I should take care to : a) enable the I/O APIC option and b) increase the number of cores, Right ? I mean not : after running the command . I know it might sound silly , but I just want to make sure about the order !
- Running the above command is enough or do I have to do anything else too ? At least from what I read on the web I will be asked to reboot twice and that's all .

By the way , I read some posts saying that after this modification the system became a little slower rather than faster ! Anyway , since this will an experiment , it won't matter .
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Adding 1 CPU more core to a Virtual Machine

Post by socratis »

Let me start by reminding you what I said earlier:
socratis wrote:I have tried none of the following
But, I would expect to enable the I/O APIC and the multiple CPUs before the change.
On the other hand, if it crashes, do it afterwards...


PS. For some reason, this "certainty" of my response reminded me of an ancient Greek phrase: "Ήξεις αφήξεις ουκ εν πολέμω θνήξεις", which I found that it is of Latin origin: Ibis redibis nunquam per bella peribis. This can be translated in two ways (because of the lack of a comma) as either 1) "you will go you will return, never in war will you perish" or 2) "you will go you will return never, in war you will perish". ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

Re: Adding 1 CPU more core to a Virtual Machine

Post by WeirdSystem »

I can't understand the 2nd meaning. The "ουκ" must before the verb in order to form the negative, not after.
I always thought that the second verb was used to express the difference by using the same verb but with the addition of a contrast. Resulting in something like: whether you go or stay, take car so as not to die during the war. However the 1st translation you proposed seems to me the best one.

Now, as far as concerning the "experiment": Well... it actually worked. I now have 2 cores. What I don't know, however, is how faster the system got. Anyway, it does look a little faster now.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Adding 1 CPU more core to a Virtual Machine

Post by socratis »

<OffTopic>
  • WeirdSystem wrote:I can't understand the 2nd meaning. The "ουκ" must before the verb in order to form the negative, not after.
    Let me try a more of a word-for-word translation. I have to include the "you", "you'll" part in the English translation, because in Greek and in Latin the grammatical person and tense are included in the word itself. I've also included punctuation and capitalization to make it easier to see the differences, because both were also missing from ancient scripts. Plus, you got to think a little bit like... Yoda™:
    Ήξεις       αφήξεις         ουκ       εν  πολέμω  θνήξεις
    Ibis        redibis         nunquam   per bella   peribis
    You'll go.  You'll return.  Not       in  war     you die.
    You'll go.  You'll return   not.      In  war     you die.
    But I digress, back on track. I'm not a linguist after all... ;)
</OffTopic>

WeirdSystem wrote:What I don't know, however, is how faster the system got. Anyway, it does look a little faster now.
I'm not sure what speed improvements you were expecting to see or not, but you got to remember that WinXP came out in an era when 2 or more CPUs were not that common in a computer. And there is always a penalty in coordinating and keeping track of multiple resources. That's why there were multiple HALs for single/multiple, ACPI on/off situations.

Keep an eye on the system, as Microsoft is not officially sanctioning the practice. They mainly talk about driver and PlugAndPlay issues... Otherwise we could mark this as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
WeirdSystem
Posts: 34
Joined: 8. Dec 2017, 10:17

Re: Adding 1 CPU more core to a Virtual Machine

Post by WeirdSystem »

Although the reversing of words - in order to emphasize something - is something that takes place in Greek for millennia , I have never seen a reversing of the negative ( αφίξεις ουκ instead of ουκ αφίξεις) . That's why I said I don't understand the 2nd translation . I am not saying that it must not be - afterall I am not a philologist (at least not by the meaning of the profession ! ) ; I just express my opinion . On the other hand , I don't know how this goes in Latin because I never tried to delve into Latin despite my mother language being one derived from Latin . I did something else , though ; I learned Greek . And I never regretted that ! Anyway , if the reversing of the negative indeed could take place , I'd like to find it out because it could be useful to me to know that !

As far as concerning the speed , I had in mind only one program (all others seem to run fast enough) . This program now seems to take a little bit less time for making its calculations while at the same when I look at the ALT+CTRL+DEL dialog box I see that it no longer stresses the core(s) to 100% for so long as it did before . However I believe that I'll never know for sure unless I make a 2-core VM from scratch and compare them !
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Solved] Adding 1 more CPU core to a Virtual Machine

Post by mpack »

I have successfully changed XP HALs in the past without using Device Manager.

viewtopic.php?f=2&t=27494#p122752

(See HALu link).
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Adding 1 more CPU core to a Virtual Machine

Post by socratis »

A couple of things. First, Greek! Really? You learned Greek? You're a masochist or something? :D :lol:
Anyway, just for the use and location of "ούκ", remember that this is in ancient Greek. Just compare it with the famous response that someone got, when they asked Pythia in Delphi whether their wife would have a boy or a girl. The answer was "άρρεν ου θήλυ" (boy not girl). Can you tell (in the absence of a comma) what was the child? ;) If you want more "gems" like that, send me a PM, I don't think that everyone is into Greek :D

About the speed... If we're talking about numerical calculations, and the program is written with multiple threads/CPUs in mind, you will most definitely see a benefit. The more, the merrier! Take a quick look at a graph that I did a long time ago with a number crunching program, οn a WinXP VM: download/file.php?id=19736. That was done on a 4CPU/8thread computer. You could then go overboard with the virtual CPUs, but no more.

@mpack
Thanks for confirming that the "HALu" method works. I had included it as one of the potential two solutions, I never tried it myself. So now we know that there are two valid ways to include more CPUs, after the VM is installed. Cool...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply