How to Add New Disk in Vagrant

This article will explain you how to add new disk in virtual machine have provisioned with Vagrant. Follow the steps below:

add new disk in vagrant
Vagrant

1 – Export default Environment Variable

$ export VAGRANT_EXPERIMENTAL="disks"

2 – Edit Vagrantfile

Add this syntax to your vagrant configuration file:

    config.vm.define "dblab#{i}" do |node|
            ...
            node.vm.disk :disk, size: "50GB", name: "extra_storage"
        end

3 – Reload

$ vagrant reload

6 thoughts on “How to Add New Disk in Vagrant”

Leave a Reply