Gentoo LXD Container

There are Gentoo images at

lxc image list images: | grep gentoo
lxc init images:34760012759f
# or
lxc init images:34760012759f <pick a name>


The default image will request dhcp service on eth0. If you need a second static connection on eth1, do the following. Describe eth1 in /etc/conf.d/net

# /etc/conf.d/net
config_eth1=" netmask brd"
routes_eth1="default via"

Then in /etc/init.d/

ln -s /etc/init.d/net.lo /etc/init.d/net.eth1

Enable net.eth1 in init.

rc-update add net.eth1 default

And then start networking on eth1

/etc/init.d/net.eth1 start

Locale and Timezone

You're supposed to write your timezone in /etc/timezone, echo "Europe/Brussels" > /etc/timezone, and then run the command emerge --config sys-libs/timezone-data. But this doesn't work.

You can set the locale by uncommenting your locale in /etc/locale-gen, and then running the following commands.

eselect locale list
eselect locale set <number>
. /etc/profile

And the following corrected the timezone.

unlink /etc/localtime
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime