Systemd-resolved integration seems to not work

I tried following the steps as outlined here:

I initially forgot the leading ~ but I fixed that.

When I do resolvectl query ubuntu (I have a container named ubuntu), it prints out this:

ubuntu: 'ubuntu' not found

When I instead do resolvectl query ubuntu.lxd, I get this:

ubuntu.lxd: resolve call failed: All attempts to contact name servers or networks failed

I have dns.mode set to managed.

OK, I have determined the issue. I need to run resolvectl dnsovertls lxdbr0 no and resolvectl dnssec lxdbr0 no.

That’s indeed needed if you have DoT and DNSSEC globally enabled as the LXD DNS resolver only implements regular DNS (UDP/53 and TCP/53).