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

Laine Stump laine at laine.org
Tue Apr 18 14:35:31 UTC 2017


On 04/18/2017 04:43 AM, Marc Haber wrote:
> Hi Pavel,
> 
> thanks for your patience.
> 
> On Mon, Apr 17, 2017 at 05:20:18PM +0200, Pavel Hrdina wrote:
>> On Sun, Apr 16, 2017 at 11:04:09PM +0200, Marc Haber wrote:
>>> 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:
>> 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.
> 
> If one cannot tell libvirt "there is br0, even if netcf doesn't tell you
> about it, please offer it to your users as available", then yes, that's
> the issue.

You are correct that the netcf in debian is old and limited. The initial
port for debian was written by someone who isn't a regular debian user,
with the hope that a debian developer would take over maintenance, but
not much has happened.

If your aim is to have something selectable from a list, then you can
always just define a libvirt virtual network that references the
existing system bridge:


  <network>
    <name>br0</name>
    <forward mode='bridge'/>
    <bridge name='br0'/>
  </network>

(put this in a file, then use "virsh net-define $filename && virsh
net-start br0 && virsh net-autostart br0")

Now a *network* named "br0" will show up in the selection list.

> 
>> 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).
> 
> Thanks, that explains it:
> | 1 [3/869]mh at gancho:~ $ virsh nodedev-list --cap net
> | net_dummy0_06_6a_32_42_0d_41
> | net_dummy1_a2_8b_d6_f2_7e_42
> | net_eth0_6c_62_6d_d7_51_a3
> | net_lo_00_00_00_00_00_00
> | net_vnet0_fe_54_00_49_6d_5f
> | 
> | [4/870]mh at gancho:~ $ 
> 
> The nodedev driver is part of libvirt? or part of the kernel? Or part of
> what?
> 
> Can nodedev somehow be coaxed into publishing net_br0?

Actually I'm kind of surprised that it doesn't, since bridges appear in
/sys/class/net. I guess udev has a different idea about it though...

But for your purposes, my first suggestion should suffice.

> 
>> 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.
> 
> And netcf in Debian is not very current :-(
> 
> Frankly, I don't think that it is possible to have a single library that
> can parse all distribution-specific methods of network configuration,

Even within one distro (and in some cases within one configuration
method on one distro) there can be multiple ways to describe the same
setup, which makes the whole thing very cumbersome...


> so
> libvirt needs some manual method to tell it what network interfaces are
> available to choose.

See my first comment.




More information about the virt-tools-list mailing list