Last active
April 24, 2017 15:33
-
-
Save pjullah/8820423d2ca50725b81b to your computer and use it in GitHub Desktop.
Vagrant Disk Sizing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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