Red Hat Bugzilla – Bug 1047748
fail to specify the bootindex for the usb-storage with usb-xhci controller
Last modified: 2015-03-05 04:43:21 EST
Description of problem: boot guest with a usb-xhci storage disk specified the bootindex=0, but it fail to boot from it. BTW, also tried the usb-ehci controller that did not meet such issue. Version-Release number of selected component (if applicable): host info: 3.10.0-64.el7.x86_64 qemu-kvm-1.5.3-30.el7.x86_64 seabios-1.7.2.2-6.el7.x86_64 guest info: 3.10.0-64.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.boot guest with a usb-xhci storage disk specified the bootindex=0, and bootindex=1 for system hard disk, bootindex=2 for virtio-nic. e.g:# /usr/libexec/qemu-kvm -M pc...-device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 2.press F12 during POST. Actual results: after step 2, Press F12 for boot menu. Select boot device: 1. Virtio disk PCI:0:4 2. iPXE (PCI 00:05.0) 3. USB MSC Drive QEMU QEMU HARDDISK 1.5. 4. Legacy option rom 5. Floppy [drive A] 6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] Expected results: the guest should boot from usb-xhci storage disk first, like: 1. USB MSC Drive QEMU QEMU HARDDISK 1.5. 2. Virtio disk PCI:0:4 3. iPXE (PCI 00:05.0) 4. Legacy option rom 5. Floppy [drive A] 6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] Additional info: # /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,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 -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-7.0-20131127.1_Server_x86_64.qcow2bk,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:01:02:03:04:05,bus=pci.0,addr=0x5,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -vga qxl -monitor stdio
Port numbering issue. xhci maps one physical port to two virtual ports, one for usb2, one for usb3, and bootindex works only for the usb2 virtual port ... Think this should be fixed in seabios.
xhci in qemu 2.1+ orders usb3 ports first (for new machine types), which fixes this as side effect.
Reproduce this bug as follow version: Host: # rpm -q qemu-kvm-rhev qemu-kvm-rhev-1.5.3-60.el7_0_0.6.x86_64 # uname -r 3.10.0-144.el7.x86_64 Steps: 1)Boot guest with usb-xhci storage disk specified the bootindex=0, and bootindex=1 for system hard disk ...-device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-Server-6.6-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -boot menu=on... 2)Press F12 Results: 1. Virtio disk PCI:0:4 2. iPXE (PCI 00:05.0) 3. USB MSC Drive QEMU QEMU HARDDISK 1.5. 4. Legacy option rom 5. Floppy [drive A] 6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] Test on latest version: # uname -r 3.10.0-144.el7.x86_64 # rpm -q qemu-kvm-rhev qemu-kvm-rhev-2.1.0-2.el7.x86_64 Steps as same as above Results: 1. Virtio disk PCI:0:4 2. USB MSC Drive QEMU QEMU HARDDISK 1.5. 3. Legacy option rom 4. Floppy [drive A] 5. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] 6. iPXE (PCI 00:05.0) Attional info : CLI: /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name flang -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-Server-6.6-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -monitor stdio -vnc :10 -boot menu=on According to above test ,i think this bug has not been fixed.
Works only with the 7.1.0 machine type, which seems not to be there yet ...
According to comment7,i will change the bug status to "ASSIGNED",anything i was wrong ,please correct me .thanks
7.1 machine type patches have been merged meanwhile, please retest with latest build and make sure to use machine type "pc-i440fx-rhel7.1.0"
Hi Flang, Could you retest it according to comment9? Best Regards, Junyi
Test on latest version: # uname -r 3.10.0-191.el7.x86_64 # rpm -q qemu-kvm-rhev qemu-kvm-rhev-2.1.2-5.el7.x86_64 Guest:rhel7 1)Boot guest with usb-xhci storage disk specified the bootindex=0, and bootindex=1 for system hard disk ...-M pc-i440fx-rhel7.1.0...-device nec-usb-xhci,id=xhci0,bus=pcie.0,addr=0x7 -drive file=/home/my-usb-storage.qcow2,id=drive-storage0,if=none,media=disk,cache=none,format=qcow2 -device usb-storage,drive=drive-storage0,bus=xhci0.0,id=storage0,removable=on,bootindex=0 -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1.... 2)Press F12 Results: 1. USB MSC Drive QEMU QEMU HARDDISK 2.1. 2. Virtio disk PCI:0:4 3. Legacy option rom 4. Floppy [drive A] 5. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] 6. iPXE (PCI 00:03.0) Also test -M pc/q35/pc-q35-rhel7.1.0--->work well,results same as above pc-q35-rhel7.0.0/rhel6.5.0--->failed, as comment7 and comment9,this is expect resutls,so this bug is fixed. Hi Gerd Please help me to see the above test ,thanks best regards fang lang
> pc-q35-rhel7.0.0/rhel6.5.0--->failed, as comment7 and comment9,this is > expect resutls,so this bug is fixed. Correct, only the rhel7.1.0 machine types will work, rhel7.0.0 is expected to fail.
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, 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://rhn.redhat.com/errata/RHSA-2015-0624.html