[lxc-users] Setting up LXC on Ubuntu 14.04

Fajar A. Nugraha list at fajar.net
Tue Aug 12 07:10:42 UTC 2014


On Tue, Aug 12, 2014 at 10:47 AM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> Ok, earlier you had said that you want a single ip address from
> which you port forward to your containers.  I do that on my server
> in a much simpler way.  My eth0 on the host is unmodified, a simple
> nic using dhcp.  My lxcbr0 is the stock lxcbr0 provided by the lxc
> package in ubuntu.  Then i use /etc/lxc/dnsmasq.conf to have dnsmasq
> provide static ips to my containers, i.e.
>
> dhcp-host=h1,10.0.3.50
> dhcp-host=h2,10.0.3.51
>
> (see https://help.ubuntu.com/14.04/serverguide/lxc.html)

Which lxc version is required for that? I'm on lxc 1.0.5-0ubuntu0.1
from trusty-updates, and that does not work out of the box

After poking around a bit I see that /etc/init/lxc-net.conf has this line.

env LXC_DHCP_CONFILE=""

changing that to have /etc/lxc/dnsmasq.conf works, but I'm guessing
users aren't suppose to edit their init scripts manually, and the
feature is automatically available on later versions of lxc?

-- 
Fajar


More information about the lxc-users mailing list