1

I have a virtual machine with VDI disk configured as a Dynamically Allocated with maximum of 20 gigabytes.

Guest OS (Linux Mint) reports usage of 10.7 GB. enter image description here

Why actual VDI size is 16.5 GB, instead of 10.7? How to compact it?

I've performed disk cleanup as described here (I used pv & dd method because other one just hanged my guest os). Disk shrink but just a little from 17 GB to 16.5 GB.

1
  • To reduce the VDI file size I recommend this answer superuser.com/a/529183 I just used it on my main computer and was pleased
    – wlf
    Aug 11, 2021 at 23:46

1 Answer 1

2

The problem you're seeing is because a dynamic disk continues growing even if you erase some files, for example, if you erase a 2Gb file from the virtual machine this space is not being reduced from de disk, you need to erase as you mention the zeroed space and then compact the virtual machine. If you are using virtual box here is how you can do this:

How to compact VirtualBox's VDI file size?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .