What is Mirage OS?
Mirage is an exokernel for constructing secure, high-performance network applications across a variety of cloud computing, embedded and mobile platforms. Mirage OS was initially designed to for cloud use, which is why we call it a Cloud Operating System. Mirage OS applications are developed in a high-level functional programming language (OCaml) on a desktop OS such as Linux or Mac OSX, and is then compiled into a fully-standalone, specialised microkernel. These microkernels run directly on Xen Project hypervisor APIs. Since the Xen Project powers most public clouds such as Amazon EC2, Rackspace Cloud, and many others, Mirage lets your servers run more cheaply, securely and faster in any Xen Project based cloud or hosting service.
The following presentation introduces Mirage OS:
- Screencast of Mirage OS Developer Preview (Video/Demo, 2013)
- Mirage OS & XAPI project update (Video, Xen Project Developer Summit 2013)
- Mirage OS: extreme specialisation of virtual appliances (Video, Xen Project Developer Summit 2012)
- Mirage OS: extreme specialisation of virtual appliances (Presentation, Xen Project Developer Summit 2012)
Why use Mirage OS?
The cloud has so far mostly been used to consolidate existing operating systems and manage them more conveniently. The interface between guest kernels, applications and VMs are all managed very differently, leading to serious inefficiencies, unreliability and insecurity.
The Xen Mirage OS revisits the library OS concept (built as Nemesis in the Cambridge Computer Lab in the late ’90s), and finds it a practical approach to improve this situation. It treats the Xen hypervisor as a stable hardware platform and allows us to focus on high-performance protocol implementations without worrying about having to support the thousands of device drivers found in a traditional OS.
Mirage includes clean-slate functional implementations of protocols ranging from TCP/IP, DNS, SSH, Openflow (switch/controller), HTTP, XMPP and Xen Project inter-VM transports. Some of the new applications we are building using Mirage include the next-generation Xen Cloud Platform (a widely deployed open-source Xen distribution), dubbed Project Windsor.
Examples of Mirage Appliances
An example of a current Mirage appliance can be seen at openmirage.org, which is a self-hosted site deployed on the public cloud (in this case, on Amazon EC2). With some further work, it will be possible to encapsulate an existing piece of software using Mirage. One example might be to use Mirage to form an appliance from an existing Content Management System (e.g Drupal or Joomla). Such systems typically need several components and expect to be installed on a server. Mirage could be used to encapsulate a CMS, retaining only the components and bindings required by the CMS and removing the need for the rest of the Operating System. Such an appliance could be auto-configured and deployed directly to the public cloud (e.g. Rackspace or Amazon EC2).
Mirage is based around the OCaml language, with syntax extensions and libraries which provide networking, storage and concurrency support that are easy to use during development, and map directly into operating system constructs when being compiled for production deployment. The framework is fully event-driven, with no support for preemptive threading.
The Xen Mirage codebase is released under the ISC license, with some portions of code released under LGPLv2. Xen Sub-Projects hosted by the Xen Project typically use GPLv2. In the case of Xen Mirage it is necessary to use a permissive open source license such as "ISC" because Mirage based microkernels need to be statically linked with applications to form a stand-alone appliance.