Re: [lxc-users] DHCP or static ip address?

2017-03-13 Thread Simos Xenitellis
On Sun, Mar 5, 2017 at 7:13 AM, Marat Khalili wrote: >> The other way is to leave in /var/lib/lxc/NAME/config only [...] and have: >> [...] in /var/lib/lxc/NAME/rootfs/etc/network/interfaces. Then everything >> works. > >> Which way is better? > > I also stumbled on nameservers issue when using co

Re: [lxc-users] DHCP or static ip address?

2017-03-04 Thread Marat Khalili
> The other way is to leave in /var/lib/lxc/NAME/config only [...] and have: > [...] in /var/lib/lxc/NAME/rootfs/etc/network/interfaces. Then everything > works. > Which way is better? I also stumbled on nameservers issue when using config and switched to /etc/network/interfaces more than a y

Re: [lxc-users] DHCP or static ip address?

2017-03-04 Thread Sjoerd
On 04-03-17 12:07, Yuri Kanivetsky wrote: Which way is better? Can it be any simpler? Is there any better way? Can you explain how to make use of dhcp? Without using lxd if possible. Meanwhile, I'm going to look into making CentOS work. I just installed dnsmasq on the (ubuntu 16.04) host an

Re: [lxc-users] DHCP or static ip address?

2017-03-04 Thread Yuri Kanivetsky
Okay, I've managed to make it work with static ip somehow. From what I can tell, there are two ways to set it up, either in /var/lib/lxc/NAME/config, or in /var/lib/lxc/NAME/rootfs/etc/network/interfaces. If you adjust both those files, you get the conflict: Mar 04 04:40:58 cont1 ifup[158]: RTNETL

Re: [lxc-users] DHCP or static ip address?

2017-03-03 Thread Yuri Kanivetsky
Sorry for being too succinct. Let me give you more details. I'm now talking about my developer machine. Where I test provisioning/deployment, or just run sites in environment similar to that of production servers. Now than, what led me to the question? I tried to run Ubuntu and CentOS recently.

Re: [lxc-users] DHCP or static ip address?

2017-03-02 Thread Jeff Kowalczyk
Static IP via DHCP reservations for LXD managed dnsmasq seems to be manageable: lxc network create networkname ipv4.address="10.0.1.1/24" ipv4.nat=true ipv6.address=none lxc network attach-profile networkname default eth0 lxc init xenial containername lxc network attach networkname containername e

Re: [lxc-users] DHCP or static ip address?

2017-03-02 Thread Matt Green
I think it depends on your architecture and use cases. Managing thousands of containers with static IPs would be a complete pain. Personally, I went with static as I have a small deployment, so I made python build scripts that that created an interfaces file. Matt On 2 Mar 2017 19:32, "Yuri Kani

[lxc-users] DHCP or static ip address?

2017-03-02 Thread Yuri Kanivetsky
Hi, From what I can see https://github.com/lxc/lxc/blob/lxc-2.0.7/templates/lxc-ubuntu.in#L104 LXC container by default expects to find DHCP server somewhere on the network. Which makes me think if I should set up one, which might be not easy. Or switch container to static ip after creation. Wh