#993487 libguestfs-tools: virt-sparsify fails to pass necessary arguments to qemu-img

Package:
libguestfs-tools
Source:
libguestfs
Description:
guest disk image management system - tools
Submitter:
Norbert Preining
Date:
2021-11-03 20:15:03 UTC
Severity:
important
#993487#5
Date:
2021-09-02 02:41:04 UTC
From:
To:
virt-sparsify in.qcow2 out.qcow2 now is broken:

debugging it gives:

libguestfs: trace: disk_create "/tmp/sparsify4e60f4.qcow2" "qcow2" -1 "backingfile:/var/lib/libvirt/images/FujitsuWin10v2.qcow2" "compat:1.1"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/lib/libvirt/images/FujitsuWin10v2.qcow2,compat=1.1
libguestfs: command: run: \ /tmp/sparsify4e60f4.qcow2
qemu-img: /tmp/sparsify4e60f4.qcow2: Backing file specified without backing format
Detected format of qcow2.libguestfs: trace: disk_create = -1 (error)

and even if I add
	-o backing_fmt=qcow
it does not work since the option is not passed to qemu-img, despite
what the man page says.

Best

#993487#10
Date:
2021-11-03 20:13:18 UTC
From:
To:
Confirm this problem with qemu 6.1

https://wiki.qemu.org/ChangeLog/6.1

Section: Incompatible changes

When creating an image with a backing file, or changing the backing file
of an existing image, qemu-img requires now that the backing file format
is specified as well.

with qemu 6.0 works fine