Kernel development using linux containers (LXC ) ?

Greg KH greg at kroah.com
Wed Jul 29 16:35:25 EDT 2015


On Wed, Jul 29, 2015 at 01:23:18PM -0700, Manish Katiyar wrote:
> On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran <Jeff.Haran at citrix.com> wrote:
> >>-----Original Message-----
> >>From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-
> >>bounces at kernelnewbies.org] On Behalf Of Manish Katiyar
> >>Sent: Wednesday, July 29, 2015 11:51 AM
> >>To: kernelnewbies
> >>Subject: Kernel development using linux containers (LXC ) ?
> >>
> >>Hi,
> >>
> >>I've been playing and reading about control groups and linux containers
> >>recently and was wondering if there are any existing recipes on how to setup
> >>a kernel environment in containers. Google hasn't been helpful so far (or
> >>maybe I'm not searching properly).
> >>
> >>I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be
> >>interesting to have it in containers. Given that they share they same OS image
> >>as host, I'm not sure if its possible without making the host OS crash.
> >>
> >>Any suggestions.
> >>
> >>Thanks -
> >>Manish
> >
> > I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces".
> 
> I'm sorry. I see that my previous mail had a key word "development"
> missing. What I was trying to find out was that is it possible to
> setup and use linux containers/cgroups to do kernel development.
> Things like writing and test kernel modules, debugging kernel,
> attaching gdb etc. etc. which normally require Qemu, busybox or other
> VM techniques since containers are much lightweight and if anyone has
> recipes for that setup to do development without crashing the host OS.

No, this will not work for that task, you are running the same kernel,
only userspace is "partitioned" off in different ways.

sorry, stick with kvm.

greg k-h



More information about the Kernelnewbies mailing list