Skip to content

Instantly share code, notes, and snippets.

@dzoba
Created October 21, 2015 23:23
Show Gist options
  • Save dzoba/8908418ff9604dd2319b to your computer and use it in GitHub Desktop.
Save dzoba/8908418ff9604dd2319b to your computer and use it in GitHub Desktop.
Updating Vagrant Disk Size
  1. Download the gParted .iso http://gparted.org/download.php

  2. vagrant halt your machine

  3. Open vmware fusion, go to machine settings, select the disk drive and point it to the gParted .iso

  4. In machine settings, change your disk size to whatever you want

  5. Save settings, boot the machine

  6. Quickly press f2 to bring up the bios menu. Go to boot options, and move the cd drive to the top. Save settings and exit bios menu

  7. Let gParted boot. Choose your language, and choose the 0th option when it asks about using X.

  8. Once the gParted GUI starts, click the gParted icon. Select your disk, and increase the size to fill all the free space you added in vmware fusion.

  9. Apply changes in gParted, and shut down the vm from the vmware fusion menu.

  10. Completely close vmware fusion

  11. vagrant up; vagrant ssh

  12. Now do a df -h and you'll see your space isn't there. Find the name of the volume you wish to increase, mine was /dev/mapper/centos-root

  13. Now run a command like this, where you replace '+25G' with - sudo lvextend -L +43G /dev/mapper/centos-root

  14. Then run sudo xfs_growfs mine was /dev/mapper/centos-root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment