Skip to content

Instantly share code, notes, and snippets.

@pjullah
Last active April 24, 2017 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjullah/8820423d2ca50725b81b to your computer and use it in GitHub Desktop.
Save pjullah/8820423d2ca50725b81b to your computer and use it in GitHub Desktop.
Vagrant Disk Sizing
# On host
$ cd ~/VirtualBox\ VMs/<vm>
$ VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi
$ VBoxManage modifyhd "clone-disk1.vdi" --resize 50000
$ VBoxManage storageattach $(pwd | cut -d "/" -f5-) --storagectl "SATA" --port 0 --device 0 --type hdd --medium clone-disk1.vdi
# On VM
$ vagrant up
$ vagrant ssh
$ sudo su -
$ fdisk /dev/sda
$ partprobe
$ pvcreate /dev/sda3
$ vgextend centos /dev/sda3
$ lvextend -l +100%FREE /dev/mapper/centos-root
$ xfs_growfs /dev/centos/root # CentOS 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment