Last active
September 28, 2016 04:20
-
-
Save thearrow/0b0cc6c990799bb9b0d5 to your computer and use it in GitHub Desktop.
Shrink Vagrant/VBox Disk
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
# in vbox gui for vagrant machine: | |
sudo apt-get install zerofree | |
# boot vm into recovery mode in vbox gui (hold down esc) | |
df | |
# (optional) mount -o remount,ro {disk eg. /dev/sda1} | |
zerofree {disk} | |
halt | |
# on host machine after locating box .vmdk: | |
VBoxManage clonehd {old box}.vmdk {new box}.vmdk --format vmdk | |
# then switch the vbox vm storage to use the new vmdk file! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment