[lxc-users] unprivileged gentoo containers have no network connection
overlay fs
overlayfs at gmail.com
Wed Apr 22 11:57:34 UTC 2015
If one uses the gentoo template to create a container,
$ sudo lxc-create -t gentoo -f config -n gentoo_test
$ cat config
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
then the gentoo template configures the network connection in the
container's root filesystem.
But if instead one uses the download template to create an
unprivileged gentoo container,
$ lxc-create -t download -f config -n gentoo_test -- -d gentoo -r
current -a amd64
then the container does not have an operational network connection.
The network must be configured manually by executing the following
commands in the container:
$ cd /etc/init.d
$ ln -s net.lo net.eth0
$ rc-update add eth0 default
Would it be possible to remedy this, perhaps by either of the following:
(1) alter the downloadable gentoo image.
(2) run a post-install script which contains the network portion of
/usr/share/lxc/templates/lxc-gentoo .
More information about the lxc-users
mailing list