160 likes | 303 Views
An Introduction to Xen: A virtual machine monitor for x86 compatibles. Matthew Grove Hants Lug Tech Talk 6 th August 2005. Outline. An overview of x86 virtualisation , What does Xen try to solve? Other solutions: UML, Vmware Xen Architecture , Live migration ,
E N D
An Introduction to Xen:A virtual machine monitor for x86 compatibles Matthew Grove Hants Lug Tech Talk6th August 2005
Outline • An overview of x86 virtualisation, • What does Xen try to solve? • Other solutions: UML, Vmware • Xen Architecture, • Live migration, • What do you need to run Xen, • Summary, problems and the future.
What Is Xen? • Xen aims to be able to execute multiple operating systems on one physical x86 machine: • Support popular OS (Linux, Windows XP, NetBSD), • Scalable up to around 100 VMs, • Securely, • With close-to-native performance. • Xen is a virtual machine monitor (VMM).
Why Use Virtual Machines? • Support heterogeneous applications using one physical machine (I.E. Win32 and Linux apps), • Consolidate workloads, • Allows the execution environment to be tailored to the application, • Run legacy applications, • Secure sandboxes for untrusted applications, • By managing resources you can get QoS, • Make system mobility easier to implement.
x86 Virtualisation • The x86 was not designed with virtualisation in mind. • You must either trap and modify some calls (overhead), • Or modify the guest OS (faster). • Two techniques for accessing resources: • Full virtualisation (looks like a normal x86), • Or what Xen call para-virtualisation (present real and virtual resources to the OS).
Other Virtualisation Solutions • User Mode Linux (UML): • GPL, • A port of Linux to run as a Linux process, • Modified Linux guest OS, • Used to provide low cost Linux hosting (Bytemark). • VMware: • Commercial offering, • Full virtualisation (supports most x86 OSs as guests), • Workstation uses kernel modules to hook into the host OS, • ESX server uses a Vmware kernel for greater performance,
Xen Jargon • Domains == Virtual machines • The hypervisor == The Xen VMM
Xen Architecture [1] Xen and the Art of Virtualization (Xen 1.x.) Published at SOSP 2003
Xen Architecture (Cont.) • Domain0 can use the admin interface to command the hypervisor, • Domain0 uses a privileged kernel (Dom0 kernel) capable of accessing the hardware of the machine, • Other guests use a DomU kernel which is typically more restricted.
Suported Operating Systems • Now: Linux 2.4 + 2.6, NetBSD, Windows XP • Coming soon: Plan 9, FreeBSD [1] Number of changes required to port to Xen 1.x.
Live Migration • Xen supports live migration over LAN, • Uses ‘pre-copy’ method: • Iteratively copy memory, • Pause the VM, • Copy rest of the memory, • Start VM in on new machine. • ARP is used to signal the network that the IP has moved. • Disk is provided by NAS.
Requirements For Running Xen • A working Linux distribution using the GRUB bootloader and running on a P6-class (or newer) CPU, • iproute2, bridge-utils, gcc, binutils, make, libcurl-devel, zlib-dev, python-dev, • Don’t need to reinstall to try it: • Build Xen in your existing Linux install (which will become Domain0), • Use a file backed filesytem for guests. • You can try it using a bootable live CD.
Current Status (Xen 2.0) • Secure isolation between VMs, • Resource control and QoS, • Only guest kernel needs to be ported, • All user-level apps and libraries run unmodified • Linux 2.4/2.6, NetBSD, FreeBSD, Plan9, • Execution performance is close to native, • Supports the same hardware as Linux x86, • Live Relocation of VMs between Xen nodes. [2] Overview of Xen 3.0. Describes the progression from Xen 2.0 to 3.0.
Problems • The admin interface does not support much in the way of monitoring. • You must manually balloon memory, • Guests are not SMP aware (although the hypervisor is), • Xen doesn’t work with >4GB of RAM yet, • 32bit only.
Future (Xen 3.0) • AGP/DRM graphics support, • Improved ACPI platform support, • Support for SMP guests, • x86_64 support, • Intel VT-x support for unmodified guests, • Enhanced control and management tools, • IA64 and Power support. [2] Overview of Xen 3.0. Describes the progression from Xen 2.0 to 3.0.
Links • [1,2]Xen project home page: • http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ • Mailing list: • http://lists.xensource.com/xen-users • UML: • http://user-mode-linux.sourceforge.net/ • VMware: • http://www.vmware.com/ • Bytemark (UML) Hosting: • http://www.bytemark.co.uk/