Jos*_*kin 5 virtualbox vagrant
我在我的Vagrantfile中有这个:
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 2056
v.cpus = 2
end
end
Run Code Online (Sandbox Code Playgroud)
我明白了:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
VirtualBox:
* The following settings don't exist: cpus, memory
Run Code Online (Sandbox Code Playgroud)
但是,这些设置在此处的vagrant文档中明确列出:http://docs.vagrantup.com/v2/virtualbox/configuration.html
小智 8
我要做的第一件事是检查你正在使用的Vagrant版本(vagrant -v).我相信这两个快捷方式都是在1.5版本中添加的,但它可能是1.6.我建议升级到最新版本1.6.2.
如果您希望以适用于所有Vagrant版本的方式执行此操作,则可以通过指定以下值来执行此操作:
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", "2048"]
v.customize ["modifyvm", :id, "--cpus", "2"]
end
end
Run Code Online (Sandbox Code Playgroud)