The Second Generation Virtualization with Xen


What is Virtualization?

The concept of virtualization has existed in one form or another in computing since the early 1960s. In virtualization, the characteristics of a resource are abstracted, so that it may be accessed in some way that is different from its actual physical form.

What are Virtual Machines?

System virtualization (often “server virtualization” or “desktop virtualization,” depending on the role of the virtualized system) is the ability to present the resources of a single computer as if it is a collection of separate computers (“virtual machines”), each with its own virtual CPUs, network interfaces, storage, and operating system.

Virtual machines appear both to the user within the system and the world outside as separate computers, each with its own network identity, user authorization and authentication capabilities, operating system version and configuration, applications, and data.

The hardware presented is consistent across all virtual machines: while the number or size of them may differ, abstract devices (either artificially optimal virtual devices or emulations of specific physical devices) are used that allow virtual machines to be portable, independent of the actual hardware type on the underlying systems.

The Second Generation: Virtualization-Ready Operating Systems

The first major change came along first from the open source community and then from commercial operating system vendors. What if operating systems could be modified so that, instead of executing virtualization-unsafe instructions, they were hardwired to understand when they were running in a virtual environment and could directly call the virtualization-safe code sequence that older systems needed to trap and emulate?

This approach, often called “paravirtualization” or “operating system enlightenment,” was used by the researchers at the University of Cambridge who developed Xen. They modified the operating systems available to them in source form (initially, the Linux and BSD kernels) to call their Xen virtualization engine directly, saving trap and translation overhead.

As this approach was proven successful and efficient, it was picked up by commercial operating system providers, including Linux distribution vendors and, in a post-release update to the upcoming Windows Server 2008, by Microsoft. This allows out-of-the-box operating systems to use virtualization more simply and effectively.

The Second Generation: Virtualization-Ready Processors

The second major area of advancement came from Intel and AMD, the major x86 processor makers. They began the process of implementing extensions to the x86 architecture to make it more friendly to virtualization. The concept of the first portion of their extensions (known as “Intel Virtualization Technology” or “Intel VT” and “AMD Virtualization” or “AMD-V” respectively) is to let the virtualization engine tell the CPU when it is running in a virtualized context. The virtualization engine also presents the CPU with a list of its routines that can be called to support virtualization-unsafe operations.

When a virtualization-unsafe instruction is executed, what the CPU does is dependent on whether or not it is running in virtualization mode. If it is running without virtualization, the instruction is executed normally. If virtualization is enabled, instead of executing the instruction, the CPU instead calls the routine it has been told is safe to execute.

Unlike the first-generation solution, the complexity of determining when and how to translate unsafe instructions is handed off to hardware, not software. This leaves the software code paths lean and easily maintainable, while taking advantage of increases in hardware efficiency.

Second-Generation Benefits

In both cases – virtualization-ready operating systems and processors – the success of virtualization has driven vendors to build technology that is optimized for virtualization. The Xen virtualization engine, or “hypervisor,” is designed to make efficient use of these advances to run efficiently and to be easy to maintain and enhance. As further enhancements, such as virtualized I/O optimization, come along in later versions of virtualization assist technologies, Xen will take advantage of their capabilities.

Advertisements

About Amol

I'm blogger, avid read, photographer and book lover. Reading a lot of good stuff and sharing it with the world are my passions.
This entry was posted in Linux, virtualization and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s