I need a DNS server that can be updated by LXD

Welcome!

This support forum is focused on Incus, which is a continuation/fork of LXD.
See Migrating from LXD - Incus documentation on how to migrate to Incus (quite easy).

Having said that, you can enable your host to resolve name resolution of your Incus containers.

Here is how it looks. I launch an Incus container, called mycontainer. I then try to ping it, it fails (default setup). I then get the IP address of the interface and the domain (if it is empty, as in this case, the domain is .incus). I set them up with resolvectl and that’s it. Finally, I can ping the Incus container from the host.

$ incus launch images:debian/12/cloud mycontainer
Launching mycontainer
$ ping mycontainer.incus
ping: mycontainer.incus: Name or service not known
$ incus network get incusbr0 ipv4.address
10.10.10.1/24
$ incus network get incusbr0 dns.domain
$ sudo resolvectl dns incusbr0 10.10.10.1
$ sudo resolvectl domain incusbr0 '~incus'
$ ping -c 1 mycontainer.incus
PING mycontainer.incus(mycontainer.incus (....................)) 56 data bytes
64 bytes from mycontainer.incus (.....................): icmp_seq=1 ttl=64 time=0.041 ms

--- mycontainer.incus ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.041/0.041/0.041/0.000 ms
$ 
1 Like