>
> AFAICS, you would like to share the filesystem, maybe you not need to
> specify a rootfs.
>
> I suggest you remove the containers you previously created in order to
> restart on a sane base. In case, list them with "lxc-ls" to make sure you
> have no remaining containers set on your system.
>
> Then just do without any previous creation:
>
> lxc-execute -n foo <myapplication>
>
> Your application will run with its own private mount points, pids, ipcs,
> uts and setup with a cgroup.
>
> If you need more isolation like the network:
>
> create a configuration file "eg. lxc.conf"
>
> lxc.utsname = myapplication
> lxc.network.type = veth
> lxc.network.flags = up
> lxc.network.link = br0
> lxc.network.ipv4 = 1.2.3.5/24
>
> and launch it with the command lxc-execute -n foo -f lxc.conf
> <myapplication>
>
> Or alternatively without a configuration file,
>
> lxc-execute -n foo -s lxc.utsname=myapplication -s lxc.network.type=veth -s
> lxc.network.flags=up -s lxc.network.link=br0 -s lxc.network.ipv4=
> 1.2.3.5/24 <myapplication>
>
> At this point, if you need to be more secure or the application you are
> launching is writing to a directory and this is conflicting with another
> instance of the same application, let me know, I will give you a more
> complex configuration.
>
> What is needed are informations about the application (a web server, a
> sshd, an autistic application, etc ...).
>
> Thanks
>  -- Daniel
>
>
Hi Daniel,

It seems to work after I removed the rootfs and fstab from the config file.
Otherwise I get an error as below :


> [r...@guhan-fedora lxc]# lxc-ls
> [r...@guhan-fedora lxc]# lxc-execute -n centos -f centos.config /bin/bash
> lxc-execute: No such file or directory - failed to exec
> /usr/libexec/lxc-init
> [r...@guhan-fedora lxc]# lxc-create -n centos -f centos.config
> 'centos' created
> [r...@guhan-fedora lxc]# lxc-execute -n centos /bin/bash
> lxc-execute: No such file or directory - failed to exec
> /usr/libexec/lxc-init
> [r...@guhan-fedora lxc]# lxc-execute -n centos -f centos.config /bin/bash
> lxc-execute: No such file or directory - failed to exec
> /usr/libexec/lxc-init
> [r...@guhan-fedora lxc]#
>

Removing rootfs fixes the issue and my app runs. Does this mean, application
container does NOT need rootfs and hence installation of the distro etc. ?
For system containers, I installed rootfs using debootstrap. I believe these
steps are not required. Please enlighten.

Thanks,
Nirmal
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to