[lxc-devel] [lxc-dev]how to use lxc directly in kernel

Daniel Smith viscous.liquid at gmail.com
Fri Nov 4 18:09:54 UTC 2011


On 11/4/2011 12:42 PM, Guido Trotter wrote:
> On Thu, Oct 27, 2011 at 6:35 AM,<yinxb at neusoft.com>  wrote:
>
> Hi,
>
>> Hi
>>
>>   I am a newbie to Linux container.
>>   Recently,I decide to using lxc derectly on linux kernel,but find it
>> hard to install.
>> (so far as I know,lxc tools is based on GUI Linux distribution).
>>   Anyone has this experience?
>>   or give me a hint on how to use the lxc directly on linux kernel
>> without the lxc tools?
>>
> That requires programming in C and calling syscalls. It's not quite
> easier than using "lxc" :)
>
> Thanks,
>
> Guido
>
  I think the poster should clarify what they mean by using lxc directly 
on the kernel. If they just want the namespace isolation they can use 
the unshare utility in a shell script to wrap the target program. 
CGroups can easily be managed in a similar fashion. You could even 
provide an alternative rootfs through the chroot utility. As I type 
this, I think it would be an interesting challenge to see how much of 
lxc could be recreated as a shell script(s) using these utilities.

v/r,
Daniel





More information about the lxc-devel mailing list