Search code examples
vagrant

Vagrant, how to specify the disk size?


I want to make sure that my development environment has enough free space to install tools and other stuff. I can't find any configuration option about telling to Vagrant the minimum disk size that I want. Is this possible or I need to create my own box?


Solution

  • I have used the vagrant plugin vagrant-disksize to resize the disk.

    It worked. It can also help to specify the initial disk size.

    Run the following at the command line:

    vagrant plugin install vagrant-disksize
    

    and use the following in your Vagrantfile:

    vagrant.configure('2') do |config|
        config.vm.box = 'ubuntu/xenial64'
        config.disksize.size = '50GB'
    end