Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Please create a .NET Core Unikernel, Nano Server is too Big #541

Open
AceHack opened this issue Dec 16, 2015 · 22 comments
Open

Please create a .NET Core Unikernel, Nano Server is too Big #541

AceHack opened this issue Dec 16, 2015 · 22 comments
Labels
Milestone

Comments

@AceHack
Copy link

AceHack commented Dec 16, 2015

Containers like Docker and Server OSs like Nano Server are too big and bring to much baggage. Please create an ultra tiny .NET Core Unikernel for the ultimate cloud OS. Make sure it runs perfect in Hyper-V and Xen.

Some background links:
http://research.microsoft.com/en-us/projects/drawbridge/
http://wiki.xenproject.org/wiki/Unikernels
https://www.youtube.com/watch?v=W9F4pn9Lngc
https://www.linux.com/news/enterprise/cloud-computing/819993-7-unikernel-projects-to-take-on-docker-in-2015

@jkotas jkotas added this to the Future milestone Dec 16, 2015
@MichalStrehovsky
Copy link
Member

@AceHack Rump Kernels linked from one of your articles provides support running POSIX'y software. Chances are that if you play around a bit, you can get the Linux-targeting CoreRT running with it...

@tijoytom-zz
Copy link
Contributor

I did some experiments with OSV using C++ codegen and was able to get a simple helloworld working

Got the simple hello world working after I disabled QueryCacheSize and the finalizer thread.

tijoytom@uberbot:~/osv$ sudo ./scripts/run.py -nv -c1
OSv v0.24-36-gcd362a2
eth0: 192.168.122.89
/# Hello Unikernel from C#

  1. Removed bool QueryCacheSize() from PalRedhawkUnix , opendir("/sys/devices/system/cpu") do not work on OSV.
  2. Disabled the finalizer thread since PalWaitForSingleObjectEx(hFinalizerEvent .. was triggering the page fault.

I will be updating https://github.com/tijoytom/capstan-example with instructions on how get the hello world working if anyone wants to playground with it.

@b3nt0
Copy link

b3nt0 commented Jan 25, 2016

There is actually a really nice write up by one of the founders of Joyent about how unikernels may be missing the point a bit. (Sorry, I don't have the URL.) His point, in short, was basically that applications these days actually aren't bound by context switches, which are the main thing that unikernels save you from. I'm probably not doing it justice, but it did make the case that what's intuitively better sometimes really isn't that much better when you make measurements.

@tijoytom-zz
Copy link
Contributor

I think this's what you are refereeing to https://www.joyent.com/blog/unikernels-are-unfit-for-production
But there are lot of well thought argument for unikernel in the comments "https://news.ycombinator.com/item?id=10953766".

@b3nt0
Copy link

b3nt0 commented Jan 25, 2016

That's the one. Thanks!

@xied75
Copy link

xied75 commented Feb 2, 2016

Understandable given how open .NET now is, we surely can pick other unikernel systems as the base, yet why trash the valuable work of DrawBridge to not "Change the World"? If Docker "forced" MS to embrace container and being a follower, why repeat this again and lose unikernel game? Everybody would benefit if considering the IoT thing, as Mary Jo said.

Anyone interested to start a petition to Open the DrawBridge?

@ilackarms
Copy link

@tijoytom definitely interested in seeing the work you did with OSv

@tijoytom-zz
Copy link
Contributor

@ilackarms It's been a while back that i did the experiment , i still have the run-time changes on my machine. The path that i look was the easiest ie use cpp compile and then use clang / gcc to compile to native binary.
Is there anything particular you are interested in ?

@ilackarms
Copy link

@tijoytom you did not cross-compile dotnet CLR? all you did was compile some C# to a native binary? and that worked?

@tijoytom-zz
Copy link
Contributor

@ilackarms Yes , I did cross compile the runtime (dotnet CLR) and link it to produce the final binary.
1 . Use CoreRT cpp codegen to generate c++ code for the test c# application . The output here is a cpp file with all the necessary plumbing to initialize the run-time and jump to app's main method.
2. Compile the run-time.
3. Compile an link the cpp from (1) and runtime from (2) to produce the final binary.

@ilackarms
Copy link

@tijoytom were there any changes you had to make to CLR source to make it cross compile to run on OSv?

@tijoytom-zz
Copy link
Contributor

@ilackarms I didn't actually make any change to compile CLR , but i had to make some changes to get 'helloworld' running on OSV .

1.Removed bool QueryCacheSize() from PalRedhawkUnix , opendir("/sys/devices/system/cpu") do not work on OSV.
2.Disabled the finalizer thread since PalWaitForSingleObjectEx(hFinalizerEvent .. was triggering a page fault.

@ilackarms
Copy link

great! thanks. I am interested in trying this out on top of a rumprun unikernel instead of OSv.

@radu-matei
Copy link

Hi, everybody!

Did any of you continued working on running .NET on top of a unikernel?

Thanks!

@wub
Copy link

wub commented Jul 11, 2017

Any updates on this stuff?

@AceHack
Copy link
Author

AceHack commented Dec 27, 2017

any updates?

@carlpaten
Copy link

@AceHack two things:

  1. Odds are, if they were making progress on this there would be a highly visible blog post popping up on Reddit and elsewhere;
  2. You can probably do this yourself via Rump kernels :)))

@moloneymb
Copy link

moloneymb commented Dec 27, 2017

I'm looking at using WebAssembly based unikernels in the distant future. I assume .Net -> WebAssembly and Non-Web Embeddings for WebAssembly are both much more likely to happen independently than a lightweight .Net Unikernel.

@CRCinAU
Copy link

CRCinAU commented Aug 13, 2018

Just wanted to give this a punt.... Any news / progress as yet?

@philiplaureano
Copy link

I just recently saw a talk done by the creators of the vorteil.io unikernel and they claim that they can get .NET core running on top of their custom Linux unikernel. The only caveat is that their kernel is not open source.

@CRCinAU
Copy link

CRCinAU commented Aug 23, 2018

If it's based on the linux kernel, I'm not sure they can keep it closed source if they distribute the binary to people...

@philiplaureano
Copy link

IANAL, but what I can say is that if they can do it for the JVM, then they can most certainly do the same thing with the CLR: https://www.youtube.com/watch?v=C_YEfT7bZm8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests