Bug 1998820 - libguestfs breaks with qemu 6.1 with error "Backing file specified without backing format"
Summary: libguestfs breaks with qemu 6.1 with error "Backing file specified without ba...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1999419 2013916
TreeView+ depends on / blocked
 
Reported: 2021-08-29 08:04 UTC by Toolybird
Modified: 2021-10-14 07:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-14 11:29:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Toolybird 2021-08-29 08:04:56 UTC
I'm on stable libguestfs-1.44.1

virt-filesystems (and probably other tools) are now busted. This is the first time I've tried it since upgrading to qemu-6.1.0

$ virt-filesystems -a /mnt/ssd1/VMs/win11.qcow2
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0x56112a90d9e0, program = virt-filesystems
libguestfs: trace: add_drive "/mnt/ssd1/VMs/win11.qcow2" "readonly:true"
libguestfs: creating COW overlay to protect original drive content
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsLWJ0gj/overlay1.qcow2" "qcow2" -1 "backingfile:/mnt/ssd1/VMs/win11.qcow2"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/mnt/ssd1/VMs/win11.qcow2
libguestfs: command: run: \ /tmp/libguestfsLWJ0gj/overlay1.qcow2
qemu-img: /tmp/libguestfsLWJ0gj/overlay1.qcow2: Backing file specified without backing format
Detected format of qcow2.libguestfs: error: qemu-img: /tmp/libguestfsLWJ0gj/overlay1.qcow2: qemu-img exited with error status 1, see debug messages above


It appears qemu-img now errors out instead of giving a warning for this condition:

https://gitlab.com/qemu-project/qemu/-/commit/497a30dbb065937d67f6c43af6dd78492e1d6f6d

Thanks

Comment 1 Richard W.M. Jones 2021-08-29 08:25:32 UTC
Yeah that's unfortunate.  It requires modification of libguestfs
and virt-v2v in a few places to cope.

Comment 2 Richard W.M. Jones 2021-08-29 08:36:58 UTC
In the meantime you can work around the problem by using the --format
parameter (eg. virt-filesystems --format=raw -a ...).  But you
shouldn't need to do that so we'll need to have libguestfs do
the autodetection.

Comment 3 Richard W.M. Jones 2021-08-31 07:36:13 UTC
Upstream fix is:
https://github.com/libguestfs/libguestfs/commit/45de287447bb18d59749fbfc1ec5072413090109

I'll push this for Fedora 34 and Rawhide later today since those
are the only versions of Fedora with this qemu.

Comment 4 Richard W.M. Jones 2021-08-31 07:41:03 UTC
I mean Fedora 35 and Rawhide.

Comment 9 Richard W.M. Jones 2021-09-14 11:29:15 UTC
Closing since this bug is fixed upstream.


Note You need to log in before you can comment on or make changes to this bug.