[Lxc-users] adding a default gateway inside a container as a non root user
serge.hallyn at canonical.com
Sat Mar 3 14:31:59 UTC 2012
Quoting Bekir Dogan (bekirdo at gmail.com):
> On Fri, Mar 2, 2012 at 19:27, Serge Hallyn <serge.hallyn at canonical.com> wrote:
> > Right now in ubuntu precise, it's
> > lxc-create -t ubuntu -n p1
> > lxc-start -n p1
> > If you want to deploy a bunch of cloned images, you can
> > lxc-create -t ubuntu -n plain -B lvm
> > < customize /dev/lxc/plain image if you like >
> > for i in `seq 1 20`; do
> > lxc-clone -s -o plain -n p$i
> > done
> > The only things different in Ubuntu are that a lxcbr0 bridge gets
> > installed by default (*1), and the release has been tweaked a bit so no
> > changes are needed to run in a container. The first can't really
> > be done in lxc.git (because it's distro-dependent),
> I've looked into ubuntu precise lxc package, and after then realised
> /etc/init/lxc-net.conf have a better implementation than I've been
> trying to accomplish in simplelxc.
> I've been trying to distribute IP addresses for containers by my,
> using dnsmasq seems sane, actually I don't understand why I've been
> trying to re-invent dhcp.
> This might be a disto-dependent solution but maybe other distros could
> implement the same concept and this provide inter-distro consistency
> about default lxc networking.
> Daniel (Bauman), what do you think about implementing a similar
> solution into debian package, it looks sensible, we can add a new
> init.d script like the one in
> ubuntu:precise:lxc:/etc/init/lxc-net.conf and prepare host system
No, no. As soon as 0.8.0 comes out, I need to produce a reasonable
debdiff from debian->ubuntu and propose it for merge into debian.
Please don't put the onus on Daniel right now, it's my fault.
More information about the lxc-users