WHAT IS XEN?
Xenis aHypervisorproviding services that allow multiple computeroperating
systemstoexecuteonthesamecomputerhardwareconcurrently.
The Xen Hypervisor, is an open source virtualization platform that powers the
world'slargest clouds in productionand is the foundation of manycommercial
products.XenpowerspubliccloudssuchasAmazon Web Services,Rackspace Public
Cloudandmanyothers.
Examples of Xen based server products includeHuawei UVP,Oracle
VMandXenServer.
Examples
of
client
products
and
appliances
includeQubesOS,XenClientandNetscaler.
Xenis9yearsold,matureanditsstabilityandversatilityissecondtonone.
Xen Variants
The Xen community has created a number of open source solutions for specific
purposes:
TheXen Hypervisoristheopensourcestandardforhardwarevirtualizationandthe
foundationforallsolutionshostedonXen.org.
TheXen Cloud Platformisanenterprise-readyvirtualization platform basedonthe
XenHypervisor,addingfurtherfunctionalityandmanyintegrationsforcloud,storage
andnetworkingsolutions.
Xen ARMis a Xen based Hypervisor that targets embedded and mobile devices on
theARMarchitecture.
Xen virtualization technologyavailable for the Linux kernelis designed to consolidate
multiple operating systems to run on a single server, normalize hardware accessed by the
operating systems, isolate misbehaving applications, and migrate running OS instances from
one physical server to another.
Para-virtualization presents each VM with an abstraction of the hardware that is similar
but not identical to the underlying physical hardware. Para-virtualization techniques require
modifications to the guest operating systems that are running on the VMs. As a result, the
guest operating systems are aware that they are executing on a VMallowing for near-native
performance.
Para-virtualization methods are still being developed and thus have limitations,
including several insecurities such as the guest OS cache data, unauthenticated connections,
and so forth.
Xen supports a form of virtualization known aspara-virtualization, in which guests run
a modified operating system. Through para-virtualization, Xen can achieve high performance
even on its host architecture (x86) which has a reputation for non-cooperation with
traditional virtualization techniques.
Para-virtualization avoids the need to emulate a full set of hardware and firmware
services, which makes a PV system simpler to manage and reduces the attack surface
exposed to potentially malicious guests.
****Vmware ESX Server software are examples of full virtualization.
However, full virtualization may incur a performance penalty.
Features
consolidation leading to increased utilization.
dynamicfault toleranceagainst software failures (through rapid
bootstrapping or rebooting)
hardware fault tolerance (through migration of a virtual machine
to different hardware)
the ability to securely separate virtual operating systems
the ability to support legacy software as well as new OS
instances on the same computer
Xen's support for virtual machine live migration from one host to
another allowsworkload balancingand the avoidance of
downtime.
Amazon EC2,Liquid Web,Fujitsu Global Cloud Platform and
Rackspace Clouduse Xen as the VM hypervisor.
Basic Components
The basic components of a Xen-based virtualization environment are theXen hypervisor, theDomain0, any
number of otherVM Guests, and the tools, commands, and configuration files that let you manage
virtualization. Collectively, the physical computer running all these components is referred to as aVM Host
Serverbecause together these components form a platform for hosting virtual machines.
The Xen Hypervisor
The Xen hypervisor, sometimes referred to generically as a virtual machine monitor, is an open-source
software program that coordinates the low-level interaction between virtual machines and physical hardware.
The Domain0
The virtual machine host environment, also referred to asDomain0or controlling domain, is comprised of
several components, such as:
The SUSE Linux operating system, which gives the administrator a graphical and command line environment
to manage the virtual machine host components and its virtual machines.
The termDomain0refers to a special domain that provides the management environment. This may be run
either in graphical or in command line mode.
The xend daemon (xend), which stores configuration information about each virtual machine and controls
how virtual machines are created and managed.
Xen-Based Virtual Machines
A Xen-based virtual machine, also referred to as aVM GuestorDomUconsists of the following components:
1. At least one virtual disk that contains a bootable operating system. The virtual disk can be based on a file,
partition, volume, or other type of block device.
2. Virtual machine configuration information, which can be modified by exporting a text-based configuration
file
from xend or through Virtual Machine Manager.
3. A number of network devices, connected to the virtual network provided by the controlling domain.
4. Management Tools, Commands, and Configuration Files
5.There is a combination of GUI tools, commands, and configuration files to help you manage and customize
your
virtualization environment.
Xen Virtualization Architecture
The following graphic depicts a virtual machine host with four
virtual machines. The Xen hypervisor is shown as running directly
on the physical hardware platform. Note, that the controlling
domain is also just a virtual machine, although it has several
additional management tasks compared to all other virtual
machines.
On the left, the virtual machine hosts Domain0 is shown running
the SUSE Linux operating system. The two virtual machines shown
in the middle are running paravirtualized operating systems. The
virtual machine on the right shows a fully virtual machine running
an unmodified operating system, such as Windows Server 2003 or
Windows XP.
Figure:XEN Virtualization Architecture
KVM
KVM - Kernel Based Virtual Machine.
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for
Linux on x86 hardware containing virtualization extensions (Intel VT or
AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the
core virtualization infrastructure and a processor specific module, kvmintel.ko or kvm-amd.ko.
KVM also requires a modified QEMU although work is underway to get the
required changes upstream.
Using KVM, one can run multiple virtual machines running unmodified
Linux or Windows images. Each virtual machine has private virtualized
hardware: a network card, disk, graphics adapter, etc.
The kernel component of KVM is included in mainline Linux, as of 2.6.20.
KVM is open source software.
KVM functions by utilizing the CPU virtualization technology extensions
on modern Intel and AMD processors, known as Intel-VT and AMD-V.
Using a kernel module loaded into memory, KVM utilizes the processor
and, via user-mode driver based on modified QEMU, it emulates a
hardware layer upon which virtual machines can be created and run. KVM
can also be executed without the CPU extensions, but then, it will run in a
pure emulation mode using QEMU, resulting in a significant performance
penalty.
KVM can be managed either via a graphical management tool, similar to
VMware products or VirtualBox, or via command line using several
methods.
The most popular GUI is calledVirtual Machine Manager(VMM),
developed by RedHat. The tool is also know by its generic package name
virt-manager. It comes with a number of supporting tools, including virtinstall, virt-clone, virt-image, and virt-viewer, which are used to provision,
clone, install, and view virtual machines, respectively.
VMM also supports Xen machines.
KVM - Pros and cons
It is primarily a command-line tool, not as intuitive or friendly as VMware and Virtualbox
products. KVM feels many years behind the competition, in terms of GUI management,
although it is just as powerful when it comes to delivering.
In fact, because it is designed to be used as a command-line tool, you enjoy better
productivity and more control in the long run. As such, KVM makes most sense in the
business environment.
Furthermore, if your CPU does not support virtualization, KVM will be a big waste of time for
you, as you will be running in an extremely slow and inefficient emulation mode.
KVM is for people with a keen interest in virtualization, most likely administrators and
professionals. While VMware or Virtualbox prefer that you use their GUI tools, KVM is oriented
at the raw efficiency of command-line scripting.
KVM is good for you if you are looking for a free modern virtualization solution with an
unlimited usage mode and without additional licensing fees or feature tiering, a powerful
command line interface.
QEMU
QEMU is a generic and open source machine emulator and virtualizer. QEMU(short for
"Quick EMUlator") is afree and open-sourcesoftware product that performshardware
virtualization.
When used as a machine emulator, QEMU can run OSes and programs made for one
machine on a different machine. By using dynamic translation, it achieves very good
performance.
When used as a virtualizer, QEMU achieves near native performances by executing the
guest code directly on the host CPU. QEMU supports virtualization when executing under
the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can
virtualize x86, server and embedded PowerPC.
QEMU is ahosted virtual machine monitor:
It emulatescentral processing unitsthrough dynamicbinary translationand provides a
set of device models, enabling it to run a variety of unmodified guestoperating systems.
It also provides an accelerated mode for supporting a mixture of binary translation (for
kernel code) and native execution (for user code), in the same fashionVMware
WorkstationandVirtualBoxdo.
QEMU can also be used purely for CPU emulation for user level processes, allowing
applications compiled for one architecture to be run on another.
QEMU has two operating modes:
User mode emulation
In this mode QEMU runs singleLinuxorMac OS Xprograms that
were compiled for a different CPU. Fast cross-compilation and
cross-debugging are the main targets for user-mode emulation.
Computer emulation
In this mode QEMU emulates a full computer system,
includingperipherals. It can be used to provide virtual hosting of
several virtual computers on a single computer.
QEMU
can
boot
many
guestoperating
includingLinux,Solaris,Microsoft Windows,and DOS.
systems,
Features
QEMU can save and restore the state of the virtual machine with all programs running. Guest operating
systems do not need to be patched to run inside QEMU.
QEMU supports the emulation of various architectures. The QEMU homepage provides a complete list of
supported architectures.
The virtual machine can interface with many types of physical host hardware. Some of these are: hard disks,
CD-ROM drives, network cards, audio interfaces, and USB devices. USB devices can be completely emulated
(mass storage from image files, input devices), or the host's USB devices can be used (however, this requires
administrator privileges and does not work with all devices).
Virtual hard disk images can be stored in a special format that only take up disk space that the guest OS
actually uses. This way, an emulated 120 GB disk can occupy only several hundred megabytes on the host.
For example, a base image could hold a fresh install of an operating system that is known to work, and the
overlay images are used. Should the guest system become unusable (virus attack, accidental system
destruction, ...), the overlay can be deleted and an earlier emulated disk image version recreated.
QEMU can emulate network cards (of different models) which share the host system's connectivity by doing
network address translation, effectively allowing the guest to use the same network as the host. The virtual
network cards can also be connected to network cards of other instances of QEMU.
QEMU integrates several services to allow the host and guest systems to communicate. It can also boot Linux
kernels without a bootloader.
QEMU does not depend on the presence of graphical output methods on the host system.
Simulating multiple CPUs that can be used like a realsystem is possible.
QEMU does not require administrative rights to run, except if additional kernel modules for improving speed
are used or when some modes of its network connectivity model are utilized.
Shortcomings
Incomplete support for less frequently-used architectures
As of 2011only supports the traditional BIOS boot model for the guest
Oses.
Few specialdevice drivers(graphics, sound, I/O) for guests are available,
thus there is quite a large overhead for multimedia applications. Recently a
virtual video device compatible with the VMWare video driver has been
added; however, it does not support any scaled video or 3D features.
QEMU only supportslimitedlibraries for video output.
It runs significantly slower than alternatives on PCs that lack hardware CPU
virtualization.
For full system emulation, QEMU cannot utilize multiple host CPUs but runs
all the virtual CPUs and hardware from a single thread.
VirtualBox
Oracle VM VirtualBox(formerlySun VirtualBox,Sun xVM VirtualBoxandinnotek
VirtualBox) is anx86 virtualization software package, bySun Microsystems, and now
developed byOracle Corporationas part of its family of virtualization products.
Oracle VM VirtualBox is installed on an existinghost operating systemas an application;
this host application allows additional guest operating systems, each known as aGuest
OS, to be loaded and run, each with its own virtual environment.
Supported host operating systems includeLinux,Mac OS X,Windows XP,Windows
Vista,Windows 7,Windows 8,Solaris, andOpenSolaris; Supported guest operating
systems include versions and derivations ofWindows,Linux,Solarisand others.
Since release 3.2.0, VirtualBox also allows limited virtualization ofMac OS Xguests on
Apple hardware, thoughOSX86 can also be installed using VirtualBox
Since version 4.1, Windows guests on supported hardware can take advantage of the
recently implementeddriver included in the guest additions.
Users of VirtualBox can load multiple guest OSs under a single host
operating-system (host OS).
Each guest can be started, paused and stopped independently
within its own virtual machine(VM).
The user can independently configure each VM and run it under a
choice
ofsoftware-based
virtualizationorhardware
assisted
virtualizationif the underlying host hardware supports this.
The host OS and guest OSs and applications can communicate
with each other through a number of mechanisms including a
common clipboard and a virtualized network facility (provided).
Guest VMs can also directly communicate with each other if
configured to do so.
Features
64-bit guests (hardware virtualization only)
Shared folders
Special drivers and utilities to facilitate switching between systems
Command line interaction (in addition to the GUI)
Public API (Java,Python) to control VM configuration and execution
NestedpagingforAMD-VandIntel VT
Raw hard disk access allows physical hard disk partitions on the host
system to appear in the guest system
VMwareVirtual Machine Disk (VMDK) format support allows VirtualBox to
exchange disk images with Vmware
3D virtualization (Limited support for OpenGL was added to v2.1, more
support was added to v2.2, OpenGL 2.0 and Direct3D support was added in
VirtualBox 3.0)
Teleportation (akaLive Migration), since version 3.1
Since version 3.2
Mac OS X Server guest support experimental
Memory ballooning
RAM deduplication (Page Fusion) for Windows guests on 64-bit hosts
CPU hot-plugging for Linux (hot-add and hot-remove) and certain Windows guests (hot-add only)
Deleting snapshots while the VM is running
Multi-monitor guest setups in the GUI, for Windows guests
Run and control guest applications from the host for automated software deployments
Since version 4.0
Intel HD audio emulation
Intel ICH9 chipset emulation
A new VM storage scheme where all VM data is stored in one single folder to improve VM portability
Several UI enhancements including a new look with VM preview and scale mode
On 32-bit hosts, VMs can each use more than 1.5GB of RAM
CPU use and I/O bandwidth can be limited per VM
Support for Apple DMG images (DVD)
Multi-monitor guest setups for Linux/Solaris guests (previously Windows only)
Resizing of VDI and VHD images