[Lxc-users] Static IP in containers
Robin Monjo
robin.monjo at applidget.com
Thu Nov 7 16:47:18 UTC 2013
Thank you, it does set the correct IP but I can't reach internet now. Any idea ?
Regards,
Robin
On Nov 7, 2013, at 5:40 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> Quoting Robin Monjo (robin.monjo at applidget.com):
>> Hello,
>>
>> I'm using LXC 0.7.5 on ubuntu 12.04 with the default settings (lxbr0, dnsmasq …). To have a static IP in my containers I used to add a line in the conf file, i.e:
>>
>> lxc.network.ipv4 = 10.0.3.4/24
>>
>> Unfortunately, this don't really work anymore. When I start my container I sometimes have an IP randomly set (dhcp) and sometimes the one I actually specified in the conf file.
>
> What does /etc/network/interfaces in the container look like?
> My guess is it has
>
> auto eth0
> iface eth0 inet dhcp
>
> change that to
>
> auto eth0
> iface eth0 inet manual
More information about the lxc-users
mailing list