[libvirt-users] libvirt bridge configuration

Guido Winkelmann guido-libvi at unknownsite.de
Mon Jan 31 13:26:57 UTC 2011

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>">   

(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.)


More information about the libvirt-users mailing list