Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 803943

Summary: virtio-scsi ignores bootindex option
Product: Red Hat Enterprise Linux 6 Reporter: daiwei <wdai>
Component: seabiosAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bsarathy, juzhang, michen, mkenneth, pbonzini, shuang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-20 15:54:44 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: 769712, 857935, 889075    

Description daiwei 2012-03-16 03:53:40 UTC
Description of problem:

Boot guest with more disks on different controllers(virtio-scsi-pci) and have the same scsi-id=0,lun=0.Boot guest failed.Guest hangs at "Booting from Hard Disk ..."

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


How reproducible:
100%

Steps to Reproduce:
1.Boot guest with two disks on different controllers(virtio-scsi-pci) and have the same scsi-id=0,lun=0

/usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -name RHEL-Server-6.3-64 -smp 2 -m 4G -uuid 4bbfae8f-0d08-41ad-926a-c7a7568d50f7 -boot menu=on,order=cdn -drive file=/home/rhel6.3-64.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=virtio-scsi-pci0,bus=pci.0,addr=0x5 -device scsi-hd,drive=drive-virtio-disk0,logical_block_size=512,physical_block_size=512,scsi-id=0,lun=0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=44:37:E6:5E:A3:F2,bus=pci.0,addr=0x4,id=net0 -vnc :1 -vga std -balloon none -monitor stdio -usb -usbdevice tablet -drive file=/home/test.raw,if=none,id=test -device virtio-scsi-pci,id=databus -device scsi-hd,drive=test,scsi-id=0,lun=0,bootindex=2 -nodefconfig -nodefaults

2.
3.
  
Actual results:
Guest hangs at "Booting from Hard Disk ..."

Expected results:
Boot guest successfully.

Additional info:

1.Boot guest with more disks have different scsi-id or different lun ID successful.

2.When early boot, press F12 entry boot menu and find the system disk is the second one,press 2 to select boot from system disk can boot successfully.

Comment 1 Paolo Bonzini 2012-03-16 18:02:19 UTC
I can't reproduce this:

x86_64-softmmu/qemu-system-x86_64 \
  -device virtio-scsi-pci,id=bus1 \
  -drive if=none,file=$HOME/Download/boot.iso,id=cd \
  -device scsi-cd,drive=cd,bus=bus1.0,bootindex=1 -monitor stdio -m 512 \
  -device virtio-scsi-pci,id=bus2 \
  -drive if=none,file=$HOME/test.img,id=hd \
  -device scsi-hd,drive=hd,bus=bus2.0,bootindex=2 -boot menu=on

boots from CD.

x86_64-softmmu/qemu-system-x86_64 \
  -device virtio-scsi-pci,id=bus1 \
  -drive if=none,file=$HOME/Download/boot.iso,id=cd \
  -device scsi-cd,drive=cd,bus=bus1.0,bootindex=2 -monitor stdio -m 512 \
  -device virtio-scsi-pci,id=bus2 \
  -drive if=none,file=$HOME/test.img,id=hd \
  -device scsi-hd,drive=hd,bus=bus2.0,bootindex=1 -boot menu=on

boots from harddisk.

x86_64-softmmu/qemu-system-x86_64 \
  -device virtio-scsi-pci,id=bus1 \
  -drive if=none,file=$HOME/openbsd.qcow2,id=bsd \
  -device scsi-hd,drive=bsd,bus=bus1.0,bootindex=1 -monitor stdio -m 512 \
  -device virtio-scsi-pci,id=bus2 \
  -drive if=none,file=$HOME/test.img,id=hd \
  -device scsi-hd,drive=hd,bus=bus2.0,bootindex=2 -boot menu=on

boots from harddisk openbsd.qcow2.

x86_64-softmmu/qemu-system-x86_64 \
  -device virtio-scsi-pci,id=bus1 \
  -drive if=none,file=$HOME/openbsd.qcow2,id=bsd \
  -device scsi-hd,drive=bsd,bus=bus1.0,bootindex=2 -monitor stdio -m 512 \
  -device virtio-scsi-pci,id=bus2 \
  -drive if=none,file=$HOME/test.img,id=hd \
  -device scsi-hd,drive=hd,bus=bus2.0,bootindex=1 -boot menu=on

boots from harddisk test.img.

In all cases, boot menu works okay to boot the second entry.

Can you try narrowing the command-line further?

Note that boot is only supported from LUN 0 for now.

Comment 2 daiwei 2012-03-19 03:38:54 UTC
Hi Paolo,

I did not notice the _bus_ option. With the _bus_ option bootindex works normally.

BTW, in qemu monitor run command "info qtree", I can't find _bus_ option under scsi-hd. Is this correct ?

Thanks.

Comment 3 Paolo Bonzini 2012-03-20 15:54:44 UTC
The bus option is not in "info qtree", but it defines in which branch of the tree the devices are added.

Anyhow this was a configuration problem (boot is only supported from LUN 0), so closing.