Shrink a disk with qemu-img parsing error

check-ict

Well-Known Member
Apr 19, 2011
102
18
58
Hello,

I want to shrink my 200GB qcow disk to 32GB. I allready partitioned the disk with only 10GB of space, so now I just need to shrink the disk.

When I use:
qemu-img resize vm-102-disk-1.qcow2 +100G

100GB is added to the disk.

Now I use:
qemu-img resize vm-102-disk-1.qcow2 -100G

And I get this error: resize: invalid option -- 1

It cannot parse the command becuase of the "-". On the internet I found that the command "-- -100G" should work, but nogo:
proxmox02:/var/lib/vz/images/102# qemu-img resize vm-102-disk-1.qcow2 -- -100G
qemu-img: This image format does not support resize

Any ideas?

Nomad
 
Thanks!
proxmox02:/mnt/data2/images/101# qemu-img resize vm-101-disk-1.raw -- -1G
Image resized.