Hi,
I run LXD 5.21 on Ubuntu 24.04. Everything is as simple as possible: the server has one Ethernet interface configured for DHCP. DNS resolving works well on the server.
I’ve created a Debian 12 container instance from my image that is configured for ifupdown
instead of systemd-networkd
. Unfortunately the DNS resolving doesn’t work:
lxc exec tst3 -- ping yahoo.com
ping: yahoo.com: Temporary failure in name resolution
I have never had any issues with this image on LXD 3.0.3 on Ubuntu 18.04.
In the past, the /run/systemd/resolve/stub-resolv.conf
was generated as the following, and resolving worked well:
domain lxd
search lxd
nameserver <IP of lxdbr0>
In Ubuntu 24.04/LXD 5.21 the /run/systemd/resolve/stub-resolv.conf
is generated differently:
nameserver 127.0.0.53
options edns0 trust-ad
search .
and the resolving doesn’t work:
ping yahoo.com
ping: yahoo.com: Temporary failure in name resolution
It is possible to define a DNS server statically in resolv.conf, but then it will be problematic to move the container to another server.
The debian12 container from images.lxd.canonical.com
is configured for systemd-networkd
and doesn’t have the resolving problem. However, I would like to use the same image for creating containers in LXD 3.0.3 and also on LXD 5.21. The systemd-networkd
doesn’t work on old systems…
Any help is appreciated.
Leonid