mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
storage: Upgrade default qcow2 verion to 1.1
Change the default to modern qcow2 as it's supported by all qemu versions supported by libvirt and in fact 'qemu-img' already defaults to the new format for a long time. Some Unittests require changes to pass, now that version 1.1 is default. Unittests like `qcow2-1.1.argv` may not be relevant anymore, but this patch doesn't affect them. Closes: https://gitlab.com/libvirt/libvirt/-/issues/602 Signed-off-by: Abhiram Tilak <atp.exp@gmail.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
47a8f6a99b
commit
f432114d9c
@ -765,7 +765,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInfoDef *encinfo,
|
||||
if (info->compat)
|
||||
virBufferAsprintf(&buf, "compat=%s,", info->compat);
|
||||
else if (info->format == VIR_STORAGE_FILE_QCOW2)
|
||||
virBufferAddLit(&buf, "compat=0.10,");
|
||||
virBufferAddLit(&buf, "compat=1.1,");
|
||||
|
||||
if (info->clusterSize > 0)
|
||||
virBufferAsprintf(&buf, "cluster_size=%llu,", info->clusterSize);
|
||||
|
@ -1,7 +1,7 @@
|
||||
qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-o compat=0.10 \
|
||||
-o compat=1.1 \
|
||||
/var/lib/libvirt/images/sparse-qcow2.img \
|
||||
1073741824K
|
||||
qemu-img \
|
||||
|
@ -2,6 +2,6 @@ qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-b /dev/null \
|
||||
-o backing_fmt=raw,compat=0.10 \
|
||||
-o backing_fmt=raw,compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemo.img \
|
||||
5242880K
|
||||
|
@ -2,6 +2,6 @@ qemu-img \
|
||||
convert \
|
||||
-f raw \
|
||||
-O qcow2 \
|
||||
-o compat=0.10 \
|
||||
-o compat=1.1 \
|
||||
/dev/HostVG/Swap \
|
||||
/var/lib/libvirt/images/OtherDemo.img
|
||||
|
@ -2,7 +2,7 @@ qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
--object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \
|
||||
-o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \
|
||||
-o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemoLuks.img \
|
||||
5242880K
|
||||
qemu-img \
|
||||
|
@ -1,7 +1,7 @@
|
||||
qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-o compat=0.10 \
|
||||
-o compat=1.1 \
|
||||
/var/lib/libvirt/images/sparse-qcow2.img \
|
||||
1073741824K
|
||||
qemu-img \
|
||||
|
@ -3,6 +3,6 @@ create \
|
||||
-f qcow2 \
|
||||
-b /dev/null \
|
||||
--object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \
|
||||
-o backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \
|
||||
-o backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemoLuks.img \
|
||||
5242880K
|
||||
|
@ -2,6 +2,6 @@ qemu-img \
|
||||
convert \
|
||||
-f raw \
|
||||
-O qcow2 \
|
||||
-o preallocation=metadata,compat=0.10 \
|
||||
-o preallocation=metadata,compat=1.1 \
|
||||
/var/lib/libvirt/images/sparse.img \
|
||||
/var/lib/libvirt/images/OtherDemo.img
|
||||
|
@ -1,6 +1,6 @@
|
||||
qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-o preallocation=metadata,compat=0.10 \
|
||||
-o preallocation=metadata,compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemo.img \
|
||||
5242880K
|
||||
|
@ -2,6 +2,6 @@ qemu-img \
|
||||
convert \
|
||||
-f raw \
|
||||
-O qcow2 \
|
||||
-o preallocation=falloc,compat=0.10 \
|
||||
-o preallocation=falloc,compat=1.1 \
|
||||
/var/lib/libvirt/images/sparse.img \
|
||||
/var/lib/libvirt/images/OtherDemo.img
|
||||
|
@ -2,5 +2,5 @@ qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-b /dev/null \
|
||||
-o backing_fmt=raw,compat=0.10 \
|
||||
-o backing_fmt=raw,compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemo.img
|
||||
|
@ -2,6 +2,6 @@ qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-b /dev/null \
|
||||
-o backing_fmt=raw,nocow=on,compat=0.10 \
|
||||
-o backing_fmt=raw,nocow=on,compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemo.img \
|
||||
5242880K
|
||||
|
@ -1,6 +1,6 @@
|
||||
qemu-img \
|
||||
create \
|
||||
-f qcow2 \
|
||||
-o compat=0.10 \
|
||||
-o compat=1.1 \
|
||||
/var/lib/libvirt/images/OtherDemo.img \
|
||||
0K
|
||||
|
Loading…
Reference in New Issue
Block a user