Bug 805413

Summary: cannot assign bootindex to usb-host and usb-redir devices
Product: Red Hat Enterprise Linux 6 Reporter: Paolo Bonzini <pbonzini>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED DEFERRED QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, bsarathy, gleb, hdegoede, juzhang, kraxel, michen, mkenneth, pbonzini, qzhou, sluo, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 805414 (view as bug list) Environment:
Last Closed: 2012-07-20 13:36:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 805414    

Description Paolo Bonzini 2012-03-21 08:55:23 UTC
Description of problem:
KVM supports booting from host USB devices (both directly attached and redirected over IP).  However, it does not support assigning a boot index to them.

Version-Release number of selected component (if applicable):
0.12.1

How reproducible:
qemu-kvm-0.12.1.2-2.248.el6

Steps to Reproduce:
1. Here is a sample command line for the usb-host case:
x86_64-softmmu/qemu-system-x86_64 -nodefaults -vga cirrus -readconfig ich9-ehci-uhci.cfg -device usb-host,bus=ehci.0,vendorid=0x0a16,productid=0x2499,bootindex=2 /path/to/disk.img -boot menu=on
2.
3.
  
Actual results:
Error "Property 'usb-host.bootindex' not found"

Expected results:
USB host device comes second in the boot menu

Additional info:
Creating libvirt counterpart too.

Comment 4 Paolo Bonzini 2012-03-22 10:14:42 UTC
In general, if you specify bootindex for one disk it is better to specify it for all of them, especially if you have disks on different buses (as is the case with virtio-blk + USB or virtio-scsi + USB).  So this, while remaining low priority, is a little more than just nice-to-have.

Comment 5 Sibiao Luo 2012-04-01 08:14:25 UTC
> Steps to Reproduce:
> 1. Here is a sample command line for the usb-host case:
> x86_64-softmmu/qemu-system-x86_64 -nodefaults -vga cirrus -readconfig
> ich9-ehci-uhci.cfg -device
> usb-host,bus=ehci.0,vendorid=0x0a16,productid=0x2499,bootindex=2
> /path/to/disk.img -boot menu=on
> 
> Actual results:
> Error "Property 'usb-host.bootindex' not found"
> 
> Expected results:
> USB host device comes second in the boot menu
> 

Hi Paolo,

   I have reproduce this issue on the qemu-kvm-0.12.1.2-2.265.el6rhev.x86_64 and seabios-0.6.1.2-16.el6.x86_64.rpm with the same steps, and also hit this issue,there is no bootindex parameter for the usb-host and usb-redir devices.

   But I meet anther issue, there has no boot device in boot menu for the passthrough USB stick from host to guest with "-boot menu=on" in CLI. I have file a bug for the usb-redir devices(Bug #808730), but I don't know whether should i file a new bug for the usb passthrough devices, please help me check it and tell me it & thx.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-251.el6.x86_64
qemu-kvm-0.12.1.2-2.265.el6rhev.x86_64
# rpm -q seabios
seabios-0.6.1.2-16.el6.x86_64
guest info:
guest_name: RHEL-Server-6.3-64
# uname -r
2.6.32-251.el6.x86_64

Steps to Reproduce:
1.boot a guest with a passthrough physical USB stick passigned to guest with "-boot menu=on".
eg:# /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu SandyBridge -enable-kvm -smp 8,sockets=1,cores=8,threads=1 -m 4G -name RHEL-Server-6.3-64 -uuid 76463a17-b88c-4ce7-ad9e-a8136b2a4550 -drive file=/home/lv_seabios/rhel6.3_20120313_x86_64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=64:31:50:23:19:45 -device virtio-balloon-pci,id=ballooning -spice port=5931,disable-ticketing -vga qxl -monitor stdio -boot menu=on -nodefaults -device usb-ehci,id=ehci -device usb-host,hostbus=2,hostaddr=13,id=hostdev1,bus=ehci.0,port=1
2.press F12 during POST.

How reproducible:
100%

Actual results:
after the step 2,
SeaBIOS (version seabios-0.6.1.2-16.el6)


gPXE (http://etherboot.org) - 00:04.0 CB00 PCI2.10 PnP BBS PMMDFE0@10 CA00

Press F12 for boot menu.

Select boot device:

1. Virtio disk PCI:0:3
2. gPXE (PCI 00:04.0)
3. Legacy option rom

Expected results:
after press F12 during POST, we can see the boot device in boot menu for the passthrough USB stick, and select it to boot, the seabios could boot from the selected boot device successfully.

Comment 6 Paolo Bonzini 2012-04-02 07:03:04 UTC
I'm not really sure of how SeaBIOS populates the boot menu.  Just to be sure and to record full information in the BZ, is the USB stick bootable?  An easy way is to dd a RHEL or Fedora ISO network boot image onto the stick.  Please make sure you list this step into the "steps to reproduce" next time.  Thanks!

Comment 7 Gleb Natapov 2012-04-02 07:50:35 UTC
(In reply to comment #6)
> I'm not really sure of how SeaBIOS populates the boot menu.  Just to be sure
> and to record full information in the BZ, is the USB stick bootable?  An easy
> way is to dd a RHEL or Fedora ISO network boot image onto the stick.  Please
> make sure you list this step into the "steps to reproduce" next time.  Thanks!

IIRC Seabios does not check if media is bootable before adding it to boot menu.

Comment 8 Sibiao Luo 2012-04-05 02:40:17 UTC
(In reply to comment #6)
> I'm not really sure of how SeaBIOS populates the boot menu.  Just to be sure
> and to record full information in the BZ, is the USB stick bootable?  An easy
> way is to dd a RHEL or Fedora ISO network boot image onto the stick.  Please
> make sure you list this step into the "steps to reproduce" next time.  Thanks!

Hi Paolo,
 
   I have retested it on qemu-kvm-0.12.1.2-2.267.el6.x86_64, and find it, affter press F12 during POST, i can select it to boot from the passthrough USB stick. That's correct. Maybe i missed some steps last week causing i did not see the USB bootable passthrough in the boot menu, and thx. for your help.

Steps to Reproduce:
1.create a bootable USB stick via "liveusb-creator" tool.
2.boot a guest with a passthrough physical USB stick passigned to guest with
"-boot menu=on".
3.press F12 during POST.

Actual results:
after the step 3,
SeaBIOS (version seabios-0.6.1.2-16.el6)


gPXE (http://etherboot.org) - 00:04.0 CB00 PCI2.10 PnP BBS PMMDFE0@10 CA00

Press F12 for boot menu.

Select boot device:

1. USB MSC Drive Kingston DT 101 G2 PMAP
2. Virtio disk PCI:0:3
2. gPXE (PCI 00:04.0)
3. Legacy option rom

Comment 10 RHEL Program Management 2012-07-10 08:14:39 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 11 RHEL Program Management 2012-07-11 02:03:45 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 12 Paolo Bonzini 2012-07-20 13:36:06 UTC
Already fixed upstream (commit 65bb3a5c11b00671c1067ee27ea364b6d7e6e2ac), closing this as deferred and changing the libvirt bug to RHEL7.