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 877927 - fail to boot from physical USB stick redirected from usb-host automatically
Summary: fail to boot from physical USB stick redirected from usb-host automatically
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Hans de Goede
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-19 09:20 UTC by Sibiao Luo
Modified: 2012-11-21 11:52 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-19 14:31:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2012-11-19 09:20:46 UTC
Description of problem:
boot a guest with a physical USB stick redirected from usb-host and with "-boot menu=on" in CLI, but need to select USB device from redirection manually, it fail to boot from redirect newly plugged in USB stick devices with usb-redir automatically if not select manually. 
In my opinion, this issue will obstacle our booting from a pass-through usb stick device via usbredir, so please fix it.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-342.el6.x86_64
qemu-kvm-0.12.1.2-2.334.el6.x86_64
# rpm -qa | grep spice-server
spice-server-0.12.0-2.el6.x86_64
usb-host info:
# rpm -qa | grep usbredir
usbredir-0.5.1-1.el6.x86_64
guest info:
windows7-64bit

How reproducible:
100%

Steps to Reproduce:
1.boot a guest with a physical USB stick redirected from usb-host and with "-boot menu=on".
2.plug a USB sticks device in the usb-host.
3.connect to guest with spicy and make sure check "auto redirect newly plugged in USB devices".
4.press F12 during POST.
5.run (qemu) system_reset
6.select the physical USB stick redirected from usb-host.
  "Input -> Select USB Devices for redirection" in spicy menubar. 
7.press F12 during POST.

Actual results:
(1).after step 4, the is no usb device for bootable,
Press F12 for boot menu.
Select boot device:
1. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
3. gPXE (PCI 00:05.0)
4. Legacy option rom
(2).after step 7,
Press F12 for boot menu, there appears usb device for bootable,
Select boot device:
1. USB MSC Drive Kingston DT 101 G2 PMAP
2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
3. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
4. gPXE (PCI 00:05.0)
5. Legacy option rom

Expected results:
it can be boot from physical USB stick redirected from usb-host automatically if i select the "auto redirect newly plugged in USB devices" in spcy menubar.
Select boot device:
1. USB MSC Drive Kingston DT 101 G2 PMAP    <----------
2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
3. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
4. gPXE (PCI 00:05.0)
5. Legacy option rom

Additional info:

Comment 1 Sibiao Luo 2012-11-19 09:21:47 UTC
my qemu-kvm command line:
# /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=1,cores=2,threads=1 -name use_device -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/dev/vg-90.100-sluo/lv-90-100-windows_7_ultimate_sp1_x64,if=none,id=drive-scsi-disk,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -drive file=/dev/vg-90.100-sluo/lv-90-100-my-data-disk,if=none,id=drive-scsi-data,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1,addr=0x7 -device scsi-disk,drive=drive-scsi-data,bus=scsi1.0,scsi-id=0,lun=0,id=scsi-data -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -spice port=5931,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -nodefaults -boot menu=on -readconfig /home/ich9-ehci-uhci.cfg -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3 -device sga -monitor stdio

Comment 3 Sibiao Luo 2012-11-19 09:25:36 UTC
(In reply to comment #0)
> Actual results:
> (1).after step 4, the is no usb device for bootable,
> Press F12 for boot menu.
> Select boot device:
> 1. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
> 2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
> 3. gPXE (PCI 00:05.0)
> 4. Legacy option rom
the detail qemu boot log for step 4:
...
Google, Inc.
Serial Graphics Adapter 07/26/11
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild.redhat.com) Tue Jul 26 15:05:08 UTC 2011
4 0

SeaBIOS (version seabios-0.6.1.2-25.el6)

gPXE (http://etherboot.org) - 00:05.0 CB00 PCI2.10 PnP BBS PMM7FE0@10 CB00
Press Ctrl-B to configure gPXE (PCI 00:05.0)...main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 32.720000 ms, bitrate 551724137 bps (526.165139 Mbps)
qemu-kvm: usbredirparser: Peer version: spice-gtk 0.14, using 64-bits ids

inputs_connect: inputs channel client create
red_dispatcher_set_cursor_peer: 
qemu-kvm: usb-redir: attaching high speed device 0930:6545 version 1.0 class 00
                                                                              
Press F12 for boot menu.

Select boot device:

1. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
3. gPXE (PCI 00:05.0)
4. Legacy option rom

Comment 4 Sibiao Luo 2012-11-19 09:27:48 UTC
(In reply to comment #0)
> Version-Release number of selected component (if applicable):
> host info:
> # uname -r && rpm -q qemu-kvm
> 2.6.32-342.el6.x86_64
> qemu-kvm-0.12.1.2-2.334.el6.x86_64
> # rpm -qa | grep spice-server
> spice-server-0.12.0-2.el6.x86_64
> usb-host info:
> # rpm -qa | grep usbredir
> usbredir-0.5.1-1.el6.x86_64
# rpm -qa | grep spice-gtk
spice-gtk-tools-0.14-5.el6.x86_64
spice-gtk-0.14-5.el6.x86_64

Comment 5 Hans de Goede 2012-11-19 10:28:36 UTC
usb-host redirection does not use the usbredir network protocol, it only involves qemu, changing component.

Comment 6 Gerd Hoffmann 2012-11-19 10:58:40 UTC

*** This bug has been marked as a duplicate of bug 876534 ***

Comment 7 Sibiao Luo 2012-11-19 12:03:39 UTC
(In reply to comment #6)
> 
> *** This bug has been marked as a duplicate of bug 876534 ***

Hi gerd,

   Maybe this issue not duplicate as bug 876534, maybe about the spice-gtk component issue.
 
   bug 876534 is about that the usb device pass-throughed from host not in the boot order only for the first time, it will appear there on the next reset guest.
 
   But this issue is that the usb device will no appear in the boot index no matter repeat reset guest. it need to select USB device from redirection manually via selecting the "auto redirect newly plugged in USB devices" in spicy menubar.

Best Regards.
sluo

Comment 8 Gerd Hoffmann 2012-11-19 13:08:38 UTC
Hans, it's actually usb-redir (see command line in comment #1) even though both initial comment & title say "usb-host".

I think the only way to make this fly is to

 (1) start guest paused.
 (2) connect spice client & redirect device.
 (3) unpause guest.

which calls for a fix somewhere up in the management stack I think ...

Comment 9 Hans de Goede 2012-11-19 14:31:41 UTC
(In reply to comment #0)
> Description of problem:
> boot a guest with a physical USB stick redirected from usb-host and with
> "-boot menu=on" in CLI, but need to select USB device from redirection
> manually, it fail to boot from redirect newly plugged in USB stick devices
> with usb-redir automatically if not select manually. 
> In my opinion, this issue will obstacle our booting from a pass-through usb
> stick device via usbredir, so please fix it.
> 
> Version-Release number of selected component (if applicable):
> host info:
> # uname -r && rpm -q qemu-kvm
> 2.6.32-342.el6.x86_64
> qemu-kvm-0.12.1.2-2.334.el6.x86_64
> # rpm -qa | grep spice-server
> spice-server-0.12.0-2.el6.x86_64
> usb-host info:
> # rpm -qa | grep usbredir
> usbredir-0.5.1-1.el6.x86_64
> guest info:
> windows7-64bit
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.boot a guest with a physical USB stick redirected from usb-host and with
> "-boot menu=on".
> 2.plug a USB sticks device in the usb-host.

So this is before starting spicy, correct?

> 3.connect to guest with spicy and make sure check "auto redirect newly
> plugged in USB devices".

1) Please stop using spicy for testing, remote-viewer is our preferred and supported client, spicy
is a demo / debug tool only.

2) You start spicy after plugging in the usb stick, so the device not being automatically redirected is
expected behavior! As you say yourself  the menu option is called: "auto redirect newly plugged in USB devices". The usb-stick was already plugged in, so it is not *newly* plugged in.

If you first start spicy and then, while the keyboard focus is on spicy, plug in the stick, it will get automatically redirected. You can verify this from the usb devices menu after plugging in the stick.

And once it has been automatically redirected doing system_reset and then pressing F-12 should get
you  the USB-stick in the boot menu as expected.

Comment 10 Sibiao Luo 2012-11-21 02:40:47 UTC
(In reply to comment #9)
> > Steps to Reproduce:
> > 1.boot a guest with a physical USB stick redirected from usb-host and with
> > "-boot menu=on".
> > 2.plug a USB sticks device in the usb-host.
> 
> So this is before starting spicy, correct?
yes, maybe i should plug it after start it. 
I will retest it that plug the usb after start the remote-viewer. 
> > 3.connect to guest with spicy and make sure check "auto redirect newly
> > plugged in USB devices".
> 
> 1) Please stop using spicy for testing, remote-viewer is our preferred and
> supported client, spicy
> is a demo / debug tool only.
Could you help me make sure that remote-viewer only for usb-dir or all of our testing, as you mentioned that "spice just for demo or debug tool only". if it for all, we will use remote-viewer for our test instead of spice.
> 2) You start spicy after plugging in the usb stick, so the device not being
> automatically redirected is
> expected behavior! As you say yourself  the menu option is called: "auto
> redirect newly plugged in USB devices". The usb-stick was already plugged
> in, so it is not *newly* plugged in.
> 
> If you first start spicy and then, while the keyboard focus is on spicy,
> plug in the stick, it will get automatically redirected. You can verify this
> from the usb devices menu after plugging in the stick.
> 
> And once it has been automatically redirected doing system_reset and then
> pressing F-12 should get
> you  the USB-stick in the boot menu as expected.
yes, just as your said. if i plug the USB after starting the remote-viewer, it can be automatically redirected, and do system_reset and then pressing F-12, it can get the USB-stick in the boot menu as expected correctly, not need to select 'File--->select USB devices to redirect' from remote-viewer menubar.

Best Regards.
sluo

Comment 11 Hans de Goede 2012-11-21 10:11:47 UTC
Hi,

(In reply to comment #10)
> > 1) Please stop using spicy for testing, remote-viewer is our preferred and
> > supported client, spicy
> > is a demo / debug tool only.
> Could you help me make sure that remote-viewer only for usb-dir or all of
> our testing, 

spicy is not supported at all, so please stop using spicy for all your testing. You should use remote-viewer
for all spice tests. 

Regards,

Hans

Comment 12 Sibiao Luo 2012-11-21 11:23:31 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > > 1) Please stop using spicy for testing, remote-viewer is our preferred and
> > > supported client, spicy
> > > is a demo / debug tool only.
> > Could you help me make sure that remote-viewer only for usb-dir or all of
> > our testing, 
> 
> spicy is not supported at all, so please stop using spicy for all your
> testing. You should use remote-viewer
> for all spice tests. 
> 
OK, thanks. that's a big changes if it's true, we will make a note that use remote-viewer instead of our spice tests.

Comment 13 mazhang 2012-11-21 11:52:38 UTC
Hi Gerd,

As Hans said in comment #11 , "spicy is not supported at all, so please stop using spicy for all your testing".

Could you please confirm this changes, and about Virtual desktop test, should I change all spice test to remote-view or just abandon spicy?


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