Bug 727725 - Guest can't find bootable disk when boot guest with virtio interface block and usb device simultaneous
Summary: Guest can't find bootable disk when boot guest with virtio interface block an...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-03 03:19 UTC by juzhang
Modified: 2013-01-10 00:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-12 11:50:55 UTC


Attachments (Terms of Use)
image about no bootable disk (50.13 KB, image/png)
2011-08-03 03:19 UTC, juzhang
no flags Details

Description juzhang 2011-08-03 03:19:47 UTC
Created attachment 516421 [details]
image about no bootable disk

Description of problem:
Boot guest with -device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=usbstick -drive if=none,id=usbstick,file=/root/zhangjunyi/usbdevice.qcow2  simultaneous.guest can't be booted successful since can't find bootable disk. 

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.175.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with virtio interface block and usb device 
#/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 2G -smp 2,cores=2,threads=1,sockets=1  -name RHEL6.1_32 -uuid 50eba0fa-c3bc-4634-9c87-e46fc4dafab9 -rtc base=utc,clock=host,driftfix=slew -boot dc -drive file=/home/RHEL6.1-64-virtio.qcow2,if=none,id=drive-ide-0-0,media=disk,format=qcow2,cache=none,werror=stop,index=0 
/
-device virtio-blk-pci,drive=drive-ide-0-0,id=ide0-0-0 -netdev tap,id=hostnet1 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=78:2B:CB:AF:11:11 -vnc :10 -monitor stdio -balloon none
/ 
-device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=usbstick -drive if=none,id=usbstick,file=/root/zhangjunyi/usbdevice.qcow2

2.
3.
  
Actual results:
Guest can't be booted successful because of can't find bootable disk. 

Expected results:
guest can be booted successful and find usb device in guest.

Additional info:
1.if we boot guest just with virtio interface block,guest can be booted successful 

2.if we boot guest with ide interface and usb device simultaneous,guest can be booted successful 

#-device ide-drive,drive=drive-ide-0-0,id=ide0-0-0 -netdev tap,id=hostnet1 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=78:2B:CB:AF:11:11 -vnc :10 -monitor stdio -balloon none -device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=usbstick -drive if=none,id=usbstick,file=/root/zhangjunyi/usbdevice.qcow2

Comment 1 Gerd Hoffmann 2011-08-03 06:20:44 UTC
I think this happens because seabios puts the usb disk first into the list of bootable devices.

How does the boot menu (add -boot menu=on, then press F12) look like?

Does the guest boot if you add "bootindex=1" to the virtio-blk-pci device?

Comment 2 Amos Kong 2011-08-03 07:52:50 UTC
(In reply to comment #1)
> I think this happens because seabios puts the usb disk first into the list of
> bootable devices.
> 
> How does the boot menu (add -boot menu=on, then press F12) look like?

1. USB Drive QEMU
2. Virtio disk PCI:0:4
3. Legacy option rom

When I choose option2, guest can boot up from original system.
 
> Does the guest boot if you add "bootindex=1" to the virtio-blk-pci device?

/home/devel/autotest-upstream/client/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20110802-185220-14Tf',server,nowait -serial unix:'/tmp/serial-20110802-185220-14Tf',server,nowait -drive file='/home/devel/autotest-upstream/client/tests/kvm/images/RHEL-Server-6.1-64-virtio.qcow2',index=0,if=none,cache=none,id=disk1 -device virtio-blk-pci,drive=disk1,bootindex=1 -m 2048 -smp 2 -vnc :0 -device usb-ehci,id=ehci -drive file='/tmp/usbdevice.qcow2',if=none,cache=none,id=usb2.1 -device usb-storage,bus=ehci.0,drive=usb2.1,port=2

Guest can boot up from virtio disk.


Hoffmann, autotest doesn't support 'bootindex' right now.

Comment 3 Gerd Hoffmann 2011-08-12 08:09:54 UTC
So it's a bug in autotest, it should be reassigned or closed/notabug.
/me can't find a autotest component.  Do we track autotest issues in rh bugzilla?

Comment 4 Amos Kong 2011-08-12 11:50:55 UTC
(In reply to comment #3)
> So it's a bug in autotest, it should be reassigned or closed/notabug.
> /me can't find a autotest component.  Do we track autotest issues in rh
> bugzilla?

no, RedHat doesn't officially provide autotest as a production.
So we can close this bz, I'll fix this autotest problem.


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