[Solved] Missing vCPUs

Discussions related to using VirtualBox on Linux hosts.
hydrian
Posts: 21
Joined: 29. Dec 2013, 23:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: CentOS, Win7, Ubuntu

[Solved] Missing vCPUs

Post by hydrian »

Ello all.
I recently upgraded(about a month ago and just noticing it now) to 5.2.8 from 5.1.28. Now one of my VMs will not use more than on vCPU. In 5.1.28, this was not an issue. This is on a six core(no SMT) machine, so it isn't host CPU limitation issue.

I use phpVirtualbox to configure my headless Linux host. I've also verifed this with vboxmanage: 'Number of CPUs: 3'.

Host: Ubuntu 16.04.4 (x86_64)
VM: Ubuntu 14.04.5 (x86_64)

Anybody have any ideas?
Last edited by hydrian on 27. Apr 2018, 04:11, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Missing vCPUs

Post by mpack »

Please post a VM log file. With the VM fully shut down, right click and "Show Log" in the GUI, save "VBox.log" (no other file) to a zip, and attach the zip here.
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: Missing vCPUs

Post by socratis »

hydrian wrote:I use phpVirtualbox
Not really supported here, they have their own support.
hydrian wrote:Now one of my VMs will not use more than on vCPU.
How do you know?
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.
hydrian
Posts: 21
Joined: 29. Dec 2013, 23:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: CentOS, Win7, Ubuntu

Re: Missing vCPUs

Post by hydrian »

socratis wrote:
hydrian wrote:I use phpVirtualbox
Not really supported here, they have their own support.
Doesn't really matter. I validated the phpVirtualbox was setting the parameters correctly via the API. Vboxmanage showvminfo showed that there we really 3 vCPUs set.
socratis wrote:
hydrian wrote:Now one of my VMs will not use more than on vCPU.
How do you know?
`cat /proc/cpuinfo' only show one CPU from within the guest VM.
hydrian@ruadan:~$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 2
model name	: AMD FX(tm)-6300 Six-Core Processor             
stepping	: 0
microcode	: 0x6000626
cpu MHz		: 3511.784
cache size	: 2048 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm rep_good nopl extd_apicid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch arat retpoline retpoline_amd vmmcall
bogomips	: 7023.56
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management:

hydrian@ruadan:~$
I'll work on getting the vbox VM logs. I'm not a network I can easily get that now.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Missing vCPUs

Post by mpack »

I'm seeing plenty of assertions here, but still not the log file requested in the first reply.
hydrian
Posts: 21
Joined: 29. Dec 2013, 23:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: CentOS, Win7, Ubuntu

Re: Missing vCPUs

Post by hydrian »

Posting log again...
Attachments
VBox.log.gz
(96.32 KiB) Downloaded 13 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Missing vCPUs

Post by mpack »

As far as I can tell the VM is working fine with 3 vCPUs :-
00:00:00.674516 PcBios: [SMP] BIOS with 3 CPUs
Which would make me think that your problem is with your guest kernel or the tools you are using.

Bear in mind that the VM is the VM regardless of which OS you install, so if the wrong number of CPUs was presented to the guest OS then we'd know it, because every guest OS would be affected - at least those using basically the same VM recipe. So this proposition fails the early logic hurdles. Ubuntu in particular is a popular choice, so I think people would have mentioned such a problem.
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: Missing vCPUs

Post by socratis »

hydrian wrote:`cat /proc/cpuinfo' only show one CPU from within the guest VM.
Do yourself a favor and insert a "Gparted", "SystemRescueCD", "Hiren's BootCD"[1], or my favorite, "Ultimate Boot CD" in that VM and boot from that. See what either or all of them have to say about the amount of CPUs in your VM.

Then start looking at what's wrong with your specific guest's configuration...


[1]: I had trouble with this one detecting a multi-CPU setup, your mileage may vary. I don't know, it may be tuned to be a non-SMP setup...
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.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Missing vCPUs

Post by andyp73 »

socratis wrote:Then start looking at what's wrong with your specific guest's configuration...
The output from:
uname -a
might give some clues.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Missing vCPUs

Post by Martin »

The AMD FX 6300 doesn't have six complete CPU cores. It is more like a 3-core with some additional hardware assistance for the six threads.
There are many discussions about declaration and counting of "real" / "physical" cores in this AMD Bulldozer / Piledriver architecture on the web.
hydrian
Posts: 21
Joined: 29. Dec 2013, 23:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: CentOS, Win7, Ubuntu

Re: Missing vCPUs

Post by hydrian »

I found the issue. When I upgraded, the configuration disabled the VM's 'O/I APIC' feature. This is required for multiple CPUs on 64bit machine.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Missing vCPUs [SOLVED]

Post by mpack »

Hmm. Well spotted, though I don't understand what upgrade procedure would have changed a VirtualBox VM setting. AFAIK VirtualBox itself never does that, that it could only happen if the VM was recreated.
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] Missing vCPUs

Post by socratis »

Bummer... We should have seen that in the logs. :shock:
Thank you for the feedback and the solution.
And thank you for marking the topic 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.
hydrian
Posts: 21
Joined: 29. Dec 2013, 23:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: CentOS, Win7, Ubuntu

Re: [Solved] Missing vCPUs

Post by hydrian »

Actually thinking about it, I think the VM was recreated because of the upgrade... unexpectedly.

When I upgraded, A skeleton of that VM was there but it had no configured vNICs, no attached storage and many of the system/processor settings were off. None of the data was lost, just detached. I probably missed enabling the I/O APIC when I rebuilt it because it just effected performance and not functionality for me.
hydrian
Posts: 21
Joined: 29. Dec 2013, 23:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: CentOS, Win7, Ubuntu

Re: [Solved] Missing vCPUs

Post by hydrian »

Sounds there should be a warning in the UI/web API warning if you are running a 64-bit OS and have CPU > 1.
Post Reply