[Lxc-users] Questions on lxc-execute
Daniel Lezcano
daniel.lezcano at free.fr
Thu Jun 3 11:40:57 UTC 2010
On 06/03/2010 09:51 AM, Nirmal Guhan wrote:
> Have few questions on lxc-execute :
>
> 1) Getting an error as :
> [root at guhan-fedora lxc]# lxc-execute --name=centos /bin/bash
> lxc-execute: No such file or directory - failed to exec
> /usr/libexec/lxc-init
> [root at guhan-fedora lxc]# lxc-execute --name=centos -- /bin/bash
> lxc-execute: No such file or directory - failed to exec
> /usr/libexec/lxc-init
>
> [root at guhan-fedora lxc]# ls -l /usr/libexec/lxc-init
> -rwxr-xr-x. 1 root root 8004 2010-02-17 21:38 /usr/libexec/lxc-init
>
hmm .. ? weird.
Can you give a "strace -f" please ?
Wasn't the container previously created and, if yes, did you specified a
rootfs which may not contain "/bin/bash" ?
> 2) Can the container run only one application at a time - such as one
> instance of lxc-execute ?
No you can run thousand of them but you need to specify different names.
lxc-execute -n foo1 /bin/bash
lxc-execute -n foo2 /bin/bash
etc ...
> So do I have to create multiple containers if I
> have to lxc-execute multiple applications
Not necessarily, you can call lxc-execute with a configuration file,
without creating the container before.
> or if I want to run lxc-start and
> lxc-execute in parallel ? From the man pages, it looks like the case but
> please clarify.
>
You can launch any numbers of containers you want. It is up to you to
define the right configuration for each container you launch in order to
prevent resources overlaps and conflicts.
I was able to spawned 1000 applications on the same host simultaneously,
as well as launching 100 debian containers with a btrfs cow filesystem.
Thanks
-- Daniel
More information about the lxc-users
mailing list