[libvirt] Xen: How to describe bridged network adapter in libvirt-XML?

Hi, I'm looking for a solution to convert the Xen configuration line vif = ["bridge=eth0"] to the libvirt XML description format which can be used by the createLinux() function (using Python). I tried several things like <interface type="bridge"> <source bridge="eth0" /> <target dev="eth0" /> <mac address="aa:00:00:00:00:12" /> <script path="/etc/xen/scripts/vif-bridge" /> </interface> but they didn't work. Everytime I start up the guest using libvirt, no virtual network device is created (= there's no "vifXX.0" when running "brctl show"). It works perfectly with the Xen configuration line mentioned above. Hope you can help me with that. Best regards, Andreas

Fortunately I found the problem myself. Maybe I should use schema checking from now on, because I put the <interface> element outside <devices> by mistake... A small tip: "virsh dumpxml" is very good for finding out the configuration of Xen domains. Regards Andreas
Hi,
I'm looking for a solution to convert the Xen configuration line
vif = ["bridge=eth0"]
to the libvirt XML description format which can be used by the createLinux() function (using Python). I tried several things like
<interface type="bridge"> <source bridge="eth0" /> <target dev="eth0" /> <mac address="aa:00:00:00:00:12" /> <script path="/etc/xen/scripts/vif-bridge" /> </interface>
but they didn't work. Everytime I start up the guest using libvirt, no virtual network device is created (= there's no "vifXX.0" when running "brctl show"). It works perfectly with the Xen configuration line mentioned above.
Hope you can help me with that.
Best regards, Andreas
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, Jun 16, 2009 at 03:29:48PM +0100, Andreas Sommer wrote:
Fortunately I found the problem myself. Maybe I should use schema checking from now on, because I put the <interface> element outside <devices> by mistake...
A small tip: "virsh dumpxml" is very good for finding out the configuration of Xen domains.
FYI, if you have example 'xm' config files you can also query those directly for the matching XML http://libvirt.org/drvxen.html#imex Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Andreas Sommer
-
Daniel P. Berrange