[Libvir] Empty <bootloader> tag?

Hello, I created a guest from XML without a <bootloader> tag. When I run dumpxml on the guest, I notice that an empty <bootloader /> tag is appended. Is this the expected behavior? This seems to differ from the behavior of other optional tags. Thanks! Log: ---------------- $ cat no_boot.xml <domain type='xen' id='-1'> <name>domU1</name> <uuid>12278656-c4c9-11dc-8852-feffffffffff</uuid> <os> <type>linux</type> <kernel>/tmp/default-xen-kernel</kernel> <initrd>/tmp/default-xen-initrd</initrd> <cmdline>TERM=xterm </cmdline> </os> <memory>131072</memory> <vcpu>1</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <interface type='ethernet'> <target dev='vif-1.0'/> <mac address='11:22:33:aa:bb:cc'/> </interface> <disk type='file' device='disk'> <driver name='file'/> <source file='/tmp/default-xen-dimage'/> <target dev='xvda'/> </disk> </devices> </domain> $ sudo virsh define no_boot.xml Domain domU1 defined from no_boot.xml $ sudo virsh dumpxml domU1 <domain type='xen' id='-1'> <name>domU1</name> <uuid>12278656-c4c9-11dc-8852-feffffffffff</uuid> <bootloader/> <os> <type>linux</type> <kernel>/tmp/default-xen-kernel</kernel> <initrd>/tmp/default-xen-initrd</initrd> <cmdline>TERM=xterm </cmdline> </os> <memory>131072</memory> <vcpu>1</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <interface type='ethernet'> <target dev='vif-1.0'/> <mac address='11:22:33:aa:bb:cc'/> </interface> <disk type='file' device='disk'> <driver name='file'/> <source file='/tmp/default-xen-dimage'/> <target dev='xvda'/> </disk> </devices> </domain> -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

On Wed, Jan 16, 2008 at 10:56:39PM -0800, Kaitlin Rupert wrote:
Hello,
I created a guest from XML without a <bootloader> tag. When I run dumpxml on the guest, I notice that an empty <bootloader /> tag is appended. Is this the expected behavior? This seems to differ from the behavior of other optional tags.
Yes & no. You should get a bootloader tag added only if you didn't already have a kerenl/initrd tag. What version of Xen are you using ? Please capture the output of 'xm list --long {NAME OF GUEST}' Dan -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Daniel P. Berrange wrote:
On Wed, Jan 16, 2008 at 10:56:39PM -0800, Kaitlin Rupert wrote:
Hello,
I created a guest from XML without a <bootloader> tag. When I run dumpxml on the guest, I notice that an empty <bootloader /> tag is appended. Is this the expected behavior? This seems to differ from the behavior of other optional tags.
Yes & no. You should get a bootloader tag added only if you didn't already have a kerenl/initrd tag.
What version of Xen are you using ? Please capture the output of
'xm list --long {NAME OF GUEST}'
Dan
sudo /usr/sbin/xm list --long domU1 (domain (on_crash destroy) (uuid 12278656-c4c9-11dc-8852-feffffffffff) (bootloader_args ) (vcpus 1) (name domU1) (on_poweroff destroy) (on_reboot restart) (bootloader ) (maxmem 128) (memory 128) (shadow_memory 0) (cpu_weight 256) (cpu_cap 0) (features ) (on_xend_start ignore) (on_xend_stop ignore) (image (linux (kernel /tmp/default-xen-kernel) (ramdisk /tmp/default-xen-initrd) (args 'TERM=xterm ') ) ) (status 0) (device (vif (mac 11:22:33:aa:bb:cc) (uuid 905b34ee-912a-5ab7-1305-3bc22593916d) ) ) (device (vbd (uuid 367ed7d5-706a-523b-32f5-0199d0bd75f7) (bootable 1) (driver paravirtualised) (dev xvda) (uname file:/tmp/default-xen-dimage) (mode w) ) ) ) Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlin Rupert wrote:
Daniel P. Berrange wrote:
On Wed, Jan 16, 2008 at 10:56:39PM -0800, Kaitlin Rupert wrote:
Hello,
I created a guest from XML without a <bootloader> tag. When I run dumpxml on the guest, I notice that an empty <bootloader /> tag is appended. Is this the expected behavior? This seems to differ from the behavior of other optional tags.
Yes & no. You should get a bootloader tag added only if you didn't already have a kerenl/initrd tag.
What version of Xen are you using ? Please capture the output of 'xm list --long {NAME OF GUEST}'
Dan
sudo /usr/sbin/xm list --long domU1 (domain (on_crash destroy) (uuid 12278656-c4c9-11dc-8852-feffffffffff) (bootloader_args ) (vcpus 1) (name domU1) (on_poweroff destroy) (on_reboot restart) (bootloader ) (maxmem 128)
<snip>
(on_xend_start ignore) (on_xend_stop ignore) (image (linux (kernel /tmp/default-xen-kernel) (ramdisk /tmp/default-xen-initrd) (args 'TERM=xterm ') ) )
Just wanted to follow up on this issue. Since this guest has a kernel tag, it should not have a bootloader tag - is that correct? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Daniel P. Berrange
-
Kaitlin Rupert