The edgeLinux forum has a new home!

You can still read older entries here but the edgeLinux community forum has moved to: See you there!

You need to log in to create posts and topics.

Resizing smaller doesn't work

I appreciate the resizing/limiting feature that was recently added, but it looks like it assumes you'll always want to resize larger. When attempting to resize to something smaller, the following error appears in the red error box:

DQEMUI-1: Error while trying to resize qemu image qemu-img: warning: Shrinking an image will delete all data beyond the shrunken image's end. Before performing such an operation, make sure there is no important data there. qemu-img: Use the --shrink option to perform a shrink operation.

I understand that the usual .qcow2 file created on a new antlet is already at the minimum size, but it still represents that it has a maximum limit (qemu-img info tells me so). I want to change that limit (from 100G to 20G, for example) downward, to a smaller value, and that requires a command such as:

    $ qemu-img resize --shrink Blank.qcow2 20G

Without this, it could still expand past my desired limit. I have no problem resizing larger, by the way.



Thanks for posting this Bruce. I'm setting up a Debian KVM to use a NextCloud server and the root only needs to be 20GB. Incredibly frustrating that they haven't implemented this into AntMan yet, but given all the other things that are still not quite there I suppose we shouldn't be surprised.

Good post. It appears this still isn't a feature yet.

For anyone in the future looking, the qcow2 file is located at



qemu-img info <image>.kvm.qcow2

after to ensure it resizes. I had to run the command twice for some reason.