KVM: Network bridge with Netplan

Ubuntu 18.04 settings still depend on Network Manager, and wifi/3G is not supported by networkd yet. The following example uses Network Manager for all interfaces.


  version: 2
  # if specified globally, can only realistically have that value,
  # as networkd cannot render wifi/3G.
  renderer: NetworkManager
      dhcp4: false
      # Specify static address, and netmask.
      addresses: [, '2001:1::10/64']
      dhcp4: false
      interfaces: [enp42s0]

Steps to add a bridge to libvirt.

Create a file /tmp/br0.xml

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

Now have libvirt add the new network, and autostart it.

virsh net-define /tmp/br0.xml
virsh net-start br0
virsh net-autostart br0

The br0.xml file will be in /etc/libvirt/qemu/networks. The default NAT network file will be here as well. Check that br0 has been added successfully.

virsh net-list --all

Name                 State      Autostart     Persistent
br0                  active     yes           yes
default              active     yes           yes

All new network interface additions will have a br0 bridge option.