in Blog

Setting memory of Vagrant box

When constructing a new Vagrantfile for the brilliant tool vagrant, I had quite some trouble finding the configuration setting which sets the amount of memory. I found an old variant first:

config.vm.customize do |vm|
 vm.memory_size = 800
 end

Turns out this syntax has changed at some point, at least after version 0.9.99.1 it is now:

config.vm.customize ["modifyvm", :id, "--memory", "800"]

This has worked on my machine (vagrant 1.0.3). Thanks to “miketheman” and his post to the Google Group.