[lxc-users] lxd not starting dnsmasq

Stéphane Graber stgraber at ubuntu.com
Mon Aug 20 18:01:59 UTC 2018


On Mon, Aug 20, 2018 at 10:57:28AM -0700, Mike Wright wrote:
> Hi all,
> 
> My system is ubuntu bionic, kernel 4.15, lxd 3.2 (non-snap), fully upgraded.
> 
> After starting LXD (systemctl start lxd.socket lxd) I can create containers
> which get an eth0 that's defined in /etc/netplan/50-cloud-init.yaml as dhcp
> but they don't pick up an address.
> 
> Further investigation shows that dnsmasq is not running on the host.  I
> haven't been able to find any docs about this.  I'd start it manually but I
> can't find where/how the config for it is stored/created.
> 
> "lxc network list" shows this:
> 
> +--------+----------+---------+-------------+---------+
> | LXD    | bridge   | NO      |             | 1       |
> +--------+----------+---------+-------------+---------+
> 
> Thinking this may be the source of the problem I tried "lxc network set LXD
> dns.mode managed" and got "Error: Only managed networks can be modified."
> Câline! (thank you, netflix)
> 
> I can manually add addresses to the bridge and containers and networking
> works but I'd prefer dhcp.
> 
> I've spent days chasing this.  Uninstall, purge, install, and nothing.
> 
> What really perplexes me is that the first couple of times I installed lxd
> dnsmasq always was started when lxd was started.  (Lot of (un)installs
> trying to figure out zfs :/ ).  Now it never starts dnsmasq.
> 
> Anybody have any pointers?
> 
> Thanks,
> Mike Wright

That "br0" bridge you have is not one that's created and managed by LXD,
which explains why it wouldn't let you change settings and why it's not
doing anything to it (including running dnsmasq).

Either configure that bridge to do DHCP, using whatever tool was used to
define/create it. Or get rid of it and create a LXD managed bridge with
"lxc network create".

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20180820/5c9f3380/attachment.sig>


More information about the lxc-users mailing list