Bug 803943 - virtio-scsi ignores bootindex option
virtio-scsi ignores bootindex option
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: seabios (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On:
Blocks: 769712 857935 889075
  Show dependency treegraph
 
Reported: 2012-03-15 23:53 EDT by daiwei
Modified: 2012-12-20 02:25 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-20 11:54:44 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 daiwei 2012-03-15 23:53:40 EDT
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 14:02:19 EDT
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-18 23:38:54 EDT
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 11:54:44 EDT
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.

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