Description of problem:
When building an image in qcow format with
virt-builder centos-7.0 --format qcow --hostname centos-7.0
the output format will be qcow v3, which is not supported for example in centos6.
Would be nice to have a compat option for qcow v2, something like
virt-builder centos-7.0 --format qcowv2 --hostname centos-7.0
Pointer to qcow compat format info
So virt-builder could use something like
qemu-img convert -f raw <file.img> -O qcow2 -o compat=0.10 <file.qcow>
Version-Release number of selected component (if applicable):
Although it would be nice for virt-builder to be able to create
these directly, I will note there is a qemu-img amend command you
can use to downgrade the image (assuming that the image doesn't already
use certain modern features).
$ virt-builder centos-7.0 --format qcow2
$ qemu-img amend -f qcow2 -o compat=0.10 centos-7.0.qcow2
$ qemu-img info centos-7.0.qcow2
file format: qcow2
virtual size: 6.0G (6442450944 bytes)
disk size: 943M
Format specific information:
compat: 0.10 <--- note
For more details see
There is also a bug about adding compat=1.1 support for RHEL 6, but
I cannot find it right now.
After looking at this, I think the best (and certainly the simplest)
approach is just to document the 'qemu-img amend' command, and
that is the patch I have posted:
The only problem with this is that the qemu-img amend command won't
run on RHEL 6 itself (you have to run it on RHEL 7), but then again
virt-builder doesn't run on RHEL 6 either.
This fix will appear in 1.31.24.