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 21:37:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
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 18:18:08 UTC
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 18:18:09 UTC
Created attachment 296777 [details]
Config file to test with

Comment 2 Daniel Berrangé 2008-03-04 18:27:41 UTC
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 18:56:02 UTC
Same result. It actually re-adds the kernel line to the xml.

Comment 4 Daniel Berrangé 2008-03-04 19:01:43 UTC
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 19:15:08 UTC
Created attachment 296783 [details]
xend.log, pruned from about a minute before the virsh define

Comment 6 Cole Robinson 2008-03-04 19:15:39 UTC
Created attachment 296784 [details]
xm list --long xen_fv_test

Comment 7 Cole Robinson 2008-03-04 19:15:55 UTC
Also:

# rpm -q xen
xen-3.2.0-10.fc9


Comment 8 Daniel Berrangé 2008-03-04 22:19:01 UTC
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 22:32:48 UTC
Awesome! I just tested it and that seemed to do the trick. Thanks

Comment 11 Daniel Berrangé 2008-03-13 21:37:35 UTC
Fixed in rawhide libvirt-0.4.1-4.fc9