dnsmasq is used for DNS, IPv6 RA and DHCP on the containers and is spawned as long as ipv4.address or ipv6.address is set on a LXD managed bridge.
Assuming you went with the defaults, you should have a network called “lxdbr0” for which you can see the details with:
lxc network show lxdbr0
To completely disable dnsmasq, you’ll need to remove that LXD managed bridge with:
lxc network delete lxdbr0
At which point your containers won’t have a bridge to connect to anymore, so you’ll need to set it up yourself outside of LXD, possibly including running a DHCP server on it too.
To configure LXD’s dnsmasq for options which we don’t directly offer (see https://github.com/lxc/lxd/blob/master/doc/networks.md), you can set the “raw.dnsmasq” property of the bridge which is a free-form blob of text that gets appended to the dnsmasq configuration.
lxc network set lxdbr0 raw.dnsmasq - < some-dnsmasq.conf