Last active
July 6, 2022 06:09
-
-
Save jj-meyer/a9d878b004542e825b47 to your computer and use it in GitHub Desktop.
Revisions
-
jj-meyer revised this gist
Aug 28, 2015 . 1 changed file with 14 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -30,19 +30,22 @@ sudo su - ``` ```bash fdisk /dev/sda #[ #Press p to print the partition table to identify the number of partitions. By default there are two - sda1 and sda2. #Press n to create a new primary partition. #Press p for primary. #Press 3 for the partition number, depending the output of the partition table print. #Press Enter two times to accept the default First and Last cylinder. #Press t to change the system's partition ID #Press 3 to select the newly creation partition #Type 8e to change the Hex Code of the partition for Linux LVM #Press w to write the changes to the partition table. #Press q to quit #] partprobe fdisk /dev/sda #[ p q ] reboot ``` @@ -51,7 +54,7 @@ vagrant ssh sudo su - fdisk /dev/sda #[ p q ] ``` ```bash -
jj-meyer revised this gist
Aug 28, 2015 . 1 changed file with 13 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,23 +8,27 @@ vagrant box add homestead_100gb ../boxes/homestead.box cd .. mkdir homestead_100gb vagrant init # or copy VagrantFile from somewhere else and change config.vm.box to "homestead_100gb" vagrant up # to confirm that it works vagrant destroy ``` ## Resize the .vmdk image ```bash cd ~/.vagrant.d/boxes/homestead_100gb/0/virtualbox VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi VBoxManage modifyhd "clone-disk1.vdi" --resize 102400 VBoxManage showhdinfo "clone-disk1.vdi" VBoxManage clonehd "clone-disk1.vdi" "box-disk1.vmdk" --format vmdk mv box-disk2.vmdk box-disk1.vmdk rm clone-disk1.vdi ``` ## Resize the physical partitions on the virtual machine ```bash vagrant up vagrant ssh sudo su - ``` ```bash fdisk /dev/sda [ Press p to print the partition table to identify the number of partitions. By default there are two - sda1 and sda2. Press n to create a new primary partition. @@ -40,13 +44,17 @@ partprobe fdisk /dev/sda [ p ] reboot ``` ```bash vagrant ssh sudo su - fdisk /dev/sda [ p ] ``` ```bash pvcreate /dev/sda3 # confirm that the volume groups's name is vagrant--vg-root ls -al /dev/mapper/ @@ -59,3 +67,4 @@ resize2fs /dev/mapper/vagrant--vg-root # confirm that the volume sizes are changed df -vh ``` -
jj-meyer revised this gist
Aug 28, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ [Also see scotch.io] (https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one) ## Build vagrant box from an existing one ```bash cd homestead vagrant package --output ../boxes/homestead.box vagrant box add homestead_100gb ../boxes/homestead.box @@ -10,7 +10,7 @@ mkdir homestead_100gb vagrant init # or copy VagrantFile from somewhere else and change config.vm.box to "homestead_100gb" vagrant up vagrant destroy ``` # Resize the .vmdk image cd ~/.vagrant.d/boxes/homestead_100gb/0/virtualbox VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi -
jj-meyer revised this gist
Aug 28, 2015 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ [Also see scotch.io] (https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one) ## Build vagrant box from an existing one `bash cd homestead vagrant package --output ../boxes/homestead.box vagrant box add homestead_100gb ../boxes/homestead.box @@ -9,7 +10,7 @@ mkdir homestead_100gb vagrant init # or copy VagrantFile from somewhere else and change config.vm.box to "homestead_100gb" vagrant up vagrant destroy ` # Resize the .vmdk image cd ~/.vagrant.d/boxes/homestead_100gb/0/virtualbox VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi -
jj-meyer renamed this gist
Aug 28, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jj-meyer created this gist
Aug 27, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ # Also see: https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one # Build vagrant box from an existing one cd homestead vagrant package --output ../boxes/homestead.box vagrant box add homestead_100gb ../boxes/homestead.box cd .. mkdir homestead_100gb vagrant init # or copy VagrantFile from somewhere else and change config.vm.box to "homestead_100gb" vagrant up vagrant destroy # Resize the .vmdk image cd ~/.vagrant.d/boxes/homestead_100gb/0/virtualbox VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi VBoxManage modifyhd "clone-disk1.vdi" --resize 102400 VBoxManage showhdinfo "clone-disk1.vdi" VBoxManage clonehd "clone-disk1.vdi" "box-disk1.vmdk" --format vmdk mv box-disk2.vmdk box-disk1.vmdk rm clone-disk1.vdi # Resize the physical partitions on the virtual machine vagrant up vagrant ssh sudo su - fdisk /dev/sda [ Press p to print the partition table to identify the number of partitions. By default there are two - sda1 and sda2. Press n to create a new primary partition. Press p for primary. Press 3 for the partition number, depending the output of the partition table print. Press Enter two times to accept the default First and Last cylinder. Press t to change the system's partition ID Press 3 to select the newly creation partition Type 8e to change the Hex Code of the partition for Linux LVM Press w to write the changes to the partition table. ] partprobe fdisk /dev/sda [ p ] reboot vagrant ssh sudo su - fdisk /dev/sda [ p ] pvcreate /dev/sda3 # confirm that the volume groups's name is vagrant--vg-root ls -al /dev/mapper/ vgdisplay # extend the physical and logical drives vgextend vagrant-vg /dev/sda3 lvextend -l +100%FREE /dev/mapper/vagrant--vg-root resize2fs /dev/mapper/vagrant--vg-root # confirm that the volume sizes are changed df -vh