netplan + libvirt – Setting Up virbr0 Virtual Bridge

bridgekvm-virtualizationlibvirtlinux-networkingnetworking

As far as I understand, the interfaces virbr0 and virbr0-nic are created and managed by libvirt.


● 4: virbr0
       Link File: /lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: no-carrier (unmanaged)
          Driver: bridge
      HW Address: 52:54:00:0f:26:e6
         Address: 192.168.122.1

● 5: virbr0-nic
       Link File: /lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: off (unmanaged)
          Driver: tun
      HW Address: 52:54:00:0f:26:e6

However libvirt did not add anything in my netplan folder (also doesn't show up in nmcli or in /etc/network/interfaces). I assume that those interfaces are created and brought up by libvirt upon the starting of the daemon.

So is it good practice not to specify them in netplan or should I add them in my configuration ?

Also, how would, theoretically, the configuration for a natted virtual bridge look like according to netplan ?

Best Answer

You should not set up anything in netplan for interfaces that it does not manage. That includes things like libvirt, docker, ovs, or whatever.