<p dir="ltr">Ahh, OK. Thanks for clarifying :-)<br>
I guess I need to work out the Pros/Cons of static vs dhcp and go from there.</p>
<p dir="ltr">Cheers,</p>
<p dir="ltr">Matt<br>
</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 29 Aug 2016 03:28, "Serge E. Hallyn" <<a href="mailto:serge@hallyn.com" target="_blank">serge@hallyn.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Aug 28, 2016 at 09:59:42AM +0100, Matt Green wrote:<br>
> Hi Guys,<br>
><br>
> I've currently got a 14.04 server running LXC, and I'm planning to use the<br>
> upgrade to 16.04 as an excuse to switch to LXD.<br>
><br>
> In the interim I thought I'd upgrade my proxy server and move it's services<br>
> to LXD so I'm not messing with my pre-existing services.<br>
><br>
> Anyway...<br>
><br>
> I have a 16.04 server with LXD installed, I've set it up to bridge to my<br>
> network interface (so the server isn't doing NAT, DHCP, etc.) and I've<br>
> installed my first container with "lxc launch ubuntu:16.04 proxy".<br>
><br>
> Now I want to give that container a static IP address.<br>
> In LXC on 14.04 I've just edited /etc/network/interfaces manually.<br>
> In LXD on 16.04 I see that there's a file<br>
> called /etc/network/interfaces.d/50-<wbr>cloud-init.cfg which is controlling the<br>
> interface config and apparently I shouldn't edit it manually.<br>
><br>
> According to <a href="https://github.com/lxc/lxd/issues/1168" rel="noreferrer" target="_blank">https://github.com/lxc/lxd/<wbr>issues/1168</a> LXD doesn't have<br>
> anything to do with the host address config, but then what's this<br>
> cloud-init thing?<br>
><br>
> I'm not sure what to do now. Should I bypass cloud-init and configure my<br>
> interface manually? Or is there a better way I should be doing this?<br>
<br>
If you use the <a href="http://linuxcontainers.org" rel="noreferrer" target="_blank">linuxcontainers.org</a> images instead of the ubuntu: images,<br>
you shouldn't have cloud-init (iirc).  You can remove it by hand.  It's<br>
purpose is to support automated post-install customizations in a cloud<br>
environment.<br>
<br>
Now, in general the recommended way to get a 'static' ip address would be<br>
to configure the dhcp server to hand the desired address to the container,<br>
but of course /etc/network/interfaces should still work (if you drop<br>
cloud-init)<br>
______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a></blockquote></div></div>