Quoting Somnath Mitra (somnath.mi...@xockets.com): > On Fri, Apr 12, 2013 at 6:53 AM, Serge Hallyn <serge.hal...@ubuntu.com>wrote: > > > Quoting Somnath Mitra (somnath.mi...@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 > > cat > lxc.conf << EOF > > lxc.utsname = beta > > lxc.network.type = empty > > lxc.rootfs = / > > lxc.aa_profile = unconfined > > 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.
Hi Daniel, can you comment on this by chance? I frankly don't use lxc-execute, and I know you know of all sorts of special circumstances surrounding it... For me, cat > lxc.conf << EOF lxc.utsname = beta lxc.network.type = empty lxc.rootfs = / lxc.aa_profile = unconfined EOF lxc-execute -n foobar -f lxc.conf -- ps -ef works fine, while lxc-execute -n foobar -f lxc.donf -- /bin/sh hangs - some tty session thing? > > > 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. ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users