I have this in my Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 2056
v.cpus = 2
end
end
I'm getting this:
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
However, these settings are listed explicitly in the vagrant documentation here: http://docs.vagrantup.com/v2/virtualbox/configuration.html
You can easily increase your VM's RAM by modifying the memory property of config. vm. provider section in your vagrant file. This allocates about 4GB of RAM to your VM.
Vagrant comes with support out of the box for VirtualBox, a free, cross-platform consumer virtualization product. The VirtualBox provider is compatible with VirtualBox versions 4.0.
In fact, this is quite common. To make this experience better, Vagrant allows specifying the default provider to use by setting the VAGRANT_DEFAULT_PROVIDER environmental variable. Just set VAGRANT_DEFAULT_PROVIDER to the provider you wish to be the default.
The first thing that I would do is check the version of Vagrant that you are using (vagrant -v
). I believe that both of those shortcuts were added in version 1.5 but, it might have been 1.6. I would recommend upgrading to the latest version, 1.6.2.
If you would like to do this in a way that will work with all versions of Vagrant, you can do by specifying those values like this:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With