Bug 1328318

Summary: suggest unify boot behavior when using "<boot dev='hd'/>" or "<boot dev='hd'/> <bootmenu enable='yes'/>"
Product: Red Hat Enterprise Linux 7 Reporter: lijuan men <lmen>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: dyuan, rbalakri, xuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-19 08:09:24 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 lijuan men 2016-04-19 05:28:08 UTC
Description of problem:
when using <boot dev='hd'/> in guest xml,guest will only try to boot from the disk.
when using <boot dev='hd'/> and <bootmenu enable='yes'/>,guest will try to boot from unselected device.
suggest unify the boot behavior. Either only boot from the disk, or try to boot all the devices in guest.

Version-Release number of selected component (if applicable):
libvirt-1.3.3-2.el7.x86_64
qemu-kvm-rhev-2.5.0-4.el7.x86_64
kernel-3.10.0-327.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.start a guest with xml:
 <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.2.0'>hvm</type>
    <boot dev='hd'/>
  </os>
...
 <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/a1.img'/>   -->not bootable disk
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/root/RHEL-7.2-20151030.0-Server-x86_64-dvd1.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
...

2.[root@localhost ~]# ps -ef | grep guest
... ***-boot strict=on*** ...
-drive file=/var/lib/libvirt/images/a1.img,format=raw,if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,***bootindex=1***....


3.start a guest with xml:
 <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.2.0'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='yes'/>
  </os>
...
 <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/a1.img'/>   -->not bootable disk
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/root/RHEL-7.2-20151030.0-Server-x86_64-dvd1.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
...

4.[root@localhost ~]# ps -ef | grep guest
...-boot ***order=c,menu=on,strict=on***...
-drive file=/var/lib/libvirt/images/a1.img,format=raw,if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0...

Actual results:
in step 1,guest will only try to boot from the disk.boot failed.
in step 3,guest boots from disk,failed. Then tries to boot from cdrom.

Expected results:
suggest unify boot behaviors in step1 and step3,because they are both using the same <boot dev='hd'/>.

Additional info:

Comment 1 Jiri Denemark 2016-04-19 08:09:24 UTC

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