Bug 805414 - cannot assign bootindex to usb-host and usb-redir devices
cannot assign bootindex to usb-host and usb-redir devices
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 7.0
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On: 805413 876112
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-21 04:56 EDT by Paolo Bonzini
Modified: 2014-06-17 20:40 EDT (History)
13 users (show)

See Also:
Fixed In Version: libvirt-1.0.1-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 805413
Environment:
Last Closed: 2014-06-13 08:04:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paolo Bonzini 2012-03-21 04:56:46 EDT
+++ This bug was initially created as a clone of Bug #805413 +++

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.9.10

How reproducible:
100%

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
Comment 2 Paolo Bonzini 2012-03-21 09:07:25 EDT
<boot order='...'/> already supported for PCI assigned devices.
Comment 4 Paolo Bonzini 2012-07-20 09:36:52 EDT
The QEMU bug was moved to RHEL7, so moving this one too.
Comment 7 Ján Tomko 2012-11-16 10:33:49 EST
Boot order for USB hostdev devices works upstream:

commit a4c19459aa8634c43b51e8138fb1d7eec4c17824
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-14 15:51:30 +0100
Commit:     Eric Blake <eblake@redhat.com>
CommitDate: 2012-11-14 19:03:18 -0700

    qemu: add bootindex for usb-host and usb-redir devices

however usb-redir will require more work. Documentation and tests will follow after that.
Comment 8 Ján Tomko 2012-11-22 03:53:11 EST
Commited upstream:

commit cc244e24416b7785258c69995483015bbf8927dd
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-20 19:47:07 +0100
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: 2012-11-21 17:54:35 +0100

    conf: add support for booting from redirected USB devices

commit 08c1435f05c45e8704e259757ac2f013ee878d68
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-21 18:21:09 +0100
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: 2012-11-21 18:21:51 +0100

    docs: boot order for host and redirected USB devices

commit c5834ec148b075130a1db139566dc14249ee5e81
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-20 19:47:09 +0100
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: 2012-11-21 18:43:15 +0100

    tests: add boot order for host and redirected USB to qemu argv test

commit bb2f6216119d50f25541ab259f24160ef1ec7a97
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-20 19:47:10 +0100
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: 2012-11-21 18:43:18 +0100

    tests: update qemuhelptest data
Comment 9 hongming 2012-12-25 02:01:52 EST
Verify it as follows. The result is expected. Change its status to verified.

# rpm -q libvirt
libvirt-1.0.1-1.el7.x86_64

# virsh start rhel6
Domain rhel6 started

# virsh dumpxml rhel6
<domain type='kvm' id='4'>
  <name>rhel6</name>
  ......
  <os>
    <type arch='x86_64' machine='pc-1.2'>hvm</type>
  </os>
  ......
    <redirdev bus='usb' type='tcp'>
      <source mode='connect' host='localhost' service='4000'/>
      <protocol type='raw'/>
      <boot order='1'/>
      <alias name='redir0'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <boot order='2'/>
      <alias name='redir1'/>
    </redirdev>
  ......
  </devices>
  ......
</domain>

# ps -ef|grep rhel6
qemu     24771     1 88 14:41 ?        00:00:06 /usr/libexec/qemu-kvm -name rhel6  ......  -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev socket,id=charredir0,host=localhost,port=4000 -device usb-redir,chardev=charredir0,id=redir0,bootindex=1 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bootindex=2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6


Edit domain and add <boot dev='hd'/>
# virsh edit rhel6
error: unsupported configuration: per-device boot elements cannot be used together with os/boot elements
Failed. Try again? [y,n,f,?]:


Check the following doc and the result is expected. 
http://libvirt.org/formatdomain.html
/usr/share/doc/libvirt-docs-1.0.1/html/formatdomain.html
Comment 10 Ludek Smid 2014-06-13 08:04:35 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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