<p dir="ltr">As I said I use kvm and this question was just for sake of argument. Since you ask I work with sockets ATM. </p>
<div class="gmail_quote">30 lip 2015 16:03 "nick" <<a href="mailto:xerofoify@gmail.com">xerofoify@gmail.com</a>> napisał(a):<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 2015-07-30 09:57 AM, Grzegorz Dwornicki wrote:<br>
> Yeah I've thought that hardware can be hard to program on UML<br>
> 30 lip 2015 14:48 "nick" <<a href="mailto:xerofoify@gmail.com">xerofoify@gmail.com</a>> napisał(a):<br>
><br>
Just so I known what area are you working in as this may help<br>
me find a better solution for you.<br>
Nick<br>
>><br>
>><br>
>> On 2015-07-30 08:47 AM, Grzegorz Dwornicki wrote:<br>
>>> What about UML? I'm using KVM but asking for the sake of argument.<br>
>>><br>
>> I already stated that it works fine if your not doing hardware<br>
>> exact development like file systems or networking core.<br>
>> Nick<br>
>>> 2015-07-29 23:03 GMT+02:00 Manish Katiyar <<a href="mailto:mkatiyar@gmail.com">mkatiyar@gmail.com</a>>:<br>
>>>> On Wed, Jul 29, 2015 at 1:49 PM, Greg Freemyer <<a href="mailto:greg.freemyer@gmail.com">greg.freemyer@gmail.com</a>><br>
>> wrote:<br>
>>>>> On Wed, Jul 29, 2015 at 4:23 PM, Manish Katiyar <<a href="mailto:mkatiyar@gmail.com">mkatiyar@gmail.com</a>><br>
>> wrote:<br>
>>>>>> On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran <<a href="mailto:Jeff.Haran@citrix.com">Jeff.Haran@citrix.com</a>><br>
>> wrote:<br>
>>>>>>>> -----Original Message-----<br>
>>>>>>>> From: <a href="mailto:kernelnewbies-bounces@kernelnewbies.org">kernelnewbies-bounces@kernelnewbies.org</a> [mailto:<br>
>> kernelnewbies-<br>
>>>>>>>> <a href="mailto:bounces@kernelnewbies.org">bounces@kernelnewbies.org</a>] On Behalf Of Manish Katiyar<br>
>>>>>>>> Sent: Wednesday, July 29, 2015 11:51 AM<br>
>>>>>>>> To: kernelnewbies<br>
>>>>>>>> Subject: Kernel development using linux containers (LXC ) ?<br>
>>>>>>>><br>
>>>>>>>> Hi,<br>
>>>>>>>><br>
>>>>>>>> I've been playing and reading about control groups and linux<br>
>> containers<br>
>>>>>>>> recently and was wondering if there are any existing recipes on how<br>
>> to setup<br>
>>>>>>>> a kernel environment in containers. Google hasn't been helpful so<br>
>> far (or<br>
>>>>>>>> maybe I'm not searching properly).<br>
>>>>>>>><br>
>>>>>>>> I've used VMs for dev in past (Qemu, uml etc.), but looks like it<br>
>> may be<br>
>>>>>>>> interesting to have it in containers. Given that they share they<br>
>> same OS image<br>
>>>>>>>> as host, I'm not sure if its possible without making the host OS<br>
>> crash.<br>
>>>>>>>><br>
>>>>>>>> Any suggestions.<br>
>>>>>>>><br>
>>>>>>>> Thanks -<br>
>>>>>>>> Manish<br>
>>>>>>><br>
>>>>>>> I'm not sure what your goal is here, but it sounds to me like you<br>
>> might want to be googling for "linux namespaces".<br>
>>>>>><br>
>>>>>> I'm sorry. I see that my previous mail had a key word "development"<br>
>>>>>> missing. What I was trying to find out was that is it possible to<br>
>>>>>> setup and use linux containers/cgroups to do kernel development.<br>
>>>>>> Things like writing and test kernel modules, debugging kernel,<br>
>>>>>> attaching gdb etc. etc. which normally require Qemu, busybox or other<br>
>>>>>> VM techniques since containers are much lightweight and if anyone has<br>
>>>>>> recipes for that setup to do development without crashing the host OS.<br>
>>>>>><br>
>>>>>> Any hints appreciated. I looked for "linux namespaces" but it doesn't<br>
>>>>>> give me what I want.<br>
>>>>>><br>
>>>>><br>
>>>>> I have no first hand experience, but I don't think containers have the<br>
>>>>> flexibility you need. Docker in particular shares the kernel with the<br>
>>>>> host OS as far as I know, so it would not be of any value that I can<br>
>>>>> see.<br>
>>>>><br>
>>>>> I think a unikernel may be what you are looking for:<br>
>>>>><br>
>>>>><br>
>> <a href="http://www.linux.com/news/enterprise/cloud-computing/821243-unikernel-use-cases-containers" rel="noreferrer" target="_blank">http://www.linux.com/news/enterprise/cloud-computing/821243-unikernel-use-cases-containers</a><br>
>>>>><br>
>>>>> My understanding is that with a unikernel you can move targeted<br>
>>>>> portions of the Hypervisor kernel up into the unikernel. Thus if you<br>
>>>>> wanted to work on a network driver, you could implement it in a<br>
>>>>> unikernel. Then if it blew up you would fall back to the hypervisor<br>
>>>>> level, kill the unikernel and try again.<br>
>>>>><br>
>>>>> The Rump kernel (a unikernel) in particular might be a good option:<br>
>>>>><br>
>>>>> ==<br>
>>>>> Rump Kernels — provide free, portable, componentized, kernel quality<br>
>>>>> drivers such as file systems, POSIX system call handlers, PCI device<br>
>>>>> drivers, a SCSI protocol stack, virtio and a TCP/IP stack. These<br>
>>>>> drivers may be integrated into existing systems, or run as stand-alone<br>
>>>>> unikernels on cloud hypervisors and embedded systems.<br>
>>>>> ==<br>
>>>>><br>
>>>>> I have no first hand experience with the Rump Kernel, so I don't know<br>
>>>>> if it would work as a way to do linux kernel development or not. It<br>
>>>>> certainly seems like a great environment for generic kernel<br>
>>>>> development.<br>
>>>><br>
>>>> Thanks a lot GregF/GregKH,<br>
>>>><br>
>>>> That's what I suspected, that it might not be possible because of<br>
>>>> both sharing the same OS. I'll have a look at Rump Kernels and see how<br>
>>>> far it goes. Thanks for the pointers !<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Kernelnewbies mailing list<br>
>>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
>>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>>><br>
>>> _______________________________________________<br>
>>> Kernelnewbies mailing list<br>
>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>>><br>
>><br>
><br>
</blockquote></div>