Always specify qcow2 compat level on qemu-img command line

qemu-img is going to switch the default for QCOW2
to QCOW2v3 (compat=1.1)

Extend the probing for qemu-img command line options to check
if -o compat is supported. If the volume definition specifies
the qcow2 format but no compat level and -o compat is supported,
specify -o compat=0.10 to create a QCOW2v2 image.

https://bugzilla.redhat.com/show_bug.cgi?id=997977
This commit is contained in:
Ján Tomko
2013-08-20 17:37:08 +02:00
parent 9eb444364e
commit bab2eda6ad
6 changed files with 79 additions and 6 deletions

View File

@@ -0,0 +1,3 @@
qemu-img create -f qcow2 -b /dev/null \
-o backing_fmt=raw,encryption=on,compat=0.10 \
/var/lib/libvirt/images/OtherDemo.img 5242880K

View File

@@ -0,0 +1,3 @@
qemu-img convert -f raw -O qcow2 \
-o encryption=on,compat=0.10 \
/dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img

View File

@@ -0,0 +1,3 @@
qemu-img convert -f raw -O qcow2 \
-o encryption=on,preallocation=metadata,compat=0.10 \
/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img

View File

@@ -0,0 +1,3 @@
qemu-img create -f qcow2 \
-o encryption=on,preallocation=metadata,compat=0.10 \
/var/lib/libvirt/images/OtherDemo.img 5242880K