How to reduce the physical size of the disk in VirtualBox VDI

FOP picture FOP · Jun 1, 2016 · Viewed 9.5k times · Source

The size of VDI virtual disk file of a virtual machine was increased by the amount of files saved in it.

Now I released disk space, leaving less than half the previous space, but the VDI file does not decrease. (Obviously does not increase)

Is there any way to reduce the VDI file? I know that by cloning is reduced, but there is another one easier to do?

Thank you in advance

Answer

FOP picture FOP · Jun 27, 2016

Thank you to lewis4u for the words i need to find the solution. vboxmanage, resize, etc I working in linux, and I don't need to make a resize.

The solution is fill with zeroes and compact it. See this link for more details https://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size