Bug 888633

Summary: don't boot from un-selected devices
Product: Red Hat Enterprise Linux 6 Reporter: Amos Kong <akong>
Component: seabiosAssignee: Amos Kong <akong>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: ailan, alex.williamson, aliguori, dallan, flang, gleb, juli, juzhang, knoel, lnovich, lsu, michen, qzhang, rhod, virt-maint, wduffee, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: seabios-0.6.1.2-27.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 888635 903204 1039446 (view as bug list) Environment:
Last Closed: 2013-11-21 21:16:42 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:
Bug Depends On:    
Bug Blocks: 888635, 903204, 1039446    

Description Amos Kong 2012-12-19 04:12:32 UTC
Description of problem:

As I said in https://bugzilla.redhat.com/show_bug.cgi?id=831273#c10

VMs after failure of network boot tries to boot from other devices even if the they are not selected, this problem also exists in seabios upstream.

Currently we would adjust the priority according boot_deivces parameter in seabios, the default priority is 9999. We can resolve this issue by ignoring boot dev if its priority is 9999.

Version-Release number of selected component (if applicable):
seabios-0.6.1.2-25.el6.x86_64

How reproducible:

Steps to Reproduce:
1. qemu-kvm -boot order=c rhel6.image.qcow2   (vm disk is non-bootable)
  
Actual results:
1. vm will try to boot from disk, and failed
2. vm also try to boot from un-selected network 

Expected results:
vm only try to boot from disk.

Additional info:
related bug: Bug 821331 - [RFE] KVM guest retry pxe booting even after failure

Comment 1 Amos Kong 2012-12-19 07:31:05 UTC
posted patch to seabios maillist
http://marc.info/?l=qemu-devel&m=135590174618120&w=3

Comment 2 Amos Kong 2012-12-29 00:40:48 UTC
V2 posted to upsteam:
http://www.seabios.org/pipermail/seabios/2012-December/005223.html
[SeaBIOS PATCH v2] boot: support strict boot and make it configurable

Comment 4 langfang 2013-03-20 06:22:07 UTC
HOst:
# uname -r
2.6.32-358.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.358.el6.x86_64


1.Boot  vm (disk is non-bootable)
/usr/libexec/qemu-kvm -drive file=/home/test.qcow2,if=none,id=drive-ide0-0-0,format=raw,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -vnc :0  -monitor stdio

Results:

Guest tried boot from Floppy,CDROM,Netowork-->show "No bootalbe device"

Comment 5 langfang 2013-03-20 08:02:31 UTC
HOst:
# uname -r
2.6.32-358.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.358.el6.x86_64


1.Boot  vm (disk is non-bootable)
/usr/libexec/qemu-kvm -drive file=/home/test.qcow2,if=none,id=drive-ide0-0-0,format=raw,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -vnc :0  -monitor stdio

Results:

Guest tried boot from Hard Disk-->tried to Floppy,CDROM,Netowork...-->show "No bootalbe device"

Comment 7 langfang 2013-05-09 08:44:54 UTC
Test this bug as following version:
Host:
# uname -r
2.6.32-373.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.355.el6.x86_64

seabios-0.6.1.2-27.el6.x86_64

Guest:
2.6.32-373.el6.x86_64

Steps:
1.boot guest with " strict=on"
.. /usr/libexec/qemu-kvm -drive file=/home/test.qcow2,if=none,id=drive-ide0-0-0,format=raw,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -vnc :0  -monitor stdio -boot strict=on

Results:

Guest only boot from hard disk,if can not boot ,not tried boot other devices.


Attional info(other tests):
1.Boot guest with hard disk(bootindex=1),CDROM(bootindex=2) and " -boot strict=on".Guest tried boot from Hard disk-->CDROM

2.Boot guest with hard disk(bootindex=2 ),network(bootindex=3),CDROM(bootindex=1)and "-boot strict=on" Guest tried boot from CDROM-->Hard disk-->network

3.Because fix is only for New interface (bootindex), so only test with "bootindex".


According to above test ,this bug fixed.

Comment 13 langfang 2013-08-09 09:13:54 UTC
Reproduce this bug as follow version:
Version:
Host:
# uname -r
2.6.32-405.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.382.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-26.el6.x86_64

Steps:
1.Boot guest (Hard disk(bootindex=1),CDROM(bootindex=2))
 /usr/libexec/qemu-kvm -M rhel6.5.0 -m 4G -smp 4 -device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0,indirect_desc=off,event_idx=off -drive file=/home/test55.qcow2,if=none,id=drive-scsi0-0-0,media=disk,cache=none,format=raw,werror=stop,rerror=stop,aio=threads -device scsi-hd,drive=drive-scsi0-0-0,bus=scsi0.0,scsi-id=0,lun=0,id=flang,bootindex=1 -spice port=5830,disable-ticketing -vga qxl -qmp tcp:0:5555,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/tty1,server,nowait  -boot menu=on -monitor stdio -drive if=none,id=drive-cd-disk-1,media=cdrom,format=raw,cache=none,werror=stop,rerror=stop -device scsi-cd,drive=drive-cd-disk-1,bus=scsi0.0,id=scsi_cd2,bootindex=2   -device virtio-scsi-pci,bus=pci.0,addr=0x6,id=scsi1 -netdev tap,vhost=on,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2c:45:23,bus=pci.0,addr=0x4,id=net0 

Results:
1)Boot from Hard disk-->Tried CDROM--->Tried CDROM--->Tried network...



Verify this bug as follow version

Host:
# uname -r
2.6.32-405.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.382.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-28.el6.x86_64

1.Boot guest with "-boot strict=on"

Resutls:

Tried boot from Hard disk--->Tried CDROM-->no bootable device

Guest only boot from hard disk,if can not boot ,not tried boot other devices.

According to above test , this bug has fixed .

Comment 15 errata-xmlrpc 2013-11-21 21:16:42 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-1655.html