Roots Discourse

Change the default memory size of Virtualbox

trellis

#1

The virtual machine is eating my memory so I tried to change the memory size by changing the Vagrantfile in trellis folder but it seems that the changes is not working.

  # VirtualBox settings
  config.vm.provider 'virtualbox' do |vb|
    vb.name = config.vm.hostname
    vb.customize ['modifyvm', :id, '--cpus', 4]
    vb.customize ['modifyvm', :id, '--memory', 2048]
    vb.customize ['modifyvm', :id, '--ioapic', vconfig.fetch('vagrant_ioapic', 'on')]

    # Fix for slow external network connections
    vb.customize ['modifyvm', :id, '--natdnshostresolver1', vconfig.fetch('vagrant_natdnshostresolver', 'on')]
    vb.customize ['modifyvm', :id, '--natdnsproxy1', vconfig.fetch('vagrant_natdnsproxy', 'on')]
  end

I have seen that the vagrant_memory is set on 1024 but it is still making the VirtualBox with this setting:

default: [vagrant-faster] Setting CPUs: 4, Memory: 4096

couldn’t find where this default coming from


#2

As mentioned on GitHub, this is coming from the vagrant-faster plugin which you’re using.