I made a couple of tweaks to allow me to shrink this down a bit by letting VirtualBox know this was an SSD and enabling Trim to the VM.
First, open Virtual Box, and then Settings for the machine in question. Go to the "Storage" settings page, select your vdi and ensure that "Solid-state Drive" is selected:
Next, fire up a terminal. You'll do better by going ahead and navigating to the directory where the VM is stored. The first command will enable TRIM for the controller:
For my machine, that command looked like this:
Now, issue the
fstrimcommand inside of the Virtual Machine, for example:
Next, you can compact your vdi file using this command:
Again, for my specific case, it looked like this:
By doing this, I was able to reduce the size of my vdi from 12G to 7G.