我的Vagrantfile中有这个:
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 2056
v.cpus = 2
end
end
我得到这个:
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
但是,这些设置在以下版本的vagrant文档中明确列出:http : //docs.vagrantup.com/v2/virtualbox/configuration.html
我要做的第一件事是检查您正在使用的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
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句