Bug 810496

Summary: bootindex is not the same as assigned in the command line for the virtio-scsi controller
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: seabiosAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: bcao, chayang, juzhang, michen, pbonzini, qzhang, sluo, virt-maint, wdai
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-05-18 12:15:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sibiao Luo 2012-04-06 12:45:24 UTC
Description of problem:
boot a rhel6.3 guest with a virtio-scsi data disk on different controller (virtio-scsi-pci) with "-boot menu=on" in the command line, and assign the bootindex for the image and data disk. but find that bootindex which was found via pressing F12 during POST is not the same as assigned in the command line.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-251.el6.x86_64
qemu-kvm-0.12.1.2-2.270.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-16.el6.x86_64
guest info:
rhel6.3_20120313_x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot a rhel6.3 guest with a virtio-scsi data disk on different controllers and assign bootindex.
eg: # /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu SandyBridge -enable-kvm -smp 8,sockets=1,cores=8,threads=1 -m 4G -usb -device usb-tablet,id=input0 -name RHEL-Server-6.3-64 -uuid `uuidgen` -net none -device virtio-balloon-pci,id=ballooning -spice port=5931,disable-ticketing -vga qxl -monitor stdio -boot menu=on -nodefaults -nodefconfig -drive file=/home/lv_seabios/data-disk.qcow2,if=none,id=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1 -device scsi-hd,drive=disk,bus=scsi1.0,id=hd-scsi,bootindex=2 -drive file=/home/lv_seabios/rhel6.3_20120313_x86_64.qcow2,if=none,id=cd,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi -device scsi-hd,bus=scsi.0,drive=cd,id=drive-scsi,bootindex=1
2.press F12 during POST
3.select one bootable device to boot the VM.

Actual results:
after the step 2,
SeaBIOS (version seabios-0.6.1.2-16.el6)

Press F12 for boot menu.

Select boot device:

1. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
3. Legacy option rom

after the step 3,
if select "1", Boot failed: not a bootable disk.
if select "2", the VM can boot successfully without any errors.

Expected results:
select "1", the VM can boot successfully without any errors.
select "2", Boot failed: not a bootable disk.

Additional info:
1.i have tried it on seabios-0.6.1.2-12.el6.x86_64, also hit this issue.
2.if the image and data disk are the same virtio-scsi controllers, also hit this issue.
3....-drive file=/home/lv_seabios/rhel6.3_20120313_x86_64.qcow2,if=none,id=cd,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi -device scsi-hd,bus=scsi.0,drive=cd,id=drive-scsi,bootindex=2 -drive file=/home/lv_seabios/data-disk.qcow2,if=none,id=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1 -device scsi-hd,drive=disk,bus=scsi1.0,id=hd-scsi,bootindex=1
after the step3, if i select "1", the VM can boot successfully, if i select "2",Boot failed: not a bootable disk.

Comment 2 Paolo Bonzini 2012-05-16 15:01:27 UTC
This could be fixed in qemu-kvm-0.12.1.2-2.294.el6; two patches were missing when bug 802284 was committed to distgit.

Comment 3 Sibiao Luo 2012-05-17 01:37:03 UTC
(In reply to comment #2)
> This could be fixed in qemu-kvm-0.12.1.2-2.294.el6; two patches were missing
> when bug 802284 was committed to distgit.

OK, thanks for Paolo's helps, I will retest it and tell you the test results.

Comment 4 Sibiao Luo 2012-05-17 03:20:03 UTC
(In reply to comment #2)
> This could be fixed in qemu-kvm-0.12.1.2-2.294.el6; two patches were missing
> when bug 802284 was committed to distgit.

Hi Paolo,

   I have tested in your instruction with the same steps as Comment #0, and the test results is that the bootindex is the same as assigned in the command line for the virtio-scsi controller. so, this issue has been fixed correctly in qemu-kvm-0.12.1.2-2.294.el6. Thanks for Paolo's helps.

CLI: # /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu cpu64-rhel6,+x2apic -enable-kvm -smp 4,sockets=2,cores=2,threads=1 -m 4G -usb -device usb-tablet,id=input0 -name RHEL-Server-6.3-64 -uuid `uuidgen` -net none -device virtio-balloon-pci,id=ballooning -spice port=5931,disable-ticketing -vga qxl -device sga -serial stdio -boot menu=on -nodefaults -nodefconfig -drive file=/home/sluo-image/windows_server_2008_sp2_x64.qcow2,if=none,id=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1 -device scsi-hd,drive=disk,bus=scsi1.0,id=hd-scsi,bootindex=2 -drive file=/home/sluo-image/RHEL6.3-20120502.3-Server-x86_64-copy.qcow2,if=none,id=cd,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi -device scsi-hd,bus=scsi.0,drive=cd,id=drive-scsi,bootindex=1

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-272.el6.x86_64
qemu-kvm-0.12.1.2-2.294.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-16.el6.x86_64

test results:
after the step 2,
SeaBIOS (version seabios-0.6.1.2-16.el6)

Press F12 for boot menu.

Select boot device:

1. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
2. virtio-scsi Drive QEMU QEMU HARDDISK 0.12
3. Legacy option rom

after the step 3,
if select "1", booting Red Hat Enterprise Linux Server (2.6.32-270.el6.x86_64) VM guest successfully without any errors.
if select "2", boot the windows_server_2008_sp2_x64 VM guest successfully without any errors.

Comment 5 Paolo Bonzini 2012-05-18 12:15:14 UTC
Closing as duplicate of the virtio-scsi implementation bug, which is ON_QA.

*** This bug has been marked as a duplicate of bug 782029 ***