Simple script to prepare Windows guests for VDI compacting.
Refer to the releases section for downloads links.
Extract the downloaded archive to C:\Program Files\VirtualBox Guest Compact Preparation
on your Windows guest. Move the included desktop shortcut to the guest's desktop for easy access.
There's nothing to configure.
-
Make sure the Windows guest is up to date (i.e. no updates pending)
-
Run VirtualBox Guest Compact Preparation via desktop shortcut
NOTE: depending on your setup, this may take quite a while to complete -
Shutdown the Windows guest
-
On the host, run
VBoxManage modifymedium disk "<vdi-file>" --compact
to compact the guest's VDI file(s)