Created
July 20, 2022 21:10
-
-
Save ingmarioalberto/807d723274c72c1015050564f4b45206 to your computer and use it in GitHub Desktop.
shrink a virtualbox disk guest to free space on host
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
1. Verify it is a Dynamic Disk || convert it to dynamic | |
2. zerotise empty space: | |
windows guest: (tested) | |
2.1 download sdelete.exe (https://docs.microsoft.com/en-us/sysinternals/downloads/sdelete) | |
2.2 as administrator, run: sdelete.exe c: -z | |
linux guest: (untested) | |
2.1 install zerofree | |
2.2 reboot into recovery mode | |
2.3 drop to root shell | |
2.4 zerofree -v /dev/sdXY | |
3. VBoxManage modifymedium disk "/PATH/TO/disk.vdi" --compact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment