Hi all,
I am trying to troubleshoot a problem with an application-specific poor performance issue (actually, a game) in a Windows 7SP1 guest and an Ubuntu 20.04 host (both 64 bit). I was about to give up and chalk it up to the rare game that simply did not like being in a VM, when I noticed that the game in question requires at minimum a dual core processor. Is there a problem with increasing the number of cores on an existing guest, or do I need to build (re-install) from the ground up?
Also, my host processor has four cores. Does that mean that the VMs running concurrently can only use four virtualized cores between them (so, if I can increase the Win7 to dual cores, I can only have a second dual core or two single core VMs)?
This is my first time messing around with multiple cores in a VM, so thanks for your patience with the dumb questions! ![]()
Peace, Mongo
numvcpus = "4"
cpuid.coresPerSocket = "2"
==== this means the VM will have 2 Processors with 2 Cores each
numvcpus = "2"
cpuid.coresPerSocket = "2"
==== this means the VM will have 1 Processor with 2 Cores.
You can set this parameters in the vmx-file - while the VM is powered off (not just suspended)
GuestOS that install a single CPU-kernel or a SMP-kernel will not like if you change from
numvcpus = "1"
cpuid.coresPerSocket = "1"
to anything else.
Ulli
numvcpus = "4"
cpuid.coresPerSocket = "2"
==== this means the VM will have 2 Processors with 2 Cores each
numvcpus = "2"
cpuid.coresPerSocket = "2"
==== this means the VM will have 1 Processor with 2 Cores.
You can set this parameters in the vmx-file - while the VM is powered off (not just suspended)
GuestOS that install a single CPU-kernel or a SMP-kernel will not like if you change from
numvcpus = "1"
cpuid.coresPerSocket = "1"
to anything else.
Ulli
Thank you continuum,
I thought as much (as it is kinda the same as changing the processor on a physical box), but I was hoping that there was something about how VMs work that might allow that. At the very least, while it won't help the multi-core requirement, at least I can bump the physical memory. Then, next time I build another Windows7 VM, I will start with dual core. Thanks again!
Mongo
Did you try to start the existing VM with 2 cpus ?
I know for sure that XP and Win2k used different kernels for SMP but dont know if that still applies to win7
Ulli
Hi continuum,
I have not tried, the reason being that I tend to err on the side of extreme paranoia (in other words, I spent a lot of time and effort getting my Win7 VM configured perfectly, and I am skittish about possibly corrupting something that a snapshot cannot restore). To my understanding, snapshots keep stuff like basic hardware settings, but not something as major as, say, hardware compatibility. Can booting the Win7 VM with a different number of cores than it was built with corrupt anything with Workstation itself? Am I safe if I snapshot it first, and then if it "doesn't like it" simply restore, no harm, no foul? Thanks!
Mongo
I would just create a snapshot - edit the vmx and find out if it works.
If you want to be on the safe side just copy the complete directory before you try the change.
> Can booting the Win7 VM with a different number of cores than it was built with corrupt anything with Workstation itself?
No - worst thing that could happen is that the change triggers a hardware change that asks for reactivating Windows.
If I doubt - just zip the directory and keep the zip as a backup.
Ulli
Hi continuum,
Thank you for your expertise. I didn't think of the kernel and its relation to the hardware present when any OS is installed, so I did a little poking around. Even if the OS allowed me to change the number of cores, it may not take advantage of the additional processing power, since the installed kernel was not configured to see it at install time. I even found that there are certain features that should not be changed after installing a Windows guest (Virtual Box - APCI, I/O APIC - Removing them would be bad if they were present while installing the OS, whereas adding them after the fact would have no effect). So, just to be on the safe side, I just built a new Windows 7 VM on the side, and am slowly re-configuring it to be identical to the old one. And, yes, adding the second core solved my performance issues in the game. Thanks again for your help!
Mongo
