I installed my guest Winxp Sp3 in a 2 cores machine. Can I use the VDI in another virtual box machine exposing a different # of cores? Sometimes, I'm running vbox on a PC with its hardware virtualization disabled by the password protected BIOS (and I'm not authorized to change the BIOS setting), hence there is a single core only. Sometimes, I can access another quad core machine with hw virtualization enabled, hence I can have quad cores.
Not sure if there are any issues in changing the # of CPU exposed to WinXp since I'm having an impression that different version of the Windowa kernel is used for different # of cores.
(my host is Win7, but this shouldn't relevant)
Using WinXp Guest in Another vbox with Different # of CPU
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using WinXp Guest in Another vbox with Different # of CP
As far as VirtualBox is concerned, yes you can change the number of cores assigned to the VM, provided the host supports VT-x or AMD-v.
As far as your XP guest is concerned, that depends on what version of XP was installed. You need to have installed the multiprocessor HAL before XP will recognize multiple processors. If you know what you're doing (or you do some research) then it is also possible to change the HAL of an existing XP installation.
In addition, the CPU type counts heavily in XP activation. If your XP installation is of a type that requires activation (i.e. retail XP) then it will most likely need to be reactivated after a CPU change.
Finally: I would try to dissuade you from providing more cores to a VM than it needs. Users often naively assume that performance is proportional to the number of cores, when quite often the opposite is true (i.e. performances goes down).
As far as your XP guest is concerned, that depends on what version of XP was installed. You need to have installed the multiprocessor HAL before XP will recognize multiple processors. If you know what you're doing (or you do some research) then it is also possible to change the HAL of an existing XP installation.
In addition, the CPU type counts heavily in XP activation. If your XP installation is of a type that requires activation (i.e. retail XP) then it will most likely need to be reactivated after a CPU change.
Finally: I would try to dissuade you from providing more cores to a VM than it needs. Users often naively assume that performance is proportional to the number of cores, when quite often the opposite is true (i.e. performances goes down).
Re: Using WinXp Guest in Another vbox with Different # of CP
why is it so?mpack wrote:Finally: I would try to dissuade you from providing more cores to a VM than it needs. Users often naively assume that performance is proportional to the number of cores, when quite often the opposite is true (i.e. performances goes down).
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using WinXp Guest in Another vbox with Different # of CP
Because every core added to the VM creates extra overhead which is not compensated by extra performance unless the guest application is specifically designed to use additional CPUs. Applications have to be written to use X CPUs: the programmer has to decide to run this function on that core, this other function on that other core, etc. For most apps X is 1, because that makes them compatible with all PCs plus is easier for the programmer to think about. The notion that you can automatically get extra performance by adding CPUs is a mostly a marketing scam aimed at unsuspecting users in order to sell this years PCs: which for most people will perform no better than last years.
The analogy I like to use is: plonking a second engine in the boot of your car (not connected to anything) conceptually doubles the horsepower available. Does it double the car's speed? The PC manufacturer lets you believe that the answer is yes.
The analogy I like to use is: plonking a second engine in the boot of your car (not connected to anything) conceptually doubles the horsepower available. Does it double the car's speed? The PC manufacturer lets you believe that the answer is yes.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Using WinXp Guest in Another vbox with Different # of CP
I would like a note to what mpack said: While he is totally right in saying a single application has to be designed to use multi core, it might use a framework that does it directly.
Another note is that the guest OS WILLtake advantage of several CPUs to run the different processes (if it was installed when the VM was configured with more than one CPU that is)
So having more than one CPUs tends to give some breathing rooms for modern OS with their douzens background processes doing coffee and what not.
Mpack is also right in the activation bit - don't mess with CPU settings for a Windows guest, it's usually not a good idea.
At the end of the day, it all depends what you will run in the guest OS : if you plan on running a single regular non-cpu intensive application (like a browser), single cpu is enough for the guest.
To answer the technical part of your question: There is no problem changing the number of CPUs in the VM config prior running it in the different hosts, from VirtualBox point of view.
The guest OS might complain. Linux-based will be fine, Windows should be fine if you put the activation bit aside.
All this with the condition that the guest OS was installed when the VM was configured to use more than one CPU.
Another note is that the guest OS WILLtake advantage of several CPUs to run the different processes (if it was installed when the VM was configured with more than one CPU that is)
So having more than one CPUs tends to give some breathing rooms for modern OS with their douzens background processes doing coffee and what not.
Mpack is also right in the activation bit - don't mess with CPU settings for a Windows guest, it's usually not a good idea.
At the end of the day, it all depends what you will run in the guest OS : if you plan on running a single regular non-cpu intensive application (like a browser), single cpu is enough for the guest.
To answer the technical part of your question: There is no problem changing the number of CPUs in the VM config prior running it in the different hosts, from VirtualBox point of view.
The guest OS might complain. Linux-based will be fine, Windows should be fine if you put the activation bit aside.
All this with the condition that the guest OS was installed when the VM was configured to use more than one CPU.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using WinXp Guest in Another vbox with Different # of CP
That's true. A modern OS will make use of multiple cores, e.g. a good use might be one core for background processes (though in fact it probably only uses a fraction of that core), and then one core per app.noteirak wrote:So having more than one CPUs tends to give some breathing rooms for modern OS with their douzens background processes
What I was countering was the assumption (no caveats) that throwing more CPUs at a problem inevitably improves performance. In the common case of a single CPU bound app running in a VM, in most cases there will be no additional benefit for X>2, in fact for a VM this will result in a loss of performance. If the VM is not CPU bound then extra cores doesn't help at all, and always causes a loss of performance in a VM.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Using WinXp Guest in Another vbox with Different # of CP
As I said earlier, fully agree with you.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
martyscholes
- Posts: 202
- Joined: 11. Sep 2011, 00:24
- Primary OS: Solaris
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances
Re: Using WinXp Guest in Another vbox with Different # of CP
This is especially true when there are multiple sockets.AsusUser wrote:why is it so?mpack wrote:Finally: I would try to dissuade you from providing more cores to a VM than it needs. Users often naively assume that performance is proportional to the number of cores, when quite often the opposite is true (i.e. performances goes down).
viewtopic.php?f=3&t=64268&p=304695