[virt-tools-list] [virt-manager] How to have regular bridges in the network source list

Pavel Hrdina phrdina at redhat.com
Mon Apr 17 15:20:18 UTC 2017


On Sun, Apr 16, 2017 at 11:04:09PM +0200, Marc Haber wrote:
> Hi, Pavel,
> 
> On Sat, Apr 15, 2017 at 09:14:02PM +0200, Pavel Hrdina wrote:
> > On Sat, Apr 15, 2017 at 07:35:53PM +0200, Marc Haber wrote:
> > > Hi,
> > > 
> > > back in 2010, this list had a short thread about regular bridges not
> > > showing up in the network source list in virt-manager. The gist of the
> > > thread was "use virt-manager 0.8.4 and you'll see bridges".
> > > 
> > > Now, seven years later, I have virt-manager 1.4.0 on the admin machine
> > > (Debian unstable) and libvirt 2.9 on the server (Debian stable), and I
> > > still have to select "Specify shared device name" in the network source
> > > list and enter my bridge name myself, while physical interfaces and
> > > macvlans show up automagically.
> > > 
> > > While I do understand that macvlan is the hot stuff at the moment and
> > > people want us to use those, there is a gazillion use cases of classical
> > > bridges, for example when the guest needs to talk to the host or when
> > > the party providing network access to the host routes additional IP
> > > addresses to the host IP instead of arping for them on the physical
> > > network.
> > > 
> > > Is there still a technical reason why virt-manager doesn't show regular
> > > bridge interfaces in the interface dropdown? Can I help with local
> > > configuration or am I stil stuck with manually entering "br0"?
> > 
> > Hi, it depends how the bridge is configured.  If you create a bridge via
> > virt-manager/libvirt you will be able to see it in virt-manager.  It should
> > also appear in virt-manager if you configure the bridge via
> > /etc/network/interfaces.  However, if you configure the bridge using brctl
> > util you will not see it in virt-manager.
> 
> I use systemd-networkd. Easiest way to create complex network setups.
> The host does not have /etc/network/interfaces, and ifupdown is not even
> installed.

So the issue here is that libvirt on Debian uses netcf for network interface
management and netcf probably doesn't support systemd-networkd and because
of that you won't be able to see the bridge in libvirt and therefore in
virt-manager.

> > Some background to this topic, for remote connection virt-manager displays
> > only what it can get via libvirt on the remote host.  So if you run
> > "virsh iface-list" on the remote host and there is no "br0", you would not
> > be able to see it in virt-manager as well.
> 
> | [1/863]mh at gancho:~ $ virsh iface-list
> | error: Failed to list interfaces
> | error: internal error: failed to get number of host interfaces: unspecified error - errors in loading some config files
> | 
> | 1 [2/864]mh at gancho:~ $ 
> 
> virsh iface-list gives just an error, and still, I see the dummy
> interfaces and the phyiscal ethernets (all of them with the macvtap
> option). I can also see all explicitly configured macvlan interfaces,
> all of which were created with systemd-networkd. I have never configured
> anything network-wise in libvirt.

That error message comes from netcf, adding Laine to CC, he should be able
to help you with debugging that error message and also provide some
additional information about netcf and networking.

The reason why you are able to see some interfaces is the libvirt can also
provide a list of host devices via nodedev driver (virsh nodedev-list) and
you can filter the list of host devices to list only network devices
(virsh nodedev-list --cap net).  Virt-manager takes list of all network
interfaces and all network devices and combines them together and creates
a list of network sources.

The networking is a little bit complicated because each linux distribution
uses a different configuration tools/files and virt-manager/libvirt/netcf
simply tries to provide as much as possible.

> > The reason why libvirt doesn't consider showing bridges defined via brctl
> > is because they are not persistent and they are probably configured
> > manually by hand or by some shell script or any other tool which is out
> > of libvirt scope.
> 
> I would still like libvirt to consider them, as it does with the macvlan
> interfaces. All your reasoning will apply to macvlan interfaces
> configured from outside libvirt as well, and yet, macvlan interfaces
> show up just fine.

Again, I don't want to repeat myself, but libirt simply takes whatever it
gets from netcf, so this is missing feature in netcf.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20170417/ee0a1b8a/attachment.sig>


More information about the virt-tools-list mailing list