Tag Archives: Linux

Xen & Docker: Made for Each Other!

By Olivier Lambert

Containers and hypervisors are often seen as competing technologies – enemies even. But in reality the two technologies are complementary and increasingly used together by developers and admins. This recent Linux.com article talked about this supposed battle, noting however that developers are using Docker in traditional VMs to bolster security. Containers allow users to develop and deploy a variety of applications with incredible efficiency, while virtualization eliminates any constraints and/or exposure to outside attacks.

Uniting these technologies helps developers and system administrators be even more efficient. Let’s take a closer look at how to achieve this with Docker and Xen Project virtualization, and why we expect more and more organizations to use them together in the near future. This will also be a key topic at the September 15 Xen Project User Summit at the Lighthouse Executive Conference Center in New York City. Register today to learn more about enabling Docker in Xen environments for a truly open infrastructure.


Caption: Xen In Action: lifting Docker, which is lifting containers. I heard you like boats, so I put boats on your boat :).

Who’s Who: What is Xen Project Virtualization?

Xen Project Hypervisor is mature virtualization technology used by many of the world’s largest cloud providers like AWS, Verizon Terremark, Rackspace and many more. Founded in 2003, Xen Project virtualization is proven as a highly reliable, efficient and flexible hypervisor for a range of environments, running perfectly from x86 to ARM.

It’s now completely integrated in the Linux upstream and is hosted by the Linux Foundation. The same big cloud users mentioned above also contribute regularly to the project along with many of the world’s largest technology companies, including Citrix, Cavium, Intel, Oracle and more.

Feature updates and broader community collaboration are on the upswing too: more commits, more communication, better integration, new use cases and simpler and more powerful modes, such as PVHVM then PVH, as outlined in this recent blog.

The core Xen Project team takes security seriously. The technology has also been battle-tested by many in the defense industry including the NSA. Xen Project users have benefited from this for years, and developers building, shipping and running distributed applications will profit as well.


What is XenServer and Xen Orchestra?

XenServer is a packaged product consisting of the Xen Project Hypervisor and the Xen Project Management API (XAPI) toolstack within a performance tuned CentOS distribution. It’s free and can be installed in just a few minutes; click here to download it: http://xenserver.org/open-source-virtualization-download.html.

Xen Orchestra (XO) is a simple but powerful web interface working out-of-the-box with XenServer, or any host with Xen and XAPI (the most advanced API for Xen). Take a look on the project website to learn more. Both of these tool are of course free software.

What is Docker?

In its own words, Docker defines itself as an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments.


Main Advantages:

  • fast (boot a container in milliseconds)
  • simple to use, even in complex workflows
  • light (same kernel)
  • container density on one host

The other side of the coin:

  • all containers rely on the same kernel (isolation, security)
  • less maturity than traditional hypervisor (Docker is still young)
  • containers are using the same OS on the host (less diversity than hypervisors)
  • some friction between developers and admins about its usage: not Docker’s fault, more a classical friction when you bring new toys to your devs. :) We’ll see why and how to cope with just that below.

Best of Both Worlds

An ideal world would:

  • Let admins do their admin stuff without constraints and/or exposure to dangerous things.
  • Let developers do their developer stuff without constraints and/or exposure to dangerous things.

Fluid Workflow

In other words, they’d be able to create really cool workflows. For example:

  • An admin should be able to easily create a Docker ready VM running in a hypervisor, with the exact amount of resources needed at a given point in time (he knows the total amount of resources, e.g a VM with 2 CPUs and 4GB of RAM.
  • He should delegate (with the same simplicity) this Docker-ready VM to the dev team.
  • Developers can use it and play with their new toy, without any chance of breaking stuff other than the VM itself. The VM is actually a sandbox, not a jail; developers can create their containers as they need in this scenario.

Now you can easily imagine other exciting things such as:

  • An admin can delegate rollback snapshot control to a developer. If he breaks the VM, he can rollback to the “clean” snapshot — without bothering the admin staff. Live, die, repeat!
  • Need to clone the same container for other tests? One click in a web interface.
  • Need to extend the resources of this current VM? One click, in live.
  • Ideally, let a developer create its container from the same web interface.

Xen Orchestra: A Bridge Between Docker and Xen Project Hypervisor 

So how do we do all this without creating a brand new tool? As you may guess, the answer is Xen Orchestra, which today achieves much of this. Updates planned for later this year and 2015 will deliver even more efficiencies between the two technologies.

What XO Does Today

  • Adjust Resources In Live: You can reduce/raise number of CPUs, RAM, etc., while the VM is running! Doing this, you can grow or reduce the footprint of your Docker VM, without interrupting the service. Check it out in this short video.
  • Snapshots and Rollback: Snapshots and rollback in XO are totally operational since XO 3.3. Check out how this works in this feature presentation. Coupled with Docker, this is very helpful. When your fresh Dockerized VM is ready, take a snapshot. Then you can rollback when you want to retrieve this clean state. All with just a few clicks and in a few seconds.

Coming Soon

  • Docker-Ready Templates in One Click: This feature will be released this year. In a few words, you can request our template directly from your XO interface, it will be downloaded and operational in your own infrastructure with a Docker listening and ready for action,Iin the resources you choose to allocate (CPU, RAM, Disk). No installation: It works out of the box. Read more in this article.
  • ACL and Delegation: The perfect workflow rest upon integration of ACLs in Xen Orchestra is our current priority. In our case, it allows VM delegation for your team using Docker; the VM can be rollbacked or rebooted without asking you. More info. here.
  • Docker Control from XO: Because we can get the IP of a VM thanks to its Xen tools, we should be able to send command to the Docker API directly through XO. In this way, you’ll just have to use one interface for Docker AND Xen (at least, for simple Docker operations). And take the best of XO for both: ACLs, visualization etc. This last feature is not in our current roadmap, but will probably pop up early in 2015!


Caption: Coming soon — deeper integration between Docker and Xen.


Docker is a really promising and growing technology. With Docker and Xen on the same team, the two technologies work in tandem to create an extremely efficient, best-of-breed infrastructure. Finally uniting them in one interface is a big leap ahead!

Any questions or comments? Go ahead!

By Olivier Lambert, Creator of Xen Orchestra Project


Xen Orchestra: a Web interface for XCP

Maybe you heard few years ago, a project called Xen Orchesta. It was designed to provide a web interface for Xen hypervisor with Xend backend. The project started in 2009, but paused one year later, due to lack of time from the original designer. As you can read on the project website, XO is now re-developed from scratch. But its goal now is to provide an interface for XCP. Why XCP? Because, with XAPI, it offers a full set of features with unmatched possibilities for a Open Source product.

Despite this, XCP lacks of a free, simple and open source interface. That’s why the project reboot. Other interesting projects are now dead (like OpenXenManager, a clone of XenCenter). To avoid this kind of scenario, a clear intention for XO team is to provide a living project: “release often” policy, listening to the community, and deliver commercial support to getting resources needed for the project life. The original team behind XO have created their own company to sustain this durability to XO. Furthermore, XO license is AGPL.

Current state

XO was just rebooted in December. But we want a first version rapidly, at least for testing purpose (architecture validation, feedback, suggestions). That’s why this release is quite light: we focused on global design, picking right technologies for the future. Because we think it’s better to analyse and implement a strong basis rather than doing ugly stuff which can jeopardize the project later. So, we are proud to present you XO “Archlute” which is the first step in web management for XCP.

Continue reading

Announcing Project Zeus: XenAPI in Fedora, CentOS and the EPEL

The XCP team would like to announce Project Zeus, our port of the XCP toolstack to Fedora and CentOS (through the EPEL). This is a follow-on to Project Kronos, which brought the XCP toolstack to Debian-based systems. This will give users the ability to do ‘yum install xcp-xapi’ to build a system that is functionally equivalent to the normal XCP. Our target for this project is Fedora 17, which will be released in May.

We don’t have any code to share yet, but packaging is currently underway. We will be able to reuse most of the work that we did in Project Kronos to port xapi to Debian, so Zeus should take significantly less effort to accomplish. I’d like to thank Pasi Kärkkäinen, M A Young, David Nalley and Eric Christensen for volunteering to lead the packaging effort. Here are some useful links:

XCP 1.5 Beta now available

I’m happy to announce that XCP 1.5 Beta is available! This release comes with a number of new features, most notably the Xen 4.1 hypervisor. Please go to the downloads page to download and test the beta release. If you would like to report a possible bug, please email the xen-api mailing list with the subject “XCP 1.5 BETA BUG: <subject>” (and see this for a list of bug reporting guidelines for the Xen community).

  • Host Architectural Improvements. XCP 1.5 now runs on the Xen 4.1 hypervisor, provides GPT support and a smaller, more scalable Dom0.
  • GPU Pass-Through. Enables a physical GPU to be assigned to a VM providing high-end graphics.
  • Increased Performance and Scale. Supported limits have been increased to 1 TB memory for XCP hosts, and up to 16 virtual processors and 128 GB virtual memory for VMs. Improved XCP Tools with smaller footprint.
  • Networking Improvements. Open vSwitch is now the default networking stack in XCP 1.5 and now provides formal support for Active-Backup NIC bonding.
  • SR-IOV Improvements. Improved scalability and certification with the SR-IOV Test Kit. Experimental SR-IOV with XenMotion support with Solarflare SR-IOV adapters.
  • Integrated Site Recovery (Disaster Recovery). Remote data replication between storage arrays with fast recovery and failback capabilities. Integrated Site Recovery works with any iSCSI or Hardware HBA storage repository.
  • Virtual Appliance Support (vApp). Ability to create multi-VM and boot sequenced virtual appliances (vApps) that integrate with Integrated Site Recovery and High Availability. vApps can be easily imported and exported using the Open Virtualization Format (OVF) standard.
  • VM Import & Export Improvements. Full support for VM disk and OVF appliance imports directly from XenCenter with the ability to change VM parameters (virtual processor, virtual memory, virtual interfaces, and target storage repository) with the Import wizard. Full OVF import support for XCP, XenConvert and VMware.
  • Enhanced Guest OS Support. Support for Ubuntu 10.04 (32/64-bit). Updated support for Debian Squeeze 6.0 64-bit, Oracle Enterprise Linux 6.0 (32/64-bit) and SLES 10 SP4 (32/64-bit). Experimental VM templates for CentOS 6.0 (32/64-bit), Ubuntu 10.10 (32/64-bit) and Solaris 10.

Note that XCP 1.5 is the open source edition of Citrix XenServer 6.0.

Xen.org 2011 Year in Review

It truly was an amazing year for Xen.org! The key highlights included Dom0 supporting going into mainline Linux kernel, Project Kronos, and renewed focus  Xen for ARM. All three of these projects are examples of standing on the shoulders of giants.

In 2011, Xen.org welcomed Lars Kurth as our community manager. Lars’ impact can be seen most notably in a formalized governance model, a new Xen wiki, and numerous events that Xen.org held and attended (described below).


Xen.org Events

Xen.org at External Community Events

Ian Pratt gave his thoughts on Xen past, present and future at Xen Summit Asia 2011. His slides and a video are available: (slides: http://www.slideshare.net/xen_com_mgr/xenorg-the-past-the-present-and-exciting-future video: http://vimeo.com/33056576)

Xen @ Build a Cloud Day Boston

As I mentioned in the Xen Day post, Xen.org was offered a slot at the Build an Open Source Cloud Day Boston. The Build a Cloud attendees were great. They were very engaged and asked lots of questions. The questions gave me a chance to cover several Xen topics that I tend to take for granted. In this post I’ll outline the talk that I gave and highlight some of the questions that were asked and discuss the answers.

The slides for the talk are available here: http://www.slideshare.net/deshantm/why-choose-xen-for-your-cloud

I decided to name the talk “Why Choose Xen For Your Cloud?” so that I could cover the history of Xen in the cloud, specific architectural advantages of Xen, and then cover XCP and Project Kronos. I don’t think that a lot of people realize that “Global Public Computing”  (or Cloud Computing as we know it today) was an idea that led to Xen. In other words, the Xen hypervisor was the solution to the need to break up, isolate, and provide accounting for system resources. Xen was born in the cloud. It’s no surprise then that Amazon EC2, Slicehost (now Rackspace Cloud Servers), and many others have chosen Xen as the basis of their clouds.

As I mentioned about Xen Dom0 support getting into the mainline Linux kernel, I got my first question (something like) “Isn’t Xen support in the Linux kernel going away due to KVM?”. To which I answered no, but let me clarify.  The question makes more sense for someone who is both a Linux expert and virtualization novice since the Linux kernel community is very strict about what it allows into the kernel. For instance, multiple implementations of the same functionality will not be accepted, but an abstracted version that can support more than one specific implementation is often required (OpenVZ is not in mainline, but Linux container components, often inspired by OpenVZ concepts, are included) . The main reason that Xen Dom0 support and KVM are both in the Linux kernel is that Xen and KVM have different architectures. Xen is a type-!, stand-alone hypervisor and KVM is a type-2, integrated hypervisor (I dig into these concepts again soon). Next to further clarify, Xen the hypervisor will never be included in Linux nor is it intended to be. When Xen was first created the Linux kernel at the time was used as a basis, but in a very special way (as explained by Keir Fraser) – the kernel was cut horizontally and the low level bits became the Xen hypervisor and the top part became the first Dom0. The Xen hypervisor is first to the hardware, followed by guest domains (including Dom0), by intentional design and is a fundamental requirement for being a type-1 hypervisor.

Next, as I covered the basic architectural design of a Xen system and its security benefits I was asked to clarify the difference between a type-1 and type-2 hypervisor. I find that the best way to explain this in a practical way that others can quickly understand is by using VMware ESX (the bare-metal, type-1 hypervisor from VMware) and VMware Workstation (the workstation class, install on top of an existing OS, type-2 hypervisor from VMware) since VMware is very well known and people can understand the difference. This question and answer are a perfect lead-in for the architectural and security advantages of Xen. In short, Xen has a small, well-defined, clean, and disaggregatable trusted computing base. This is in contrast to type-2 solutions, but also in contrast to type-1 hypervisors that put more services (perhaps than necessary or desired) into the hypervisor itself. Xen has unique security advantages primarily due to its well-architected design.

Since we were given an hour and fifteen minute slot, the XCP slides are fleshed out a bit more than I have presented in the past. Fortunately, our Xen Day team had prepared some really great materials and I was able to easily leverage those materials and re-focus them for the Build A Cloud/USENIX LISA audience. In particular, it is important to note the XAPI class diagram and cover the basic structure in some detail. The idea being that it helps system admins become familiar with the terminology they will need to master the xe command, but also that these devops-minded admins will likely be interested in writing scripts/tools that make direct XAPI calls. XAPI is great API for the cloud.

The rest of the XCP discussion is centered around why XCP is a great cloud platform. One of the key concepts that XCP, Open vSwitch, and the management tools address is mult-tenancy (multiple independent entities that need to share the same cloud and yet be isolated). XCP really shines for this cloud-minded audience and at least a few people were convinced to skip out on some of the Build a Cloud Day sessions and attend some of the Xen Day afternoon sessions to find out more about XCP. Xen Day took a deep dive into XCP.

XCP and cloud orchestration is an incredible story especially considering that XCP 1.0 was released in 2011. XCP is used in the first commercially available OpenStack cloud from Internap. CloudStack, which is a mature and feature-rich product itself, has also added support for XCP. OpenNebula also recently added support for XCP.  XCP is a great de-facto open source platform to build a cloud on.

I’ve spent a lot of time (and presented in more detail) presentations on Project Kronos, which in a very short time has been developed and is nearing a initial release. Stay tuned to the blog for updates on Project Kronos status. Current documentation on installing and using Project Kronos is available on the Xen wiki: