Virtualization Station: Shrink .img file when deleting file from inside the VM

The size of Virtualization Station’s .img file grows dynamically when we put data inside the VM, but never shrinks when we delete data from the VM. It saves a lot of storage space (and money) if it provides some manual or automatic way to compact .img file to release some space.

Upstream QEMU now provides an option discard=unmap to pass discard request from the guest OS to the filesystem. When the guest OS sends discard request to the virtual block device, the driver will deallocate the region of file from the sparse image file, returning space to our disks. See references:

It will be good if QNAP exposes that feature through the GUI. At least, we should have a “compact” button like we have on VMWare Workstation Pro.

This is an excellent thought and would be similar to Parallel’s “reclaim space” or VMware’s VMFS 6 auto clean up. A manual or automatic ability to do this would be extremely beneficial!

@adarak you can help show your support for this idea by using the vote button above the first post. :wink:

1 Like

Thanks for your suggestion! I’ll forward this feature request to the relevant team for evaluation!