| Summary: | Libvirt should report an error when qemu-kvm doesn't support 'per-device boot order' | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | zhanghaiyan <yoyzhang> |
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 6.1 | CC: | ccui, dallan, dyuan, eblake, jdenemar, jyang, llim, mjenner, xen-maint |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.8.7-3.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-19 13:25:46 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Yeah, right, I had this in mind but apparently I forgot to implement this simple check. 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.
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 Sorry, qemu-kvm version is qemu-kvm-0.12.1.2-2.129.el6. 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 |
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