libvirt not compatible with netplan

Bug #1770345 reported by Daniel Roche
This bug report is a duplicate of:  Bug #1764314: libvirt doesn't show all interfaces. Edit Remove
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

with :
- ubuntu server 18.04 freshly installed
- network bridge configured with netplan ( by default now )

the bridge network ( br0 ) is not seem by libvirt tools
  ( either virsh iface-list, nor virt-manager )

the bridge ( br0 ) is defined in netplan like this :
----- cut here -----
network:
  ethernets:
    enp2s0:
      optional: true
  bridges:
    br0:
      addresses:
        - 192.168.8.12/24
      dhcp6: false
      gateway4: 192.168.8.1
      nameservers:
        search:
          - home.dan
        addresses:
          - 192.168.8.2
      optional: true
      interfaces:
        - enp2s0
      parameters:
        stp: yes
        forward-delay: 0
  version: 2
----- cut here -----

the network bridge is working perfectly, but is not seen by libvirt
i have tried several parameters ( stp, forward-delay ...) but nothing change.

if i revert back the network configuration to ifupdown
( installing ifupdown package, removing netplan config file, and creating /etc/network/interface )

then the libvirt tools ( virsh or virt-manager ) are working again with the defined bridge.

Best Regards

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Daniel,
thanks for your report.

The issue that libvirt can't "see" all devices existed quite a while actually.
Whatever you have through networkd or NetworkManager was invisible.
This is due to netcf being the driver for the backend and this is - as you already realized - only compatible with ifupdown.

bug 1764314 holds a discssion with more details on it so I'll mark yours here as a dup.

Revision history for this message
Ahmed (akha666-f) wrote :

Hi all,
I've managed libvirt to work with netplan's bridges, look for this example under Bridging section

https://netplan.io/examples

libvirtd would be configured to use this bridge by adding the following content to a new XML file under /etc/libvirtd/qemu/networks/. The name of the bridge in the tag as well as in need to match the name of the bridge device configured using netplan:

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libvirt (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.