From fa5cba7117c1c841d51773ca9ca3af686bc20a56 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Wed, 7 Sep 2022 11:40:06 -0400 Subject: [PATCH] kojivmd: pass "-F qcow2" to qemu-img create In RHEL 9 (qemu-img-6.2.0-11.el9_0.3), the "qemu-img create" command requires the "-F" flag that specifies the second image's format. qemu-img-1.5.3-175.el7_9.6 recognizes this -F flag also, so it should be safe to use on all supported platforms. --- vm/kojivmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/kojivmd b/vm/kojivmd index 5e031fdd..616b362f 100755 --- a/vm/kojivmd +++ b/vm/kojivmd @@ -455,7 +455,8 @@ class VMExecTask(BaseTaskHandler): def mkqcow2(self, clone_name, source_disk, disk_num): new_name = clone_name + '-disk-' + str(disk_num) + self.QCOW2_EXT new_path = os.path.join(self.options.imagedir, new_name) - cmd = ['/usr/bin/qemu-img', 'create', '-f', 'qcow2', '-o', 'backing_file=%s' % source_disk, + cmd = ['/usr/bin/qemu-img', 'create', '-f', 'qcow2', '-o', + 'backing_file=%s' % source_disk, '-F', 'qcow2', new_path] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)