On Mon, May 12, 2014 at 1:25 AM, Dan Kegel <[email protected]> wrote: > This has probably been raised before, but unless you copy in init.lxc > manually, e.g. > > sudo cp /usr/sbin/init.lxc /var/lib/lxc/busybox/rootfs/usr/sbin/ > > the commands > > sudo lxc-create -n busybox -t busybox > sudo lxc-execute -n busybox -- top > > will create the container, but fail on execute with the confusing message > > lxc-execute: Failed to find an lxc-init
My guess is that is intentional. A busybox template (and probably the sshd template) should be as simple and as small as possible, demonstrating the possible small resource usage (in this case, disk space) of a container. So having it able to start with lxc-start (and in the case of sshd, accepting connections) is sufficient. It is also not a straightforward matter to copy init.lxc. In ubuntu trusty at least, I had to copy to other libraries manually to a ubuntu container to make it work: liblxc.so.1 and libseccomp.so.2. For a busybox container I imagine the dependencies will be much more. An interesting note, however, is that on the said ubuntu container, having /usr/sbin/init.lxc as a symlink for /bin/bash seem to work just fine. Perhaps the same would work for busybox containers as well (in this case, you might need a wrapper script instead of symlink)? -- Fajar _______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
