[lxc-users] LXD static IP confusion

Matt Green mephi at mephi.co.uk
Sun Aug 28 08:59:42 UTC 2016


Hi Guys,

I've currently got a 14.04 server running LXC, and I'm planning to use the
upgrade to 16.04 as an excuse to switch to LXD.

In the interim I thought I'd upgrade my proxy server and move it's services
to LXD so I'm not messing with my pre-existing services.

Anyway...

I have a 16.04 server with LXD installed, I've set it up to bridge to my
network interface (so the server isn't doing NAT, DHCP, etc.) and I've
installed my first container with "lxc launch ubuntu:16.04 proxy".

Now I want to give that container a static IP address.
In LXC on 14.04 I've just edited /etc/network/interfaces manually.
In LXD on 16.04 I see that there's a file
called /etc/network/interfaces.d/50-cloud-init.cfg which is controlling the
interface config and apparently I shouldn't edit it manually.

According to https://github.com/lxc/lxd/issues/1168 LXD doesn't have
anything to do with the host address config, but then what's this
cloud-init thing?

I'm not sure what to do now. Should I bypass cloud-init and configure my
interface manually? Or is there a better way I should be doing this?

Cheers,

Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160828/98911ccb/attachment.html>


More information about the lxc-users mailing list