[libvirt] hooking a physical nic to a bridge with net-create

Hi I trying to set up a network configuration using libvirt The setup is: 1. a VM using virtio using a tap device connected to a bridge device 2. on the host side eth0 added to the same bridge device(without ip) using libvirt application (say virsh) I want to launch this set up: virsh net-create for the second part virsh create for the first part(tap, virtio, vm etc) I can set the first part(vm, tap, virtio) using the domain xml but I'm also interested in XMLing the second part and net-create it. I tried but only suceeded in creating the bridge Is it possible? am I missing somthing? Thanks in advance

On Tue, Jun 23, 2009 at 07:52:25AM -0700, Shahar Klein wrote:
Hi
I trying to set up a network configuration using libvirt
The setup is:
1. a VM using virtio using a tap device connected to a bridge device 2. on the host side eth0 added to the same bridge device(without ip)
using libvirt application (say virsh) I want to launch this set up:
virsh net-create for the second part virsh create for the first part(tap, virtio, vm etc)
I can set the first part(vm, tap, virtio) using the domain xml but I'm also interested in XMLing the second part and net-create it. I tried but only suceeded in creating the bridge
Is it possible? am I missing somthing?
This isn't what the net-XXX commnads is for. The functionality you are after is in process of being implemented and will appear as iface-XXX commands (for host interface managment) For more info about libvirt networking, read this page http://wiki.libvirt.org/page/Networking 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 :|

Thanks Daniel Those iface-XXX commands can I use them(partly) now? or where can I see their spec/xml template? Thanks Shahar ________________________________ From: Daniel P. Berrange <berrange@redhat.com> To: Shahar Klein <shaharklein@yahoo.com> Cc: libvir-list@redhat.com Sent: Wednesday, June 24, 2009 12:02:59 PM Subject: Re: [libvirt] hooking a physical nic to a bridge with net-create On Tue, Jun 23, 2009 at 07:52:25AM -0700, Shahar Klein wrote:
Hi
I trying to set up a network configuration using libvirt
The setup is:
1. a VM using virtio using a tap device connected to a bridge device 2. on the host side eth0 added to the same bridge device(without ip)
using libvirt application (say virsh) I want to launch this set up:
virsh net-create for the second part virsh create for the first part(tap, virtio, vm etc)
I can set the first part(vm, tap, virtio) using the domain xml but I'm also interested in XMLing the second part and net-create it. I tried but only suceeded in creating the bridge
Is it possible? am I missing somthing?
This isn't what the net-XXX commnads is for. The functionality you are after is in process of being implemented and will appear as iface-XXX commands (for host interface managment) For more info about libvirt networking, read this page http://wiki.libvirt.org/page/Networking 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 :|

On 06/24/2009 05:16 AM, Shahar Klein wrote:
Those iface-XXX commands can I use them(partly) now? or where can I see their spec/xml template?
Some parts of the code are committed to CVS, some parts have been submitted to the list and ACKed, but not committed yet, still other bits have been submitted for comments, but aren't yet ready to be committed. So I guess the answer is "no" for now, but "yes" *very* soon ;-). If you want to look at the patches yourself, search for "virInterface" in the list archives. The XML is also not yet stable (there's been a lot of discussion about that during the last week). Currently, the XML for libvirt virInterface* is identical to the XML used by libnetcf: https://fedorahosted.org/netcf/ libvirt will be using netcf as the backend to implement all the virInterface functions.

I tried the virInterface that is already in 0.6.4 but got this: libvir: error : this function is not supported by the hypervisor: virInterfaceDefineXML ERROR virInterfaceDefineXML Can I use netcf just to get the feeling of it? I mean use netcf as an admin user i.e. define an XML that for example say somthing like that: "define tap device tap8 and vlan 3888 over bond1 and add these two to bridge br12" can I do that with netcf? thanks again shahar ________________________________ From: Laine Stump <laine@laine.org> To: Shahar Klein <shaharklein@yahoo.com> Cc: libvir-list@redhat.com Sent: Wednesday, June 24, 2009 8:20:58 PM Subject: Re: [libvirt] hooking a physical nic to a bridge with net-create On 06/24/2009 05:16 AM, Shahar Klein wrote:
Those iface-XXX commands can I use them(partly) now? or where can I see their spec/xml template?
Some parts of the code are committed to CVS, some parts have been submitted to the list and ACKed, but not committed yet, still other bits have been submitted for comments, but aren't yet ready to be committed. So I guess the answer is "no" for now, but "yes" *very* soon ;-). If you want to look at the patches yourself, search for "virInterface" in the list archives. The XML is also not yet stable (there's been a lot of discussion about that during the last week). Currently, the XML for libvirt virInterface* is identical to the XML used by libnetcf: https://fedorahosted.org/netcf/ libvirt will be using netcf as the backend to implement all the virInterface functions.

On Wed, Jun 24, 2009 at 09:05:40PM -0700, Shahar Klein wrote:
I tried the virInterface that is already in 0.6.4 but got this: libvir: error : this function is not supported by the hypervisor: virInterfaceDefineXML ERROR virInterfaceDefineXML
Can I use netcf just to get the feeling of it?
Of course, the code is available there.. https://fedorahosted.org/netcf/ We simply haven't finish plugging it into libvirt
I mean use netcf as an admin user i.e. define an XML that for example say somthing like that: "define tap device tap8 and vlan 3888 over bond1 and add these two to bridge br12" can I do that with netcf?
netcf doesn't concern itself with TAP devices - those are related to guest domains. netcf does allow you to configure anything you would traditionally do via /etc/sysconfig/network-scripts (or /etc/network on Debian). So creating bridges on VLANs over bond devices, and that kind of thing. 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 :|

Correct me if I'm wrong but it seems that the vlan support is not in netcf yet... ________________________________ From: Daniel P. Berrange <berrange@redhat.com> To: Shahar Klein <shaharklein@yahoo.com> Cc: Laine Stump <laine@laine.org>; libvir-list@redhat.com Sent: Thursday, June 25, 2009 12:16:47 PM Subject: Re: [libvirt] hooking a physical nic to a bridge with net-create On Wed, Jun 24, 2009 at 09:05:40PM -0700, Shahar Klein wrote:
I tried the virInterface that is already in 0.6.4 but got this: libvir: error : this function is not supported by the hypervisor: virInterfaceDefineXML ERROR virInterfaceDefineXML
Can I use netcf just to get the feeling of it?
Of course, the code is available there.. https://fedorahosted.org/netcf/ We simply haven't finish plugging it into libvirt
I mean use netcf as an admin user i.e. define an XML that for example say somthing like that: "define tap device tap8 and vlan 3888 over bond1 and add these two to bridge br12" can I do that with netcf?
netcf doesn't concern itself with TAP devices - those are related to guest domains. netcf does allow you to configure anything you would traditionally do via /etc/sysconfig/network-scripts (or /etc/network on Debian). So creating bridges on VLANs over bond devices, and that kind of thing. 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 (4)
-
Daniel P. Berrange
-
David Lutterkort
-
Laine Stump
-
Shahar Klein