[Lxc-users] Questions on lxc-execute
Daniel Lezcano
daniel.lezcano at free.fr
Thu Jun 3 19:48:18 UTC 2010
On 06/03/2010 06:24 PM, Nirmal Guhan wrote:
> Forgot to mention previously that I am able to successfully do lxc-start on
> the same container and /bin/bash is also part of rootfs.
>
> Here is the strace output (pretty long). Failure seems to be at :
>
> [pid 2386] execve("/usr/libexec/lxc-init", ["/usr/libexec/lxc-init", "--",
> "/bin/bash"], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
> [pid 2386] gettimeofday({1275567472, 880216}, NULL) = 0
> [pid 2386] write(2, "lxc-execute: ", 13lxc-execute: ) = 13
> [pid 2386] write(2, "No such file or directory - fail"..., 64No such file
> or directory - failed to exec /usr/libexec/lxc-init) = 64
>
> [root at guhan-fedora lxc]# file /usr/libexec/lxc-init
> /usr/libexec/lxc-init: ELF 32-bit LSB executable, Intel 80386, version 1
> (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18,
> stripped
> [root at guhan-fedora lxc]#
>
>
>
> <----- Begin strace ------->
>
[ ... }
> [pid 2386] pivot_root(".", "./lxc-oldrootfs-9mRXDz") = 0
>
lxc-init may not be present in the rootfs.
IMO, you should try to start your container with lxc-start instead of
lxc-execute.
lxc-execute is mostly used for application containers which does share
the file system.
AFAICS, you setup a system container, so you may use the lxc-start command.
The lxc-sshd script, is a good example on how to setup an application
container with a rootfs.
More information about the lxc-users
mailing list