

Instead of adding a disk, other options include:

This script is for a centos 6.4 box, but could easily be adapted to ubuntu. Sudo fdisk -u /dev/sdb /etc/disk_added_date Where the add_new_disk.sh shell script looks like this: set -e For example, use resize2fs -p -F DEVICE for ext."Ĭonfig.vm.provision "shell", path: "scripts/add_new_disk.sh" However this only changes the drive capacity, you will have to expand the file system for the guest afterwards. Resize it using VBoxManage modifyhd box.vdi -resize 15360 which increases the capacity to 15GB. VBoxManage clonehd in.vmdk out.vdi -format VDI and then re-attached it (using the GUI is easier). To be able to resize the HDD, you'll have to convert it to VDI first, e.g. To increase the capacity of disk for Vagrant Base Box This currently works only for VDI and VHD formats, and only for the dynamically allocated variants, and can only be used to expand (not shrink) the capacity. The -resize x option (where x is the desired new total space in megabytes) allows you to change the capacity of an existing image this adjusts the logical size of a virtual disk without affecting the physical size much. However, vagrant base boxes are basically exported OVF/OVA using VMDK format. Reason why: VBoxManage modifyhd only works with native VDI image. As for the specific steps, you can find them online.Personally I think it'll be easier to attach an extra virtual HDD and mount it to a proper mount point, for example /opt and move your stuff over using rsync to work around this issue, after all, puppet vagrant boxes are for testing purposes. I looked for some information and find 3 ways offered by people: using GParted tool may be the easiest way using lvextend -L command if LVM is enabled or using resize2fs command. If your VM is using Linux OS, the partition resizing process is very complicated, I recommend you to back up data in advance. If there is no unallocated space behind the drive you want to extend, you can use MiniTool Partition Wizard to extend the drive for free. Please note that this feature is available only if there is unallocated space behind the partition.
VIRTUALBOX INCREASE DISK SIZE WINDOWS

VIRTUALBOX INCREASE DISK SIZE HOW TO
Read More How to Increase VirtualBox Disk Size?
