Hi,
I'm using libvirt 0.6.2 to create a Xen guest with a network type
interface (see XML below). When the guest is defined, the interface is
converted to an ethernet type interface. If the guest is started, the
interface is then converted to a bridge type interface.
The progression from network type to ethernet type to bridge type seems
odd to me. With older versions of libvirt, the network type interface
was converted to bridge type during the define, so I'm curious what the
reasoning is here.. Is this the expected behavior?
Also, the XML for the bridge interface in 0.6.2 doesn't include the
source network. This information should be available, so I'm not sure
why its not being set in the XML..
Thanks!
=================
# virsh list --all
Id Name State
----------------------------------
0 Domain-0 running
- rstest_domain shut off
# cat tmp
<domain type="xen">
<name>hd_domain</name>
<on_poweroff>destroy</on_poweroff>
<on_crash>destroy</on_crash>
<uuid>f99fd6b6-1434-4bc2-88e0-1ed9c8c6f8e9</uuid>
<os>
<type>linux</type>
<kernel>/tmp/default-xen-kernel</kernel>
<initrd>/tmp/default-xen-initrd</initrd>
<cmdline/>
</os>
<currentMemory>131072</currentMemory>
<memory>131072</memory>
<vcpu>1</vcpu>
<devices>
<disk type="file" device="disk">
<source file="/tmp/default-xen-dimage"/>
<target dev="xvda"/>
</disk>
<interface type="network">
<mac address="00:11:22:33:44:aa"/>
<source network="default"/>
</interface>
<input type="mouse" bus="xen"/>
<graphics type="vnc" port="-1" listen="127.0.0.1"
keymap="en-us"/>
</devices>
</domain>
# virsh define tmp
Domain hd_domain defined from tmp
# virsh list --all
Id Name State
----------------------------------
0 Domain-0 running
- hd_domain shut off
- rstest_domain shut off
[root@elm3b25 cimtest]# virsh dumpxml hd_domain
<domain type='xen'>
<name>hd_domain</name>
<uuid>f99fd6b6-1434-4bc2-88e0-1ed9c8c6f8e9</uuid>
<memory>131072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='xenpv'>linux</type>
<kernel>/tmp/default-xen-kernel</kernel>
<initrd>/tmp/default-xen-initrd</initrd>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/tmp/default-xen-dimage'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='ethernet'>
<mac address='00:11:22:33:44:aa'/>
</interface>
<console type='pty'>
<target port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='-1' autoport='yes'
listen='127.0.0.1'
keymap='en-us'/>
</devices>
</domain>
# virsh start hd_domain
Domain hd_domain started
[root@elm3b25 cimtest]# virsh dumpxml hd_domain
<domain type='xen' id='61'>
<name>hd_domain</name>
<uuid>f99fd6b6-1434-4bc2-88e0-1ed9c8c6f8e9</uuid>
<memory>131072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<os>
<type>linux</type>
<kernel>/tmp/default-xen-kernel</kernel>
<initrd>/tmp/default-xen-initrd</initrd>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/tmp/default-xen-dimage'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:11:22:33:44:aa'/>
<script path='vif-bridge'/>
<target dev='vif61.0'/>
</interface>
<console type='pty' tty='/dev/pts/4'>
<source path='/dev/pts/4'/>
<target port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes'
listen='127.0.0.1'
keymap='en-us'/>
</devices>
</domain>
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com