[lxc-users] setting persistant IP address based on domain.
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Jun 20 20:08:04 UTC 2014
Quoting Serge Hallyn (serge.hallyn at ubuntu.com):
> Quoting Shidan (shidan at gmail.com):
> > In the ubuntu docs (https://help.ubuntu.com/lts/serverguide/lxc.html), it
> > says that to set a persistant IP address for containers you can add the
> > following to /etc/lxc/dnsmasq.conf
> >
> > dhcp-host=lxcmail,10.0.3.100
> > dhcp-host=ttrss,10.0.3.101
> >
> > I created the dnsmasq.conf file and added the container names I have
> > created and nothing happens.
> >
> > What would be the proper way to do this. I am using lxc-autostart to start
> > the containers.
>
> Hi,
>
> you also need to set
>
> LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf
>
> in your /etc/default/lxc-net. I think that used to be (commented out)
> in the shipped file...
Ah, looking at lxc.pre-inst it should still be there, so just un-comment
that line.
If that still doesn't work, pls let us know.
-serge
More information about the lxc-users
mailing list