Description of problem: qemu-img info (or indeed, any other form of query on qcow2 images in either QMP or qemu-img) has no accounting for the current concrete sizes necessitated by bitmaps in an image. RHV would like to have this information to be able to anticipate filesizes when converting/copying images. Expected results: The ability to measure the cost impact of bitmaps in a qcow2 image.
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks
I think what we need is something like: qemu-img measure -f qcow2 -O qcow2 --bitmaps src.qcow2 This will include the bitmaps in src.qcow2 when reporting the required size, so: lvcreate --size require_size --name lv-name vg-name qemu-img create -f qcow2 /dev/vg-name/lv-name 10g qemu-img convert -n -f qcow2 -O qcow2 --bitmaps src.qcow2 /dev/vg-name/lv-name Will copy the image and the bitmaps successfully to the target image. The current way to do this is to run: qemu-img info --output json src.qcow2 Then collect all the bitmaps under "bitmaps" and assuming that all bitmaps conver the entire image, and calculate the size of the bitmap based on granularity, and some extra space for the metadata overhead mentioned in comment 0. Related discussion in qemu-block: https://lists.nongnu.org/archive/html/qemu-block/2020-04/msg00745.html Related to bug 1779893.
*** This bug has been marked as a duplicate of bug 1779904 ***