[libvirt-users] libvirt bridge configuration

Hi Every one, I'm hoping some one can point me in the right direction. We are piloting KVM + Libvirt for migrating off Xen and I'm stuck with the network bridge configuration via libvirt. What we have currently with xen is: 1 server with Wan/lan interfaces and a pool of public ip addresses. Using xen bridge scripts I'd start a xenbr0 and attach eth0 (wan) and go ahead and assign public IP's to images attached to xenbr0. Now with creating virbr0, I need to assign it an ip address? and routing methods? what about creating a transparent bridge via libvirt? I kno I can achieve this using bridge utils, but it would be nice to have everything handled by libvirt. Any help would be appreciated. cheers, Taras

On 31/01/2011, at 5:52 AM, Taras Lipatov wrote:
Hi Every one,
I'm hoping some one can point me in the right direction. We are piloting KVM + Libvirt for migrating off Xen and I'm stuck with the network bridge configuration via libvirt.
What we have currently with xen is: 1 server with Wan/lan interfaces and a pool of public ip addresses. Using xen bridge scripts I'd start a xenbr0 and attach eth0 (wan) and go ahead and assign public IP's to images attached to xenbr0.
Now with creating virbr0, I need to assign it an ip address? and routing methods? what about creating a transparent bridge via libvirt? I kno I can achieve this using bridge utils, but it would be nice to have everything handled by libvirt.
Any help would be appreciated.
Hi Taras, Is this helpful at all? http://wiki.libvirt.org/page/VirtualNetworking I'm thinking the "Routed" mode there might be what you're looking for? (note, the URL may change over time, as we're considering merging the info into other places, etc) Regards and best wishes, Justin Clift

On 01/31/2011 12:18 AM, Justin Clift wrote:
On 31/01/2011, at 5:52 AM, Taras Lipatov wrote:
Hi Every one,
I'm hoping some one can point me in the right direction. We are piloting KVM + Libvirt for migrating off Xen and I'm stuck with the network bridge configuration via libvirt.
What we have currently with xen is: 1 server with Wan/lan interfaces and a pool of public ip addresses. Using xen bridge scripts I'd start a xenbr0 and attach eth0 (wan) and go ahead and assign public IP's to images attached to xenbr0.
Now with creating virbr0, I need to assign it an ip address? and routing methods? what about creating a transparent bridge via libvirt? I kno I can achieve this using bridge utils, but it would be nice to have everything handled by libvirt.
Any help would be appreciated. Hi Taras,
Is this helpful at all?
http://wiki.libvirt.org/page/VirtualNetworking
I'm thinking the "Routed" mode there might be what you're looking for?
Actually, since he's talking about attaching eth0 to the bridge and the guests having public IPs, I'm thinking he's talking about what we call "bridged mode", which is covered starting here: http://wiki.libvirt.org/page/FAQ#Why_doesn.27t_libvirt_just_auto_configure_a... (Note that recent libvirt does have an API to configure any host network interface, including a bridge that's attached to a physical interface (look for the "iface-*" commands in virsh), but that API depends on the netcf library, which so far is only available on RHEL and Fedora platforms, so if you're running on something else, you'll need to follow the manual instructions at the provided link for setting up the bridge).

Superb! Thanks for the help. Taras Lipatov Product deployment manager, Opentext Justin Clift wrote:
On 31/01/2011, at 5:52 AM, Taras Lipatov wrote:
Hi Every one,
I'm hoping some one can point me in the right direction. We are piloting KVM + Libvirt for migrating off Xen and I'm stuck with the network bridge configuration via libvirt.
What we have currently with xen is: 1 server with Wan/lan interfaces and a pool of public ip addresses. Using xen bridge scripts I'd start a xenbr0 and attach eth0 (wan) and go ahead and assign public IP's to images attached to xenbr0.
Now with creating virbr0, I need to assign it an ip address? and routing methods? what about creating a transparent bridge via libvirt? I kno I can achieve this using bridge utils, but it would be nice to have everything handled by libvirt.
Any help would be appreciated.
Hi Taras,
Is this helpful at all?
http://wiki.libvirt.org/page/VirtualNetworking
I'm thinking the "Routed" mode there might be what you're looking for?
(note, the URL may change over time, as we're considering merging the info into other places, etc)
Regards and best wishes,
Justin Clift

Am Sunday 30 January 2011 schrieb Taras Lipatov:
Hi Every one,
I'm hoping some one can point me in the right direction. We are piloting KVM + Libvirt for migrating off Xen and I'm stuck with the network bridge configuration via libvirt.
What we have currently with xen is: 1 server with Wan/lan interfaces and a pool of public ip addresses. Using xen bridge scripts I'd start a xenbr0 and attach eth0 (wan) and go ahead and assign public IP's to images attached to xenbr0.
Now with creating virbr0, I need to assign it an ip address? and routing methods? what about creating a transparent bridge via libvirt? I kno I can achieve this using bridge utils, but it would be nice to have everything handled by libvirt.
As far as I can tell, libvirt just doesn't support the "plain old bridge" scenario (i.e. the one where you enslave a physical ethernet device in the same bridge as the virtual devices for the guests), at least not if you want to define the network itself using libvirt. Just create a new bridge device (say, br1) manually, make your OS create it automatically on startup and then put something like this in the devices section of your guests: <interface type="bridge"> <source bridge="br1"/> <model type='e1000'/>" <mac address="<somemacaddress>"> </interface> (Note: You will have to manuall keep track of the MAC addresses in use on your network. If one is used twice, things will break down.) Guido
participants (4)
-
Guido Winkelmann
-
Justin Clift
-
Laine Stump
-
Taras Lipatov