Change the default memory size of Virtualbox

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| = 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')]

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

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

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.