Created attachment 1695376 [details] guestfish log Description of problem: The duplicate block device is listed when iface is set to 'virtio'. Version-Release number of selected component (if applicable): libguestfs-1.42.0-1.module+el8.3.0+6496+d39ac712.x86_64 qemu-kvm-4.2.0-19.module+el8.3.0+6478+69f490bb.x86_64 kernel-4.18.0-208.el8.x86_64 How reproducible: 100% Steps: 1. On rhel8.3 host # qemu-img create virtio.img 1G Formatting 'virtio.img', fmt=raw size=1073741824 2. # LIBGUESTFS_BACKEND=direct guestfish Welcome to guestfish, the guest filesystem shell for editing virtual machine filesystems and disk images. Type: ‘help’ for help on commands ‘man’ to read the manual ‘quit’ to quit the shell ><fs> add-drive virtio.img iface:virtio ><fs> run ><fs> list-devices /dev/sda /dev/sda ><fs> list-filesystems /dev/sda: unknown /dev/sda: unknown ><fs> quit Actual results: as above Expected results: Only one block device(/dev/sda) is listed. Additional info: No problem when iface is set to 'ide'
One line reproducer is: $ LIBGUESTFS_BACKEND=direct guestfish add-drive /dev/null iface:virtio : run : list-devices /dev/sda /dev/sda The libvirt backend has never allowed the iface parameter. We should probably ignore it in the direct backend since it's never been possible to use this parameter correctly.
(In reply to Richard W.M. Jones from comment #1) > One line reproducer is: > > $ LIBGUESTFS_BACKEND=direct guestfish add-drive /dev/null iface:virtio : run > : list-devices > /dev/sda > /dev/sda > > The libvirt backend has never allowed the iface parameter. We should > probably ignore it in the direct backend since it's never been possible > to use this parameter correctly. Ok, i see. Thanks you.
Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.
This bug was closed in error by a process we do not control.
[libguestfs PATCH 0/4] ignore "iface" in "add-drive" variants Message-Id: <20220504134155.11832-1-lersek> https://listman.redhat.com/archives/libguestfs/2022-May/028802.html
(In reply to Laszlo Ersek from comment #8) > [libguestfs PATCH 0/4] ignore "iface" in "add-drive" variants > Message-Id: <20220504134155.11832-1-lersek> > https://listman.redhat.com/archives/libguestfs/2022-May/028802.html Upstream commit range 4864d21cb8eb..ddf276884c04.
Test with libguestfs-1.48.2-2.el9.x86_64 on RHEL9.1 host: $ LIBGUESTFS_BACKEND=direct guestfish add-drive /dev/null iface:virtio : run : list-devices /dev/sda The result is expected.
Verified this bug since the test case for this bug has been automated and passed in the latest nightly compose test.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: libguestfs security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7958