With app-emulation/lxc-1.0.4, I would assume that lxc-create creates a working container, but it does no. Instead I get an error about certain paths not existing. This is probably because the Gentoo LXC template / create script makes a wrong assumption about the behaviour of relative paths within the LXC container configuration, which results in: "lxc-start: No such file or directory – …" ``` # lxc-create -t gentoo -n test ### set_default_arch: default arch/variant autodetect... => Got: arch=amd64 variant=amd64 Attempting to obtain an exclusive lock (timeout: 60 sec) named "cache-amd64-amd64"... => done. => Executing "do_all" ##### container_setup(): starting container setup ### container_precheck(): doing some pre-start checks ... #### container_rootfs(): copying rootfs /etc/lxc/test/rootfs from cache /var/cache/lxc/gentoo/rootfs-amd64-amd64 ... chroot test... OK => done #### container_consoles(): setting container consoles ... => main console + 1 ttys => done #### container_tz(): setting container timezone ... => host localtime copyed to container #### container_portage(): setting container portage... Warnings are normal here, don't worry !!! Section 'x-portage' in repos.conf has location attribute set to nonexistent directory: '/usr/portage' !!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/usr/portage' !!! Invalid Repository Location (not a dir): '/usr/portage' !!! Section 'x-portage' in repos.conf has location attribute set to nonexistent directory: '/usr/portage' !!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/usr/portage' !!! Invalid Repository Location (not a dir): '/usr/portage' trying to guess portage_dir from host... => portage stuff done, see /etc/portage/make.conf for additionnal tricks container_net(): setting container network conf... * service net.eth0 added to runlevel default => network conf done. #### container_hostname(): setting hostname... => done. #### container_auth(): setting authentification... setting password for root ... BAD PASSWORD: it is too short BAD PASSWORD: is too simple => done. if you didn't specify , default is 'toor' => done. #### container_sshd(): enabling sshd... * service sshd added to runlevel sysinit => done. container_configuration(): making lxc configuration file... => done. ###### container_setup(): container should be ready to start! You could now use you container with: lxc-start -n test little things you should know about your container: => rootfs of container is : /etc/lxc/test/rootfs => config of container is : /etc/lxc/test/config => timezone was staticly copyed from host => container has a shared portage from host's /var/cache/portage/gentoo to usr/portage => Warning, these veth NIC don't have fixed hwaddr : eth0 see http://lists.linuxcontainers.org/pipermail/lxc-devel/2013-December/006736.html and man lxc.conf => Connection user is root => root has the default password 'toor', please change it ASAP (reverse-i-search)`nan': ^Cno /usr/share/lxc/config/gentoo.moresecure.conf # lxc-start -n test lxc-start: No such file or directory - failed to mount '/var/cache/portage/gentoo/distfiles' on '/usr/lib/lxc/rootfs/usr/portage/distfiles' lxc-start: failed to setup the mount entries for 'test' lxc-start: failed to setup the container lxc-start: invalid sequence number 1. expected 2 lxc-start: failed to spawn 'test' lxc-start: The container failed to start. lxc-start: Additional information can be obtained by setting the --logfile and --log-priority options. ```
Created attachment 382714 [details] emerge --info app-emulation/lxc
Hi, bugs for the gentoo templates should be filed upstream https://github.com/lxc/lxc/issues