[lxc-users] Centos: how to specify static ip address to container

Mingjiang Shi mrjewes at gmail.com
Thu Feb 13 08:53:58 UTC 2014


Hi Claudio,
Thanks for answering my question.

That's what I did now, and it requires a few more changes in the container.
 That's why I want to leverage the dnsmasq to reserve ip address for
specific host/mac address so that all the config are in a central place.

Is it expected that no config file is given to dnsmasq (--conf-file
parameter of the dnsmasq is empty in the start command)?



On Thu, Feb 13, 2014 at 4:39 PM, Claudio Kuenzler <ck at claudiokuenzler.com>wrote:

>
>
> I run lxc container on centos and want to my container to start with a
>> static IP address.
>>
>
> You can set the static IP directly in the lxc's config file:
>
> lxc.network.ipv4 = 192.168.0.11/24
>
> I don't run LXC on CentOS though, so I'm not 100% sure if it'll work. Try
> it :)
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>



-- 
Thanks
-Mingjiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140213/0cb05b94/attachment.html>


More information about the lxc-users mailing list