[lxc-users] setting persistant IP address based on domain.

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jun 20 20:06:32 UTC 2014


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

-serge


More information about the lxc-users mailing list