Bug 435970 - <boot> tag is silently ignored when defining xen fv guest
Summary: <boot> tag is silently ignored when defining xen fv guest
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-04 18:18 UTC by Cole Robinson
Modified: 2008-03-13 21:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-13 21:37:35 UTC


Attachments (Terms of Use)
Config file to test with (974 bytes, text/plain)
2008-03-04 18:18 UTC, Cole Robinson
no flags Details
xend.log, pruned from about a minute before the virsh define (8.40 KB, text/plain)
2008-03-04 19:15 UTC, Cole Robinson
no flags Details
xm list --long xen_fv_test (1.35 KB, text/plain)
2008-03-04 19:15 UTC, Cole Robinson
no flags Details

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


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