Xen
590852
225691110
2008-07-14T22:39:12Z
209.131.48.66
/* MS Windows systems as guests */
{{otheruses}}
{{Infobox Software
| name = Xen
| logo =
| screenshot = [[Image:Xen screenshot.png|250px]]
| caption = Xen running [[NetBSD]] and three [[Linux]] distributions
| developer = The Xen Project, XenSource, Inc.
| latest_release_version = 3.2.1
| latest_release_date = {{release date|2008|04|25}}
| operating_system = [[Linux]], and other [[Unix]]-like, [[*BSD]], [[OpenSolaris]] as both hosts and guests; [[Microsoft Windows]] as the guest OS.
| genre = [[Virtual machine monitor]]
| license = [[GNU General Public License version 2|GPL]]
| website = http://www.xen.org
}}
'''Xen''' is a [[free software]] [[Hypervisor|virtual machine monitor]] for [[IA-32]], [[x86]], [[x86-64]], [[IA-64]] and [[PowerPC 970]] architectures. It allows several guest [[operating system]]s to be executed on the same [[computer hardware]] at the same time.
A Xen system is structured with the Xen [[hypervisor]] as the lowest and most privileged layer.<ref>[http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/user/user.html Xen 3.0 User Manual]</ref> Above this layer are one or more guest operating systems, which the hypervisor schedules across the physical CPUs. The first guest operating system, called in Xen terminology "domain 0" (dom0), is booted automatically when the hypervisor boots and given special management privileges and direct access to the physical hardware. The system administrator logs into dom0 in order to start any further guest operating systems, called "domain U" (domU) in Xen terminology.
Modified versions of [[Linux]], [[NetBSD]] and [[Solaris (operating system)|Solaris]] can be used as the dom0. Several modified [[Unix-like]] operating systems may be employed as guest operating systems (domU); on certain hardware, as of Xen version 3.0, unmodified versions of [[Microsoft Windows]] and other proprietary operating systems can also be used as guests if the CPU supports [[X86 virtualization|Intel VT or AMD V]] technologies.<ref>[http://wiki.xensource.com/xenwiki/OSCompatibility Xen OS Compatibility]</ref>
Xen originated as a research project at the [[University of Cambridge]], led by [[Ian Pratt]], [[lecturer|senior lecturer]] at Cambridge and founder of '''XenSource, Inc'''. This company now supports the development of the [[Open-source software|open source]] project and also sells enterprise versions of the software. The first public release of Xen was made available in 2003. '''XenSource, Inc''' was acquired by [[Citrix Systems]] in October 2007. XenSource's products have subsequently been renamed under the Citrix brand: XenExpress was renamed "XenServer Express Edition" and "XenServer OEM Edition" (embedded hypervisor); XenServer was renamed "XenServer Standard Edition"; XenEnterprise was renamed "XenServer Enterprise Edition".
On [[2007-10-22]], [[Citrix Systems]] completed its acquisition of XenSource,<ref>{{cite web |title=Citrix Systems » Citrix Completes Acquisition of XenSource |publisher=Citrix Systems |date=[[2007-07-12]] |url=http://www.citrix.com/English/NE/news/news.asp?newsID=683171}}</ref> and the Xen project moved to http://www.xen.org. This move had been under way for some time, and afforded the project an opportunity to make public the existence of the Xen Project Advisory Board (Xen AB), which currently has members from [[Citrix]], [[IBM]], [[Intel]], [[Hewlett-Packard]], [[Novell]], [[Red Hat]] and [[Sun Microsystems]]. The Xen AB is chartered with oversight of the project's code management procedures, and with development of a new trademark policy for the Xen mark, which Citrix intends to freely license to all vendors and projects that implement the Xen [[hypervisor]]; the requirements for licensing will be solely the responsibility of the Xen AB.
== Uses ==
Virtual machine monitors (also known as [[hypervisor]]s) are often used by [[IBM]], [[Hewlett-Packard|HP]], and others on [[Mainframe computer|mainframes]] and large servers. They are also increasingly being used by [[Internet hosting service]] companies to provide [[virtual dedicated server]]s. The primary benefits of server virtualization are consolidation, increased utilization, an ability to rapidly provision and start a virtual machine, and increased ability to dynamically respond to faults by re-booting a virtual machine or moving a virtual machine to different hardware. Another benefit is the ability to securely separate virtual operating systems, and 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 allows workload balancing and the avoidance of downtime.
Xen may also be used on personal computers that run Linux but also have Windows installed. Traditionally, such systems are used in a [[dual boot]] setup, but with Xen it is possible to start Windows "in a window" from within Linux, effectively running applications from both systems at the same time.
Virtualization also has benefits when working on operating system development: running the new system as a guest avoids the need to reboot the computer whenever a bug is encountered. Such a [[Sandbox (computer security)|sandboxed]] guest system is also useful in computer security research, in order to study the effects of some [[computer virus|virus]] or [[computer worm|worm]] without the possibility of compromising the host system. Finally, hardware appliance vendors may decide to ship their appliance running several guest systems, so as to be able to execute various pieces of software that require different operating systems.
Xen can be delivered to market as a virtualization platform, such as Citrix XenServer Enterprise Edition (formerly XenSource's XenEnterprise), or embedded within the host operating system. An example of the latter configuration is the inclusion of Xen in [[Novell]]'s [[SUSE Linux| SUSE Linux Enterprise 10]] distribution, [[Red Hat]]'s RHEL 5/Fedora 7, [[Sun Microsystems]]' Solaris, or [[Debian]]'s Etch release. XenSource recently announced that Dell will incorporate Citrix XenServer OEM Edition as an embedded hypervisor installed in flash memory as an option on all Power Edge Servers, early in 2008.
XenSource is also developing a compatibility layer for [[Windows Server 2008]] hypervisor, so that systems that have been modified to run as Xen guests will be able to function on the 2008 hypervisor.<ref>[http://www.microsoft.com/presspass/press/2006/jul06/07-17MSXenSourcePR.mspx Microsoft Press Release], 16 July 2006</ref>
== Technology ==
=== Paravirtualization, requiring porting of guest systems ===
On most CPUs, Xen uses a form of [[virtualization]] known as [[paravirtualization]], meaning that the guest operating system must be modified to use a special [[hypercall]] [[Application Binary Interface|ABI]] instead of certain architectural features. Through paravirtualization, Xen can achieve high performance even on its host architecture (x86) which is notoriously uncooperative with traditional virtualization techniques.<ref> Robin and Irvine, [http://www.usenix.org/events/sec2000/robin.html "Analysis of the Intel Pentium's Ability to Support a Secure Virtual Machine Monitor"], 9th Usenix Security Symposium, 2000</ref>
On x86, the Xen host kernel code runs in [[ring (computer security)|Ring 0]], while the hosted domains run in [[ring (computer security)|Ring 1]]
or [[ring (computer security)|Ring 3]].
=== Hardware assisted virtualization, allowing for unmodified guests ===
[[Intel]] has contributed modifications to Xen to support their [[Intel Virtualization Technology|VT-x (formerly Vanderpool)]] architecture extensions.<ref>[http://www.intel.com/technology/itj/2006/v10i3/3-xen/1-abstract.htm Extending Xen with Intel Virtualization Technology], ''intel.com''</ref> Similarly [[AMD]] has contributed support for their [[AMD-V]] extensions. These technologies, while differing quite substantially in their implementation and instruction sets, are managed by a common abstraction layer in Xen and enable unmodified guest operating systems to run within Xen virtual machines, starting with Xen 3.0.
This has been a significant development because it allows proprietary operating systems (such as Microsoft Windows) to be virtualized since the guest system's kernel does not require modification when the host runs on VT-x or AMD-V hardware.
Hardware assisted virtualization offers new instructions to support direct calls by a paravirtualized guest/driver into the hypervisor, typically used for I/O or other so-called hypercalls. It also provides additional execution modes: "root mode" and "non-root mode". Both of these modes have Rings 0-3; the Xen host operates in root mode and has access to the real hardware, while the unmodified guest operates in Rings 0-3 of non-root mode and its "hardware" accesses are under complete control of the hypervisor.
Xen-HVM has device emulation based on the [[QEMU]] project to provide I/O virtualization to the VMs. Hardware is emulated via a patched QEMU "device manager" (qemu-dm) daemon running as a backend in dom0. This means that the virtualized machines see as hardware: a PIIX3 IDE (with some rudimentary PIIX4 capabilities), Cirrus Logic or vanilla VGA emulated video, RTL8139 or NE2000 network emulation, PAE, and somewhat limited ACPI and APIC support and no SCSI emulation.<ref>[http://ian.blenke.com/xen/hvm/svm/vtx/qemu Demystifying Xen HVM]</ref>
As of Xen 3.0.2, the list of supported unmodified guests is limited to certain versions of Windows (incl. XP) and Linux.
=== Virtual machine migration ===
Xen virtual machines can be "live migrated" between physical hosts across a LAN without loss of availability. During this procedure, the memory of the virtual machine is iteratively copied to the destination without stopping its execution. Stoppage of around 60–300 ms is required to perform final synchronization before the virtual machine begins executing at its final destination, providing an illusion of seamless migration. Similar technology is used to suspend running virtual machines to disk and switch to another virtual machine, and resume the first virtual machine at a later date.
=== Supported operating systems and hardware ===
An operating system that runs Xen as host is also known as domain number 0 (''dom0''), while a system that runs as a Xen guest is known as the unprivileged domain (''domU'').
==== Unix-like systems as hosts ====
Xen boots from a [[bootloader]] like [[GNU GRUB]], and then generally loads a modified host OS into dom0.
Most Linux distributions now include Xen packages to interact with the Xen hypervisor and start additional domains.
Xen under Linux currently runs on [[x86]], with [[Pentium II]] or newer processors, [[x86-64]] based systems, as well as on [[IA-64]] and [[PowerPC]].
Xen supports up to 64-way [[symmetric multiprocessing]] machines.
XenSource offers a [http://www.xensource.com/download/xenexpthanks.html?whence= live ISO CD] running [[Debian|Debian GNU/Linux]] as well as other free [[Linux distribution]]s, enabling users to try Xen on their system without installing it to the hard disk.
The first commercial implementation of Xen in this form was Novell's [[SUSE Linux Enterprise Server]] 10 release. [[Red Hat Enterprise Linux]] 5 also offers support for Xen.
[[Fedora (Linux distribution)|Fedora]] has included Xen packages since its FC4 release. A [http://www.fedoraproject.org/wiki/FedoraXenQuickstartFC6 quick-start document] is available.
[[openSUSE]] 10.3 includes Xen 3.1 support. Graphical VM management is offered by [[YaST]] and virt-man.[http://en.opensuse.org/Xen3_Status_and_Updates]
[[Ubuntu Linux|Ubuntu]] includes Xen packages since Ubuntu 6.10. The latest release, [[Hardy Heron]], includes Xen version 3.2 and 3.1. Instructions can be found at https://help.ubuntu.com/community/Xen
[[Debian]] includes Xen 3.0.3 packages in its 4.0 release (codenamed [[Etch]]). Packages for Debian 3.1 ([[Sarge]]) can be found on http://www.backports.org/
Host support for Xen 2 is included in NetBSD 3.x. Host support for Xen 3.0 is available since NetBSD 4.0 [http://www.netbsd.org/Ports/xen/].
Support for [[OpenBSD]] self-hosting is near complete, requiring the correction of a lock-up bug before its release.[http://marc.info/?l=openbsd-misc&m=116955702618902]
A [[Gentoo Linux|Gentoo]] package exists for Xen in [[Portage (software)|Portage]]. [http://packages.gentoo.org/packages/?category=app-emulation;name=xen] [http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo Set-up instructions] also exist on [http://gentoo-wiki.com/ gentoo-wiki.com].
[[Arch Linux|ArchLinux]] package exists for Xen in the community repository
[http://aur.archlinux.org/packages.php?do_Details=1&ID=9377&O=0&L=0&C=0&K=xen&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd]
[[OpenSolaris]] based distributions can be used as dom0 and domU, from Nevada build 75 onwards.
==== Unix-like systems as guests ====
Guest systems can run fully virtualized (requires special hardware) or paravirtualized (requires guest OS code modification). The following systems have been patched so that they can operate as a paravirtualized Xen guest:
* [[Linux]], paravirtualization integrated in 2.6.23, patches for other versions exist
* [[Minix]]
* [[Plan 9 from Bell Labs]]
* [[NetBSD]] (NetBSD 2.0 has support for Xen 1.2, NetBSD 3.0 has support for Xen 2.0, and NetBSD 3.1 supports Xen 3.0)
* [[OpenBSD]], announced [http://anil.recoil.org/blog/articles/2006/08/21/openbsd-xen-boots-multi-user here]
* [[FreeBSD]] (Limited) [http://www.hm2k.com/posts/xen-on-centos-host-running-freebsd-guest]
* [[OpenSolaris]] (See [http://opensolaris.org/os/community/xen/ The Xen Community On OpenSolaris])
* [[NetWare]] (at [http://www.novell.com/brainshare/ Brainshare 2005], [[Novell]] showed a port that is able to run as a Xen guest)
* [[Hurd|GNU/Hurd/Mach]] (gnumach-1-branch-Xen-branch)
* [[OZONE]] (has support for Xen v1.2)
==== MS Windows systems as guests ====
It is currently possible to run [[Microsoft Windows]] as a guest operating system unmodified, using hardware virtualization provided by Intel's [[Vanderpool]] technology (now Intel VT or IVT) or AMD's [[Pacifica (virtual machine)|Pacifica]] (now AMD-V). This is supported beginning with Xen 3.0.
Anecdote:
During the development of Xen 1.x, [[Microsoft Research]], along with the University of Cambridge Operating System group, developed a port of [[Windows XP]] to Xen. This was possible due to Microsoft's Academic Licensing Program. The terms of this license do not allow this port to be published, although the experience is documented in the original Xen SOSP paper.<ref>[http://www.cl.cam.ac.uk/netos/papers/2003-xensosp.pdf Xen and the Art of Virtualization], ''University of Cambridge SOSP'03 paper''</ref>
== Xen Management Consoles ==
A number of third-party tools (known as Xen Management Consoles) have been developed to facilitate the common tasks of administering a Xen host, such as configuring, starting, monitoring and stopping of Xen guests. Examples include the [[Python (programming language)|Python]]-based [[Enomalism]] dashboard ([[LGPL]]), [http://www.xen-tools.org/software/xen-tools/ Xen Tools], Google's [http://code.google.com/p/ganeti/ Ganeti], the [[Perl]]-based [http://mln.sourceforge.net/ MLN], the web-based [[HyperVM]] and [[FluidVM]], and the [[GUI]] applications [http://xenman.sourceforge.net/ ConVirt] (formerly [[XenMan]]) and [[Red Hat]]'s Virtual Machine Manager, [http://virt-manager.et.redhat.com/ virt-manager].
== Commercial implementations ==
* [[Citrix XenServer]]
* [[Oracle VM]]
* [[Sun xVM]]
== See also ==
{{portal|Free software|Free Software Portal Logo.svg}}
* [[Kernel-based Virtual Machine]]
* [[Comparison of virtual machines]]
* [[x86 virtualization]] for information on Intel VT and AMD-V
* [[Hyper-V]]
== References ==
{{reflist}}
== External links ==
* [http://www.xen.org The Official Xen.org Project Site]
* [http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ University of Cambridge research page for Xen]
* [http://www.citrix.com/ Citrix]
* [http://www.cl.cam.ac.uk/TechReports/UCAM-CL-TR-553.pdf University of Cambridge, Technical Report Number 553, January 2003]. Early report outlining the architecture of Xen.
{{FLOSS}}
[[Category:Free virtualization software]]
[[ca:Xen]]
[[da:Xen]]
[[de:Xen]]
[[es:Xen]]
[[fr:Xen]]
[[ko:젠]]
[[it:Xen]]
[[he:Xen]]
[[nl:Xen]]
[[ja:Xen (仮想化ソフトウェア)]]
[[pl:Xen]]
[[pt:Xen]]
[[ru:Xen]]
[[fi:Xen]]
[[sv:Xen (virtualisering)]]
[[zh:Xen]]