Bug 435970

Summary: <boot> tag is silently ignored when defining xen fv guest
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: berrange
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-13 17:37:35 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Config file to test with
none
xend.log, pruned from about a minute before the virsh define
none
xm list --long xen_fv_test none

Description Cole Robinson 2008-03-04 13:18:08 EST
xen fv guests seem to have the <boot> tag stripped. As per the documentation at
http://libvirt.org/format.html this seems like it should be valid. I tried both
<boot dev="hd"/> and <boot dev="cdrom"/>.

This works as expected for qemu guests.

# virsh define xen_fv_test
Domain xen_fv_test defined from xen_fv_test

[root@adama ~]# virsh dumpxml xen_fv_test
<domain type='xen' id='-1'>
  <name>xen_fv_test</name>
  <uuid>0476cc28-562b-3e28-2874-21a123310334</uuid>
  <os>
    <type>hvm</type>
    <loader>/usr/lib/xen/boot/hvmloader</loader>
    <kernel>/usr/lib/xen/boot/hvmloader</kernel>
  </os>
  <memory>524288</memory>
  ...
Comment 1 Cole Robinson 2008-03-04 13:18:09 EST
Created attachment 296777 [details]
Config file to test with
Comment 2 Daniel Berrange 2008-03-04 13:27:41 EST
Can you re-try and remove the <kernel> tag from the XML you define. You should
have either a <kernel> tag, or a <boot> tag, but not both.
Comment 3 Cole Robinson 2008-03-04 13:56:02 EST
Same result. It actually re-adds the kernel line to the xml.
Comment 4 Daniel Berrange 2008-03-04 14:01:43 EST
This may actually be a XenD bug - can you provide the /var/log/xen/xend.log
file, and output of xm list --long
Comment 5 Cole Robinson 2008-03-04 14:15:08 EST
Created attachment 296783 [details]
xend.log, pruned from about a minute before the virsh define
Comment 6 Cole Robinson 2008-03-04 14:15:39 EST
Created attachment 296784 [details]
xm list --long xen_fv_test
Comment 7 Cole Robinson 2008-03-04 14:15:55 EST
Also:

# rpm -q xen
xen-3.2.0-10.fc9
Comment 8 Daniel Berrange 2008-03-04 17:19:01 EST
Ok, I think I know what the issue is

In the xend_parse_sexp_desc_os() method of xend_internal.c in libvirt, the line

    if (kernel) {

Needs to be

    if (kernel && STRNEQ(kernel, loader)) {

To deal with HVM loader being referenced in the 'kenrel' field too
Comment 9 Cole Robinson 2008-03-04 17:32:48 EST
Awesome! I just tested it and that seemed to do the trick. Thanks
Comment 11 Daniel Berrange 2008-03-13 17:37:35 EDT
Fixed in rawhide libvirt-0.4.1-4.fc9