6

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

1 Answer 1

9

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
2
  • 1
    Yeah, memory was added in 1.4, cpus in 1.5.
    – tmatilai
    Commented May 21, 2014 at 19:23
  • This was my exact issue - using an earlier version of Vagrant. Commented Aug 4, 2014 at 20:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.