Questions tagged [unikernel]

Unikernels: Library Operating Systems for the Cloud

Operating system virtualization has revolutionised the economics of large-scale computing by providing a platform on which customers rent resources to host virtual machines (VMs).

Each VM presents as a self-contained computer, booting a standard OS kernel and running unmodified application processes. Each VM is usually specialised to a particular role, e.g., a database, a webserver, and scaling out involves cloning VMs from a template image. Despite this shift from applications running on multi-user operating systems to provisioning many instances of single-purpose VMs, there is little actual specialisation that occurs in the image that is deployed to the cloud.

We take an extreme position on specialisation, treating the final VM image as a single-purpose appliance rather than a general-purpose system by stripping away functionality at compile-time. Specifically, our contributions are: the unikernel approach to providing sealed single-purpose appliances, particularly suitable for providing cloud services; evaluation of a complete implementation of these techniques using a functional programming language (OCaml), showing that the benefits of type-safety need not damage performance; and libraries and language extensions supporting systems programming in OCaml.

The unikernel approach builds on past work in library OSs.

  • The entire software stack of system libraries, language runtime, and applications is compiled into a single bootable VM image that runs directly on a standard hypervisor.
  • By targeting a standard hypervisor, unikernels avoid the hardware compatibility problems encountered by traditional library OSs such as Exokernel and Nemesis.
  • By eschewing backward compatibility, in contrast to Drawbridge, unikernels address cloud services rather than desktop applications.
  • By targeting the commodity cloud with a library OS, unikernels can provide greater performance and improved security compared to Singularity.
  • Finally, in contrast to Libra which provides a libOS abstraction for the JVM over Xen but relies on a separate Linux VM instance to provide networking and storage, unikernels are more highly-specialised single-purpose appliance VMs that directly integrate communication protocols.

We describe a complete unikernel prototype in the form of our OCaml-based Mirage implementation. We evaluate it via micro-benchmarks and appliances providing DNS, OpenFlow, and HTTP. We find sacrificing source-level backward compatibility allows us to increase performance while significantly improving the security of external-facing cloud services. We retain compatibility with external systems via standard network protocols such as TCP/IP, rather than attempting to support POSIX or other conventional standards for application construction. For example, the Mirage DNS server outperforms both BIND 9 (by 45%) and the highperformance NSD server, while using very much smaller VM images: our unikernel appliance image was just 200 kB while the BIND appliance was over 400 MB.

We conclude by discussing our experiences building Mirage and its position within the state of the art, and concluding.

20 questions
24
votes
3 answers

Docker Container compared with Unikernel

I recently deployed a tiny Haskell app with docker, using "scratch-haskell" as a base image. Then I read about Unikernels and HALVM. And I got a little confused. My docker container is about 6MB large. A Unikernel (with the same haskell app) would…
Robin
  • 1,170
  • 1
  • 10
  • 21
9
votes
2 answers

How is Docker related to exokernal approach like Mirage OS?

How is Docker related to exokernal approaches like MirageOS? For some information about MirageOS…
user570599
  • 111
  • 4
9
votes
1 answer

HaLVM and threads

I don't quite understand what eg HaLVM or similar technologies do in terms of (OS) threads. I understand that when compiling code with the option -threaded then the Haskell multithreaded RTS will use OS threads to re-allocate existing Haskell…
J Fritsch
  • 3,338
  • 1
  • 18
  • 40
6
votes
1 answer

Why are many "bare kernel+app" solutions targeting xen?

There's a number of projects that produce complete images from your app, bootable on xen as a machine. For example Erlang on Xen, OpenMirage, HaLVM, and others. Why is Xen the default hypervisor for them? Does it provide some interface that makes…
viraptor
  • 33,322
  • 10
  • 107
  • 191
5
votes
4 answers

What is a unikernel?

I am new to unikernels and the following links didn't help me much to understand them: https://searchitoperations.techtarget.com/definition/unikernel https://en.wikipedia.org/wiki/Unikernel When is it better to use a unikernel? How is a unikernel…
RRON
  • 1,037
  • 3
  • 12
  • 32
5
votes
2 answers

MirageOS - Unable to build unikernel for XEN

I've written a simple MirageOS-based Unikernel to execute a basic HTTP GET call. While it is working without any problems when I run it as a Unix binary, the moment I configure it for XEN (mirage configure --xen) and launch the make command, I get…
Vittorio Cozzolino
  • 931
  • 1
  • 14
  • 31
4
votes
2 answers

Is it possible to run executables/binaries (Already built) as unikernels?

TIA. Is it possible to run Linux binaries like chrome without building from source as unikernels?
Sudhakar Ramasamy
  • 1,736
  • 1
  • 8
  • 19
3
votes
1 answer

did mirage OS implemented the linux kernel in OCaml?

Is it true that mirage is a new implementation of unix kernel with OCaml instead of C? or is mirage implemented only a part of unix kernel in Ocaml? Thanks.
3
votes
0 answers

Unbound value Mirage.load when executing make depend

I'm trying to compile and build this simple Unikernel project https://github.com/MagnusS/mirage-stats-demo under Ubuntu 14.04 with latest versions of OCaml, OPAM and related packages, but when I execute the command make depend the following error…
Vittorio Cozzolino
  • 931
  • 1
  • 14
  • 31
3
votes
2 answers

How to build a Xen unikernel of Mirage OS

I read this document(http://openmirage.org/wiki/hello-world) and tried to build a xen unikernel as follows: mirage configure --xen make depend make But failed at compilation: ocamlbuild -classic-display -use-ocamlfind -pkgs…
garasubo
  • 85
  • 7
2
votes
1 answer

MirageOS - Http-fetch example

I'm trying to modify a bit the MirageOS http-fetch example (https://github.com/mirage/mirage-skeleton) that can be found inside mirage-skeleton but I'm having some problems understanding why I can't move some of the function executed inside the…
Vittorio Cozzolino
  • 931
  • 1
  • 14
  • 31
1
vote
3 answers

IncludeOS hello world failing

I would like to look into IncludeOS and run their hello world. I am on Ubuntu and did install the required dependencies. The program exits with an error. What am I doing wrong here? apt-get install python3-pip python3-dev git cmake clang-6.0 gcc…
User12547645
  • 6,955
  • 3
  • 38
  • 69
1
vote
0 answers

Build unikernel mirage on mac OS X

I would like to build a unikernel image of a mirage app for use with Kubernetes on a VirtualBox on my Mac OS X. How should I go about building it? All attempts at make specifically deny the use of Darwin.
1
vote
1 answer

Can code from a garbage-collected language generate a Unikernel?

The system development world is excited about Unikernels lately. In short, Unikernels are applications that are compiled to a self-contained, bootable operating system rather than a process in an existing operating system. Is there any theoretical…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
1
vote
1 answer

Rump unikernel nginx logs

I just run the rump tutorial to create a unikernel for nginx to deliver static content. The tutorial works perfectly, but I have a questions about logging. The unikernel is sending all the error logs to stderr (and therefore is captured by the qemu…
Tk421
  • 6,196
  • 6
  • 38
  • 47
1
2