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
> 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
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
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
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.
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
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
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