Last active
December 2, 2016 15:24
-
-
Save tuxnker/0e520546633d1fd7e4ac7d03cbc3eb6d to your computer and use it in GitHub Desktop.
reduce the size of a virtual-box disk
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 characters
VBoxManage clonehd $(ls *.vmdk) box-disk1.vdi --format VDI && \ | |
VBoxManage modifyhd box-disk1.vdi --compact && \ | |
VBoxManage storageattach $(pwd | sed 's#.*/##') --storagectl IDE --device 0 --port 0 --type hdd --medium "box-disk1.vdi" && \ | |
rm -f $(ls *.vmdk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment