[Lxc-users] Static IP in containers
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Nov 7 16:40:22 UTC 2013
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