qcow2 not getting reduced

harikrishna075

New Member
Jun 14, 2022
12
0
1
We are having one proxmox server in which lvm is configured and mapped as directory in proxmox and VM hdd is pointed to that directory. VM is having 30 % of HDD used . During an activity VM HDD was used up with 90%. After the activity i remove the files in Vm and made 30% used. But proxmox is still showing 90% used is there any way to reduce the size of qcow showing in proxmox.


456G vm-121-disk-0.qcow2

Actual vm size is 50 GB
 
Hi,

May you try the following:
- make a backup to the VM (make sure that is valid backup!)
- Convert the VM from qcow2 to raw using qemu-img convert e.g:
Bash:
qemu-img convert -f qcow2 -O raw vm-121-disk-0.qcow2 vm-121-disk-0.raw
- use the virt-resize to resize the VM to the original size
- Finally, convert the image from raw to qcow2 using qemu-img convert