HDD qcow2 shrink / trim

anonymous_user0414

New Member
Nov 15, 2022
28
3
3
Hello,

I have a pretty basic question. I could not find any direct info on this.

PVE is installed on a SSD, there are the "system images" of the vms as qcow2 and the data of the vms are also as qcow2 images on a HDD.

preserved option of the storage pool is off, discard for the ssd on.

How do I make the qcow2 images on the HDD shrink as well? HDDS do not support trim.

Side info: My storage pools are created as directories.

Thanks
 
i think i have the answer.

this will probably only work with the convert method:
qemu-img convert old.image new.image

i have tested it, it works.

there is probably no other way, is there?