I am running Ubuntu cloud images in LXC containers in my private lab environment. The setup uses macvlan networking provided by Incus. The same configuration works correctly on Ubuntu 24.04, but on Ubuntu 26.04 the networking setup breaks due to netplan apply hanging during execution.
incus network list
+---------+----------+---------+------+------+-------------+---------+---------+
| NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY | STATE |
+---------+----------+---------+------+------+-------------+---------+---------+
| eno1 | physical | NO | | | | 2 | |
+---------+----------+---------+------+------+-------------+---------+---------+
| eno2 | physical | NO | | | | 8 | |
+---------+----------+---------+------+------+-------------+---------+---------+
| vlsrv | macvlan | YES | | | | 1 | CREATED |
+---------+----------+---------+------+------+-------------+---------+---------+
cloud-init.network-config.yaml
version: 2
ethernets:
eth0:
dhcp4: no
dhcp6: no
addresses:
- 10.0.65.21/24
routes:
- to: default
via: 10.0.65.1
nameservers:
addresses:
- 10.0.65.1
Ubuntu 24.04 cloud image →
working
incus init images:ubuntu/24.04/cloud cfg01 -n vlsrv
Creating cfg01
incus config set cfg01 cloud-init.user-data - < cloud-init.user-data.yaml
incus config set cfg01 cloud-init.network-config - < cloud-init.network-config.yaml
incus start cfg01
incus exec cfg01 -- bash
root@cfg01:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 ...
8: eth0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 10:66:6a:9e:85:b2 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.0.65.21/24 brd 10.0.65.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::1266:6aff:fe9e:85b2/64 scope link
valid_lft forever preferred_lft forever
Ubuntu 26.04 cloud image →
broken
incus init images:ubuntu/26.04/cloud cfg01 -n vlsrv
Creating cfg01
incus config set cfg01 cloud-init.user-data - < cloud-init.user-data.yaml
incus config set cfg01 cloud-init.network-config - < cloud-init.network-config.yaml
incus start cfg01
incus exec cfg01 -- bash
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 ...
6: eth0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 10:66:6a:57:f4:c9 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::1266:6aff:fe57:f4c9/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
Now the problems begin. I tried to apply netplan manually, but it gets stuck:
netplan --debug apply
DEBUG:command configure: running ['/usr/libexec/netplan/configure']
** (configure:249): DEBUG: 10:32:13.666: starting new processing pass
** (configure:249): DEBUG: 10:32:13.666: eth0: adding new route
** (configure:249): DEBUG: 10:32:13.666: We have some netdefs, pass them through a final round of validation
** (configure:249): DEBUG: 10:32:13.666: eth0: setting default backend to 1
** (configure:249): DEBUG: 10:32:13.666: Configuration is valid
** (configure:249): DEBUG: 10:32:13.667: using ovs-vsctl at /usr/bin/ovs-vsctl
** (configure:249): DEBUG: 10:32:13.667: Generating output files..
** (configure:249): DEBUG: 10:32:13.667: Open vSwitch: definition eth0 is not for us (backend 1)
** (configure:249): DEBUG: 10:32:13.667: NetworkManager: definition eth0 is not for us (backend 1)
DEBUG:executing Netplan systemd-generator via daemon-reload
DEBUG:netplan generated networkd configuration changed, reloading networkd
DEBUG:Cannot call Open vSwitch: Cannot apply Open vSwitch cleanup: ovs-vsctl is 'not-found'
After this, netplan apply never completes.
If I set the IP manually, everything works:
ip addr add 10.0.65.21/24 dev eth0
ip route add default via 10.0.65.1
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 ...
inet 127.0.0.1/8
6: eth0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
inet 10.0.65.21/24
Connectivity works:
ping 10.0.65.1
64 bytes from 10.0.65.1: icmp_seq=1 ttl=255 time=0.406 ms
64 bytes from 10.0.65.1: icmp_seq=2 ttl=255 time=0.199 ms
Observations
- No Open vSwitch is installed or configured in the container
- No OVS references exist in netplan configuration
Is there anything broken in Ubuntu 26.04 regarding netplan in LXC containers, or am I missing something in the setup?