[HELP] LXD snap (3.7) and LXD backport (3.0.1) : dnsmasq loose dhcp and dns leases


and thanks in advance for answering, or at least giving me troubleshooting’s actions,

On both LXD, after creating containers, dns resolution works fine !

But after a while (could be one hour to 24h), DNS resolution doesn’t work anymore,

If I “pgrep” dnsmasq, I check the --dhcp-leasefile (e.g. /var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases)

Its void, there’s only the duid line

$ cat /var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases
duid 00:01:00:01:23:78:74:0a:00:50:56:9c:05:65

Two ways to correct this :

  • restart LXD, sometimes need 3 restart to have it works
  • reboot, the only “sure” way, but not very handy

Both LXD are installed on a VMWare VM, with Ubuntu Xenial up to date

Thank you for your answers


It’s a VMWare issue, effectively when the host is suspended and resumed, the time jumps forward in the VM, causing all DHCP leases to expire, which then causes dnsmasq to expire the DNS entries too.

Your best bet is to bump the DHCP lease expiry to something like 48h which would then avoid such issues, this can be done through LXD network configuration.


I try it tomorrow

Stallman bless you :yum:

Okay, thanks you still but it doesn’t work either :slight_smile:

I mean, dnsmasq keeps for 24h but loose everything after that time

My VM isn’t suspended or resumed during that time,