在 Windows 7 64 位上尝试启动 VM(Ubuntu 32 位)。尽管添加了以下内容,但我仍无法让我的虚拟机显示两个核心modify vm
我的 Vagrantfile 中的命令。我的 Vagrant 版本是 1.2.2。
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
end
有了这个 Vagrantfile,我发出vagrant up
命令。然后我发出vagrant ssh
其次是lscpu
产生:
Architecture: i686
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
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Stepping: 9
CPU MHz: 2565.513
BogoMIPS: 5131.02
L1d cache: 32K
L1d cache: 32K
L2d cache: 6144K
我认为 CPU 应该显示 2,所以我的虚拟机现在只有 1 个 CPU。如何在运行时显示 2 个 CPUlscpu
?
Add vb.customize ["modifyvm", :id, "--ioapic", "on"]
to the config.vm.provider
块在你的 Vagrantfile 中。
查看 VirtualBox文档 http://www.virtualbox.org/manual/ch03.html#settings-processor它提到:
“注意 64 位客户机操作需要启用 I/O APIC
系统,尤其是 Windows Vista;如果您想要的话,这也是必需的
在一台虚拟机中使用多个虚拟 CPU。”
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)