Lars Kellogg-Stedman
2016-Mar-06 20:21 UTC
[libvirt-users] Convincing libvirt to create a bridge device?
I was hoping that I could delegate creation of bridge devices to libvirt for address-less bridges, in order to not have to deal with the various ways distributions handle persistent network configuration, but while this creates a libvirt network... <network> <name>provision</name> <forward mode='bridge'/> <bridge name='brprov'/> </network> ...it doesn't actually create the bridge. Configuring the bridge using either <forward mode="route"/> or <forward mode="nat"/> *will* create the bridge device, but both of these require assigning an address to the bridge which means I have to suddenly worry about IPAM and conflicts with local networks. I look at the various interface-related commands, and there is an "iface-bridge" command but this requires a physical interface. Is there any way to convince libvirt to create the bridge device for a <forward mode='bridge'/> network? -- Lars Kellogg-Stedman <lars@redhat.com> | larsks @ {freenode,twitter,github} Cloud Engineering / OpenStack | http://blog.oddbit.com/
Laine Stump
2016-Mar-07 00:59 UTC
Re: [libvirt-users] Convincing libvirt to create a bridge device?
On 03/06/2016 03:21 PM, Lars Kellogg-Stedman wrote:> I was hoping that I could delegate creation of bridge devices to > libvirt for address-less bridges, in order to not have to deal with > the various ways distributions handle persistent network > configuration, but while this creates a libvirt network... > > <network> > <name>provision</name> > <forward mode='bridge'/> > <bridge name='brprov'/> > </network> > > ...it doesn't actually create the bridge. Configuring the bridge > using either <forward mode="route"/> or <forward mode="nat"/> *will* > create the bridge device, but both of these require assigning an > address to the bridge which means I have to suddenly worry about > IPAM and conflicts with local networks.Remove the <forward mode='bridge'/> line from your config above and it should do what you want - libvirt will create the bridge, but won't assign any IP address to it (nor will it attach it to any physical device).
Lars Kellogg-Stedman
2016-Mar-07 01:40 UTC
Re: [libvirt-users] Convincing libvirt to create a bridge device?
On Sun, Mar 06, 2016 at 07:59:38PM -0500, Laine Stump wrote:> >configuration, but while this creates a libvirt network... > > > > <network> > > <name>provision</name> > > <forward mode='bridge'/> > > <bridge name='brprov'/> > > </network> > > > >...it doesn't actually create the bridge... > > Remove the <forward mode='bridge'/> line from your config above and it > should do what you want - libvirt will create the bridge, but won't assign > any IP address to it (nor will it attach it to any physical device).Wow, that totally works, and makes my life much simpler. Thanks! -- Lars Kellogg-Stedman <lars@redhat.com> | larsks @ {freenode,twitter,github} Cloud Engineering / OpenStack | http://blog.oddbit.com/