Search code examples
vagrantvirtualboxvagrant-windows

Can I edit a Vagrant box configuration before loading it, specifically the box hard drive space?


We have some pre-made Vagrant environments in our office, but one I want to use will create an 80GB partition (and take up way too much of my local HDD space).

Is there an easy way to edit that configuration before loading the box in Vagrant? The virtual disk type is VMDK which makes it much harder to resize the partition using VBoxManage modifyhd.


Solution

  • I remember I saw some notes about doing all the commands in a shell provision. I would prefer to do:

    • ideally, create a new box with packer and define the HDD size
    • make the change about the HDD size in your vagrant box and then repackage the box