On Thu, Oct 28, 2021 at 02:44:52PM -0700, Roman Shagun wrote:
> Hi
> I was trying to list files inside a directory of my qcow2 image using
> virt-ls -a hda.qcow2 /boot
> 
> Seems that call to qemu-img is not aligned with current version if qemu since 
> I
> have this in debug info:
> Backing file specified without backing format
> now flag -F for backing format is required
> 
> Here's full debug log:
> 
> libguestfs: trace: set_verbose true
> libguestfs: trace: set_verbose = 0
> libguestfs: create: flags = 0, handle = 0x55bc796a24f0, program = virt-ls
> libguestfs: trace: add_drive "hda.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/libguestfsjjrQ6y/overlay1.qcow2" "qcow2" 
> -1 "backingfile:/home/user/Emulators/qemu/hda.qcow2"
> libguestfs: command: run: qemu-img
> libguestfs: command: run: \ create
> libguestfs: command: run: \ -f qcow2
> libguestfs: command: run: \ -o 
> backing_file=/home/user/Emulators/qemu/hda.qcow2
> libguestfs: command: run: \ /tmp/libguestfsjjrQ6y/overlay1.qcow2
> qemu-img: /tmp/libguestfsjjrQ6y/overlay1.qcow2: Backing file specified 
> without backing format
> Detected format of qcow2.libguestfs: error: qemu-img: 
> /tmp/libguestfsjjrQ6y/overlay1.qcow2: qemu-img exited with error status 1, 
> see debug messages above
> libguestfs: trace: disk_create = -1 (error)
> libguestfs: trace: add_drive = -1 (error)
> libguestfs: trace: close
> libguestfs: closing guestfs handle 0x55bc796a24f0 (state 0)
> libguestfs: command: run: rm
> libguestfs: command: run: \ -rf /tmp/libguestfsjjrQ6y
> 
> I've seen similar bug described here: https://www.mail-archive.com/
> [email protected]/msg1816903.html

You need this commit:

https://github.com/libguestfs/libguestfs/commit/45de287447bb18d59749fbfc1ec5072413090109

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to