Newly launched xenial, bionic, focal, jammy containers have no IPv4 connectivity

Since a couple of days, newly launched xenial, bionic, focal, jammy containers have no IPv4 connectivity.

$ lxc launch images:ubuntu/bionic/amd64 bionic-test
Creating bionic-test
Starting bionic-test                      

$ lxc launch images:ubuntu/focal/amd64 focal-test
Creating focal-test
Starting focal-test   

$ lxc launch images:ubuntu/jammy/amd64 jammy-test
Creating jammy-test
Starting jammy-test

As you can see, they only get IPv6 address assigned, but no IPv4:

$ lxc list|grep test
| bionic-test | RUNNING |      | fd42:b5d:f6dd:6b21:216:3eff:fee1:5503 (eth0) | CONTAINER | 0         |
| focal-test  | RUNNING |      | fd42:b5d:f6dd:6b21:216:3eff:fe0d:e1f6 (eth0) | CONTAINER | 0         |
| jammy-test  | RUNNING |      | fd42:b5d:f6dd:6b21:216:3eff:fe44:d6ee (eth0) | CONTAINER | 0         |

This is probably because of:


root@bionic-test:~# cat /etc/network/interfaces 
# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown
root@bionic-test:~# ls /etc/netplan/
root@bionic-test:~# 


root@focal-test:~# ls /etc/netplan/
root@focal-test:~#

I was able to reproduce it on several hosts.

Probably related to New containers not getting ipv4 address