After this patch, we can set preallocation, encrypted and cluster_size together.
Signed-off-by: Feng Yang <[email protected]> --- client/virt/kvm_storage.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/virt/kvm_storage.py b/client/virt/kvm_storage.py index 79485a0..b5ef019 100644 --- a/client/virt/kvm_storage.py +++ b/client/virt/kvm_storage.py @@ -71,14 +71,17 @@ class QemuImg(storage.QemuImg): preallocated = params.get("preallocated", "off") encrypted = params.get("encrypted", "off") + qemu_img_cmd += " -o " if preallocated != "off": - qemu_img_cmd += " -o preallocation=%s" % preallocated + qemu_img_cmd += "preallocation=%s," % preallocated if encrypted != "off": - qemu_img_cmd += " -o encrypted=%s" % encrypted + qemu_img_cmd += "encrypted=%s," % encrypted if image_cluster_size is not None: - qemu_img_cmd += " -o cluster_size=%s" % image_cluster_size + qemu_img_cmd += "cluster_size=%s," % image_cluster_size + qemu_img_cmd = qemu_img_cmd.rstrip(" -o") + qemu_img_cmd = qemu_img_cmd.rstrip(",") if self.base_tag: qemu_img_cmd += " -b %s" % self.base_image_filename -- 1.7.7.6 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
