No network configured in new lxc-containers running Debian

When I install a new guest running Debian with

lxc-create lxc-create -n net-test-stable -t download

and answer ‘debian’, ‘bullseye’ and ‘amd64’ the guest doesn’t have a configured network when it is started.

It works if I choose to download Ubuntu Jammy or Ubuntu Focal.

By “doesn’t have a configured network” I mean that ip a s shows two interfaces ‘lo’ and ‘eth0’ and only lo has an ip, namely If I manually configure eth0 with e.g. ip a a dev eth0; ip r a default via eth0 and put “nameserver” in /etc/resolv.conf, everything seems to work.
(dhclient is not installed so using that to get an ip isn’t an option)

It used to work on that machine, I have a container with Debian bullseye I installed in February, I might have installed some since, but they have been destroyed so I don’t have any leftovers I can see the date on.

The machine I’m on runs Debian stable, and has lxc installed from the package manager, and it hasn’t been upgraded since February (since the machine was upgraded from Debian Buster to Debian Bullseye sometime last year actually, but I’m pointing to February as it worked then). What has happened? And how do I fix it?

It doesn’t matter if I delete the local cache of the downloaded image first (i.e. ~/.cache/lxc/download/debian/bullseye).

I believe those images use systemd-networkd now.

Do you have a running DHCP server on the host side?

No, or rather: it seems libvirt has started something for lxc guests, sudo ps aux | grep -i dh shows (in addition to some processes related to the host getting it’s IP, which also happens over DHCP):

nobody      1451  0.0  0.0  12084   112 ?        S    apr23   0:28 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
root        1452  0.0  0.0  11512     0 ?        S    apr23   0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
dnsmasq     1602  0.0  0.0  18020  1328 ?        S    apr23   2:38 dnsmasq --conf-file=/dev/null -u dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/ --listen-address --dhcp-range, --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative

I guess it’s already possible to figure out from the question, but there’s absolutely no LXD involved, and the guests are connected to a bridge (and I only need to connect to them from the host).