[Lxc-users] Need simple configuration for embedded ARM LXC

Somnath Mitra somnath.mitra at xockets.com
Fri Apr 12 22:36:53 UTC 2013


On Fri, Apr 12, 2013 at 6:53 AM, Serge Hallyn <serge.hallyn at ubuntu.com>wrote:

> Quoting Somnath Mitra (somnath.mitra at xockets.com):
>
 > Since the container rootfs is shared with host I am confused why it
> cannot
> > find lxc-init?
>
> Sounds like a compilation/packaging problem.  It works for me
> here, with ubuntu raring:
>
> cat > lxc.conf << EOF
> lxc.utsname = beta
> lxc.network.type = empty
> lxc.rootfs = /
> lxc.aa_profile = unconfined
> EOF
>
> sudo lxc-execute -n foobar -f lxc.conf -l info -o outout -- ps -ef
> UID        PID  PPID  C STIME TTY          TIME CMD
> root         1     0  0 08:46 pts/1    00:00:00
> /usr/lib/x86_64-linux-gnu/lxc/lxc-init -- ps -ef
> root         2     1  0 08:46 pts/1    00:00:00 ps -ef
>
> (an interactive shell doesn't work - just hangs, I don't use
> lxc-execute so always forget what is expect to work and what
> isn't)
>

Hangs for me too (on the embedded board). Can you comment on possible root
cause or workaround so we can investigate. My target application shall need
stdin, stdout and, possibly, stderr.


>
> > I have already checked that kernel is configured correctly using
> > lxc-checkconfig.
> >
> > Pls send a pointer to a simple working configuration for embedded
> systems.
>
> Take a look at src/lxc/execute.c:choose_init().  It will look for
> lxc-init in three places:
>
>         LXCINITDIR "/lxc/lxc-init"
>         /usr/lib/lxc/lxc-init
>         /sbin/lxc-init
>
> LXCINITDIR in ubuntu is /usr/lib/x86_64-linux-gnu, and lxc-init is in
> fact at /usr/lib/x86_64-linux-gnu/lxc/lxc-init.  (You can find your
> LXCINITDIR in config.log if you built your own lxc).  But the
> easier thing might be to just copy lxc-init into /sbin.
>

Yes I had put lxc-* binaries in /usr/bin. Putting them in /sbin solved it.

Thanks,
SM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130412/44b8c5be/attachment.html>


More information about the lxc-users mailing list