RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1858655 - Can not boot from the redireted usb stick
Summary: Can not boot from the redireted usb stick
Keywords:
Status: CLOSED DUPLICATE of bug 1874740
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 8.0
Assignee: Gerd Hoffmann
QA Contact: yduan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-20 00:46 UTC by yduan
Modified: 2021-01-27 08:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-25 08:36:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yduan 2020-07-20 00:46:49 UTC
Description of problem:
Can not boot from the redireted usb stick

Version-Release number of selected component (if applicable):
Host:
# uname -r
4.18.0-226.el8.x86_64
# rpm -q qemu-kvm-core
qemu-kvm-core-4.2.0-30.module+el8.3.0+7298+c26a06b8.x86_64
# rpm -qa | grep usb
usb_modeswitch-data-20191128-1.el8.noarch
libusbx-1.0.23-3.el8.x86_64
usbutils-010-3.el8.x86_64
usbmuxd-1.1.0-13.el8.x86_64
usb_modeswitch-2.5.2-1.el8.x86_64
libertas-usb8388-firmware-20200619-99.git3890db36.el8.noarch
usbredir-0.8.0-1.el8.x86_64
libgusb-0.3.0-1.el8.x86_64
libusbmuxd-1.0.10-9.el8.x86_64

Guest:
# uname -r
4.18.0-226.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot VM with usb-redir device:
/usr/libexec/qemu-kvm \
 -S \
...
 -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
 -device qemu-xhci,id=usbtest,bus=pcie-root-port-1,addr=0x0 \
 -device usb-tablet,id=usb-tablet1,bus=usbtest.0,port=1 \
 -chardev spicevmc,name=usbredir,id=usbredirchar \
 -device usb-redir,id=usbredir,chardev=usbredirchar,bus=usbtest.0,port=2,bootindex=0 \
...
 -spice port=5900,disable-ticketing \
...

2.On Client:
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0781:55a3 SanDisk Corp. 
Bus 001 Device 005: ID 1604:10c0 Tascam 
Bus 001 Device 004: ID 1604:10c0 Tascam 
Bus 001 Device 003: ID 1604:10c0 Tascam 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
# remote-viewer spice://IP:5900

3.Redirect SanDisk USB stick:
When remote-viewer connects, click 'File' --> 'USB device selection' --> select the 'SanDisk' to enable usb redirection.

4.Resume the VM:
(qemu) cont

5.Check the redirected usb stick in boot menu and inside guest.

Actual results:
Cannot find the redirected usb stick:
In boot menu:
Select boot device:
1. virtio-scsi Drive QEMU QEMU HARDDISK 2.5+
2. Legacy option rom
3. DVD/CD [virtio-scsi Drive QEMU QEMU CD-ROM 2.5+]
4. iPXE (PCI 05:00.0)
Inside guest:
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Expected results:
Can find the redirected usb stick in guest.

Additional info:
This is not reproduced with qemu-kvm-core-4.2.0-29.module+el8.2.1+7297+a825794d.x86_64.
Version-Release number of selected component (if applicable):
Host:
# uname -r
4.18.0-193.13.2.el8_2.x86_64
# rpm -q qemu-kvm-core
qemu-kvm-core-4.2.0-29.module+el8.2.1+7297+a825794d.x86_64
# rpm -qa | grep usb
libgusb-0.3.0-1.el8.x86_64
usbutils-010-3.el8.x86_64
usb_modeswitch-data-20191128-1.el8.noarch
libertas-usb8388-firmware-20191202-97.gite8a0f4c9.el8.noarch
usbredir-0.8.0-1.el8.x86_64
usbmuxd-1.1.0-13.el8.x86_64
libusbmuxd-1.0.10-9.el8.x86_64
usb_modeswitch-2.5.2-1.el8.x86_64
libusbx-1.0.22-1.el8.x86_64
Guest:
# uname -r
4.18.0-193.6.3.el8_2.x86_64

In boot menu:
Select boot device:
1. virtio-scsi Drive QEMU QEMU HARDDISK 2.5+
2. USB MSC Drive SanDisk Ultra Luxe 1.00
3. Legacy option rom
4. DVD/CD [virtio-scsi Drive QEMU QEMU CD-ROM 2.5+]
5. iPXE (PCI 05:00.0)
Inside guest:
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0781:55a3 SanDisk Corp.
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Comment 4 Gerd Hoffmann 2020-07-22 07:11:24 UTC
> libusbx-1.0.23-3.el8.x86_64

> This is not reproduced with
> qemu-kvm-core-4.2.0-29.module+el8.2.1+7297+a825794d.x86_64.
> Version-Release number of selected component (if applicable):
> Host:
> # uname -r
> 4.18.0-193.13.2.el8_2.x86_64
> # rpm -q qemu-kvm-core
> qemu-kvm-core-4.2.0-29.module+el8.2.1+7297+a825794d.x86_64
> # rpm -qa | grep usb
> libgusb-0.3.0-1.el8.x86_64
> usbutils-010-3.el8.x86_64
> usb_modeswitch-data-20191128-1.el8.noarch
> libertas-usb8388-firmware-20191202-97.gite8a0f4c9.el8.noarch
> usbredir-0.8.0-1.el8.x86_64
> usbmuxd-1.1.0-13.el8.x86_64
> libusbmuxd-1.0.10-9.el8.x86_64
> usb_modeswitch-2.5.2-1.el8.x86_64
> libusbx-1.0.22-1.el8.x86_64

What happens when using the working package versions and only upgrade libusbx from 1.0.22 to 1.0.23?

Comment 6 yduan 2020-07-22 14:15:44 UTC
Hi Gerd,

Using the RHEL 8.2.1 Host mentioned in Comment 0 'Additional info', only updating libusbx from libusbx-1.0.22-1.el8.x86_64 to libusbx-1.0.23-3.el8.x86_64, the redirected usb stick can be found in the boot menu list and inside guest.

Host:
# uname -r
4.18.0-193.13.2.el8_2.x86_64
# rpm -q qemu-kvm-core
qemu-kvm-core-4.2.0-29.module+el8.2.1+7297+a825794d.x86_64
# rpm -qa | grep usb
libgusb-0.3.0-1.el8.x86_64
usbutils-010-3.el8.x86_64
usb_modeswitch-data-20191128-1.el8.noarch
libusbx-1.0.23-3.el8.x86_64
libertas-usb8388-firmware-20191202-97.gite8a0f4c9.el8.noarch
usbredir-0.8.0-1.el8.x86_64
usbmuxd-1.1.0-13.el8.x86_64
libusbmuxd-1.0.10-9.el8.x86_64
usb_modeswitch-2.5.2-1.el8.x86_64
Guest:
# uname -r
4.18.0-193.6.3.el8_2.x86_64

Comment 7 Gerd Hoffmann 2020-07-24 10:31:38 UTC
Hmm, ok, that excludes the #1 candidate from, the list.
qemu-kvm is unlikely too (29-> 30 has only 4 patches and none of them looks even remotely usb related).

Another candidate is virt-viewer.  What are the versions for the working/non-working cases?
Any effect if you upgrade or downgrade virt-viewer only?

Comment 8 yduan 2020-07-28 17:44:01 UTC
(In reply to Gerd Hoffmann from comment #7)
> Hmm, ok, that excludes the #1 candidate from, the list.
> qemu-kvm is unlikely too (29-> 30 has only 4 patches and none of them looks
> even remotely usb related).
> 
> Another candidate is virt-viewer.  What are the versions for the
> working/non-working cases?
> Any effect if you upgrade or downgrade virt-viewer only?

On the RHEL 8.3 host (non-working case), the virt-viewer version is 9.0-3.
# rpm -q virt-viewer
virt-viewer-9.0-3.el8.x86_64
# rpm -q qemu-kvm
qemu-kvm-4.2.0-30.module+el8.3.0+7298+c26a06b8.x86_64

I downgrade the virt-viewer to version 7.0-9, cannot connect the VM with remote-viewer:
# rpm -q virt-viewer
virt-viewer-7.0-9.el8.x86_64
# remote-viewer spice://$IP:5900
remote-viewer: symbol lookup error: remote-viewer: undefined symbol: ovirt_vm_get_host, version GOVIRT_0.3.2

=========================================================================

On the RHEL 8.2.1 host (working case), the virt-viewer version is 7.0-9.
# rpm -q virt-viewer
virt-viewer-7.0-9.el8.x86_64
# rpm -q qemu-kvm
qemu-kvm-4.2.0-29.module+el8.2.1+7297+a825794d.x86_64

I update the virt-viewer to version 9.0-3 and re-test, everything still works well.
# rpm -q virt-viewer 
virt-viewer-9.0-3.el8.x86_64

Comment 9 Gerd Hoffmann 2020-08-20 10:45:44 UTC
Hmm, can't reproduce.
Can you retest with latest 8.3?

Comment 10 yduan 2020-08-20 15:44:09 UTC
(In reply to Gerd Hoffmann from comment #9)
> Hmm, can't reproduce.
> Can you retest with latest 8.3?

Hi Gerd,

I can reproduce this with qemu-kvm-4.2.0-33.module+el8.3.0+7705+f09d73e4.x86_64.

Also hit this problem with latest qemu-kvm-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64.

I think the key step is boot the VM with '-S' option and redirect the usb stick before resuming the VM:

> 1.Boot VM with usb-redir device:
> /usr/libexec/qemu-kvm \
> -S \
>
> 3.Redirect SanDisk USB stick:
> When remote-viewer connects, click 'File' --> 'USB device selection' -->
> select the 'SanDisk' to enable usb redirection.
> 
> 4.Resume the VM:
> (qemu) cont

Thanks,
yduan

Comment 11 yduan 2020-09-08 03:17:34 UTC
(In reply to yduan from comment #10)
> (In reply to Gerd Hoffmann from comment #9)
> > Hmm, can't reproduce.
> > Can you retest with latest 8.3?
> 
> Hi Gerd,
> 
> I can reproduce this with
> qemu-kvm-4.2.0-33.module+el8.3.0+7705+f09d73e4.x86_64.
> 
> Also hit this problem with latest
> qemu-kvm-5.1.0-3.module+el8.3.0+7708+740a1315.x86_64.
> 
> I think the key step is boot the VM with '-S' option and redirect the usb
> stick before resuming the VM:
> 

Hi Gerd,

This issue can also be reproduced with qemu-kvm-5.1.0-4.module+el8.3.0+7846+ae9b566f.x86_64.

Do we need to file a new bz to track the fast train qemu 5.1 ?

Thanks,
yduan

Comment 12 Gerd Hoffmann 2020-09-08 07:39:42 UTC
> I think the key step is boot the VM with '-S' option and redirect the usb
> stick before resuming the VM:
> 
> > 1.Boot VM with usb-redir device:
> > /usr/libexec/qemu-kvm \
> > -S \
> >
> > 3.Redirect SanDisk USB stick:
> > When remote-viewer connects, click 'File' --> 'USB device selection' -->
> > select the 'SanDisk' to enable usb redirection.
> > 
> > 4.Resume the VM:
> > (qemu) cont

Ok, so if you reset the guest at this point, will seabios find the device on the second boot?

Comment 13 Gerd Hoffmann 2020-09-08 07:41:16 UTC
> Hi Gerd,
> 
> This issue can also be reproduced with
> qemu-kvm-5.1.0-4.module+el8.3.0+7846+ae9b566f.x86_64.
> 
> Do we need to file a new bz to track the fast train qemu 5.1 ?

Maybe, but we should better find the root cause first.

Comment 14 yduan 2020-09-09 05:56:11 UTC
(In reply to Gerd Hoffmann from comment #12)
> > I think the key step is boot the VM with '-S' option and redirect the usb
> > stick before resuming the VM:
> > 
> > > 1.Boot VM with usb-redir device:
> > > /usr/libexec/qemu-kvm \
> > > -S \
> > >
> > > 3.Redirect SanDisk USB stick:
> > > When remote-viewer connects, click 'File' --> 'USB device selection' -->
> > > select the 'SanDisk' to enable usb redirection.
> > > 
> > > 4.Resume the VM:
> > > (qemu) cont
> 
> Ok, so if you reset the guest at this point, will seabios find the device on
> the second boot?

Actually no.
Tested with qemu-kvm-4.2.0-33.module+el8.3.0+7705+f09d73e4.x86_64 and qemu-kvm-5.1.0-4.module+el8.3.0+7846+ae9b566f.x86_64.

Comment 15 Gerd Hoffmann 2020-09-22 09:18:09 UTC
Hmm, looks suspicious simliar to bug 1874740, possibly a dup.


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