我创建并配置了具有 8 个 CPU 的虚拟机(在具有 48 个 CPU 的服务器上)。vboxmanage showvminfo
输出如下:
Memory size: 40960MB
Page Fusion: off
VRAM size: 8MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 8
PAE: on
Long Mode: on
CPUID Portability Level: 0
When i login to vm, and use command `nproc` the output is 1.
输出也是cat /proc/cpuinfo
:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
stepping : 2
cpu MHz : 2495.836
cache size : 30720 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 15
uname -a
输出:
Linux node1.cluster 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
lscpu
输出:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Stepping: 2
CPU MHz: 2495.836
BogoMIPS: 4991.67
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0
情况就是这样吗?或者我做错了什么?
答案1
找到问题了。
我忘记为打算在 64 位模式下使用的虚拟机启用 I/O APIC。
vboxmanage modifyvm "Node1" --ioapic on
解决了问题。我的错。