Page 1 of 2

[Solved] Missing vCPUs

Posted: 16. Apr 2018, 14:21
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?

Re: Missing vCPUs

Posted: 16. Apr 2018, 14:23
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.

Re: Missing vCPUs

Posted: 16. Apr 2018, 14:24
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?

Re: Missing vCPUs

Posted: 18. Apr 2018, 22:53
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.

Re: Missing vCPUs

Posted: 19. Apr 2018, 09:02
by mpack
I'm seeing plenty of assertions here, but still not the log file requested in the first reply.

Re: Missing vCPUs

Posted: 19. Apr 2018, 13:39
by hydrian
Posting log again...

Re: Missing vCPUs

Posted: 19. Apr 2018, 15:08
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.

Re: Missing vCPUs

Posted: 19. Apr 2018, 15:51
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...

Re: Missing vCPUs

Posted: 19. Apr 2018, 16:14
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.

Re: Missing vCPUs

Posted: 19. Apr 2018, 22:25
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.

Re: Missing vCPUs

Posted: 27. Apr 2018, 04:11
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.

Re: Missing vCPUs [SOLVED]

Posted: 27. Apr 2018, 09:10
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.

Re: [Solved] Missing vCPUs

Posted: 27. Apr 2018, 09:10
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]... ;)

Re: [Solved] Missing vCPUs

Posted: 27. Apr 2018, 16:13
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.

Re: [Solved] Missing vCPUs

Posted: 27. Apr 2018, 16:26
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.