Bug 670399 - Libvirt should report an error when qemu-kvm doesn't support 'per-device boot order'
Summary: Libvirt should report an error when qemu-kvm doesn't support 'per-device boot...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-18 06:19 UTC by zhanghaiyan
Modified: 2011-05-19 13:25 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.8.7-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:25:46 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description zhanghaiyan 2011-01-18 06:19:51 UTC
Description of problem:
Setting per-device boot order in guest xml config and define&start the guest. Libvirt doesn't report any error while in fact qemu-kvm doesn't support this feature at all. 

Version-Release number of selected component (if applicable):
- libvirt-0.8.7-2.el6.x86_64
- qemu-kvm-0.12.1.2-2.129.el6.x86_64

How reproducible:
always

Steps to Reproduce:
NB: rhel6-1.img is a bootable image file while haha.img is a fake null file.
1. Edit an xml specifying boot order as below
....
  <os>
    <type arch='x86_64' machine='rhel6.0.0'>hvm</type>
  </os>
....
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/Share/yoyzhang/haha.img'/>
      <target dev='hdb' bus='ide'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' unit='1'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/Share/yoyzhang/rhel6-1.img'/>
      <target dev='hda' bus='ide'/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
2. Define and start the guest
# virsh start rhel6
Domain rhel6 started
The guest boot up successfully from the 2nd order hda device rhel6-1.img and
can log in the guest
3. Check qemu command line
# ps axu|grep qemu
qemu     16065 10.1  4.3 1317348 346952 ?      Sl   00:59   0:18
/usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 1024 -smp
1,sockets=1,cores=1,threads=1 -name rhel6 -uuid
a895bf3f-1354-68ac-5c49-c16af2c6a4d5 -nodefconfig -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/rhel6.monitor,server,nowait -mon
chardev=monitor,mode=control -rtc base=utc -drive
file=/mnt/Share/yoyzhang/haha.img,if=none,id=drive-ide0-0-1,format=raw,cache=none
-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive
file=/mnt/Share/yoyzhang/rhel6-1.img,if=none,id=drive-ide0-0-0,format=raw,cache=none
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev
tap,fd=24,id=hostnet0 -device
rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:b1:94:d2,bus=pci.0,addr=0x3
-chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc
127.0.0.1:0 -k en-us -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
root     16333  0.0  0.0 103152   832 pts/0    S+   01:02   0:00 grep qemu
  
Actual results:
2. The guest boot up successfully from the 2nd order hda device rhel6-1.img and
3. Indicates qemu-kvm doesn't support this feature because no bootindex=n there

Expected results:
2. Libvirt should report an error when qemu-kvm doesn't support this feature.

Additional info:
Please refer to bug 646895 to know more about the feature

Comment 2 Jiri Denemark 2011-01-18 08:14:31 UTC
Yeah, right, I had this in mind but apparently I forgot to implement this simple check.

Comment 3 Jiri Denemark 2011-01-19 15:26:29 UTC
Fixed upstream by

commit 45c02ee06fca418158e47c1e8096adcff6890818
Author: Jiri Denemark <jdenemar>
Date:   Tue Jan 18 10:04:21 2011 +0100

    qemu: Fail if per-device boot is used but deviceboot is not supported

and sent for internal review.

Comment 5 Cui Chun 2011-01-21 03:27:56 UTC
Verified. Pass.

bug 670399

Test environment:
libvirt-0.8.7-3.el6
qemu-kvm-0.12.1.2-2.128.el6
kernel-2.6.32-94.el6

Verified this bug according to steps of description. 
The valid error message can be reported and domain can't be started too.

# virsh start cc
error: Failed to start domain cc
error: unsupported configuration: hypervisor lacks deviceboot feature

Comment 6 Cui Chun 2011-01-21 08:20:48 UTC
Sorry, qemu-kvm version is qemu-kvm-0.12.1.2-2.129.el6.

Comment 9 errata-xmlrpc 2011-05-19 13:25:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html


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