After upgrade to Xubuntu 22.04, containers no longer get IPv4 addresses

I upgraded to Xubuntu 22.04 and now containers are no longer getting IPv4 addresses. Apparently, dnsmasq is running and IPv6 is working. The containers are unchanged, only the host was upgraded.

lxc --version

On the containers, using ip -a will show the containers have an IPv6 address, but no IPv4.

I’m not sure what other informations would be required to investigate this issue.

22.04 hasn’t been released yet so I’m a bit confused as to what you’re actually running :slight_smile:

What you’re describing could be one of two things:

  • Firewalling blocking access, this can be caused by Docker being installed on the host and blocking other container managers (quite common) or something like ufw/firewalld getting in the way
  • You running a system that’s cgroup2 enabled with containers which do not support it (like Ubuntu 16.04, CentOS 7, …)

I’m using the development branch of 22.04. Docker is not installed, but disabling ufw allowed the containers to get the IPv4 addresses. Strangely, dmesg shows no UFW block.

This could well be because ufw is using nftables (natively or via iptables) and blocking LXD’s networking.