Ticket #3061 (new enhancement)
Add Virtual Disk Tasks to Virtual Media Manager
|Reported by:||RMSFisher||Owned by:|
|Version:||VirtualBox 2.1.0||Keywords:||vdi compact|
On a periodic basis one can save a fair deal of disk space on a host by running "VBoxManage modifyvdi [SomeVDI] compact". I would suggest that this documented but currently CLI-only feature be added to the Virtual Media Manager portion of the VirtualBox GUI. Being able to manually specify when to compact a .vdi file in the GUI would save a lot of hassle for less-CLI-savvy users.
To use such a feature one might: Open VirtualBox Open the Virtual Media Manager Select a Virtual Disk Image Click a "Compact" button in the toolbar
Integration of virtual disk image management into Guest Additions could suggest that the user "Compact" when the guest's reported disk usage is beneath some threshold of the actual disk usage of the .vdi file on the host. To use such a feature in a Windows guest one might: Install Guest Additions Guest Additions could run "dir" or some similar command in the background to get Windows' current free disk space estimate VirtualBox could compare Windows' reported free disk space to the space left on a virtual disk image (Maximum size - current .vdi file size) If the free space number differ significantly (say 20%) VirtualBox could, from within the guest, prompt the user to run a "Guest VDI Compaction Routine" VirtualBox could run "sdelete -c" in the background on the guest, send a shutdown signal after sdelete finishes, and then compact the .vdi once the guest is shut down
This second approach would be much more OS-specific and may not work (or be necessary) with all operating systems and file systems. It would, however, simplify things for former Windows users who most run Windows for a handful of programs which have no practical replacements on the host platform.