Virtual box actual file size may varies from virtual local disks. This is how to reduce the actual file size in windows.

1) Run defrag in the virtual machine in case of  the physical disk is not an SSD

2) Nullify free space in the virtual machine by downloading SDelete from Sysinternals and run this: sdelete.exe c: -z

(replace C: with the drive letter of the VDI)

4) Shutdown the guest VM

5) Run VBoxManage’s modifyhd command with the compact option:

With a Windows Host run this: VBoxManage.exe modifyhd c:<<file name>>.vdi –compact

Leave a Reply

Your email address will not be published. Required fields are marked *