Xen and the Art of Virtualization

Slides:



Advertisements
Similar presentations
Virtualization Dr. Michael L. Collard
Advertisements

Status Report Ian Pratt University of Cambridge and Founder of XenSource Inc. Computer Laboratory.
Xen and the Art of Virtualization Ian Pratt University of Cambridge and Founder of XenSource Inc. Computer Laboratory.
Virtualisation From the Bottom Up From storage to application.
XEN AND THE ART OF VIRTUALIZATION Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, lan Pratt, Andrew Warfield.
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
NWCLUG 01/05/2010 Jared Moore Xen Open Source Virtualization.
Xen Virtualization Andrew Hamilton
Virtual Machines What Why How Powerpoint?. What is a Virtual Machine? A Piece of software that emulates hardware.  Might emulate the I/O devices  Might.
Network Implementation for Xen and KVM Class project for E : Network System Design and Implantation 12 Apr 2010 Kangkook Jee (kj2181)
Virtualization for Cloud Computing
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
LINUX Virtualization Running other code under LINUX.
Tanenbaum 8.3 See references
Operating System Virtualization
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
An Introduction to Xen Prof. Chih-Hung Wu
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
SAIGONTECH COPPERATIVE EDUCATION NETWORKING Spring 2010 Seminar #1 VIRTUALIZATION EVERYWHERE.
SAIGONTECH COPPERATIVE EDUCATION NETWORKING Spring 2009 Seminar #1 VIRTUALIZATION EVERYWHERE.
Module 7: Hyper-V. Module Overview List the new features of Hyper-V Configure Hyper-V virtual machines.
Xen Overview for Campus Grids Andrew Warfield University of Cambridge Computer Laboratory.
Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.
Virtualization Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is licensed.
Xen Virtualization Last Update Copyright 2011 Kenneth M. Chipps Ph.D.
CS533 Concepts of Operating Systems Jonathan Walpole.
Outline for Today Announcements –1 st programming assignment coming soon. Objective of the lecture –OS and Virtual Machines.
Cloud Operating System Unit 09 Cloud OS Core Technology M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,
Introduction to virtualization
Virtual techdays INDIA │ august 2010 virtual techdays INDIA │ august 2010 Consolidate and Virtualize your Linux Environment M.S.Anand │ Technology.
Full and Para Virtualization
Hands-On Virtual Computing
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Unit 2 VIRTUALISATION. Unit 2 - Syllabus Basics of Virtualization Types of Virtualization Implementation Levels of Virtualization Virtualization Structures.
FermiGrid Virtualization and Xen Steven Timm Feb 28, 2008 Fermilab Computing Techniques Seminar.
Intro To Virtualization Mohammed Morsi
Xen and the art of.. Open Source Virtualisation & Consolidation Kris Buytaert CTO, X-Tend
KVM: Virtualisation The Linux Way Amit Shah GEEP.
Open Source Virtualization Andrey Meganov RHCA, RHCX Consultant / VDEL
Virtualization Neependra Khare
Open Source Virtualisation and Consolidation. Whoami ● Senior Linux and Open Source Consultant/ X-Tend ● „Infrastructure Architect“ ● Linux since.
Welcome to the Virtual Machine Mark Cyzyk The Sheridan Libraries Johns Hopkins University.
Open Source Virtualisation and Consolidation. Whoami ● Linux and Open Source Consultant ● „Infrastructure Architect“ ● Linux since 0.98 ● IANAKH ● Senior.
XEN – The Art of Virtualisation. So what is Virtualisation? ● Makes use of spare capacity ● Run multiple instances of OSes simultaneously ● Multitasking.
Virtualization-optimized architectures
Virtualization for Cloud Computing
Introduction to Virtualization
Virtualization.
VMware ESX and ESXi Module 3.
Virtual Machine Monitors
Agenda Hardware Virtualization Concepts
L2- Virtualization Technology
Presented by Yoon-Soo Lee
CS 3214 Introduction to Computer Systems
Virtualization Dr. Michael L. Collard
Container-based Operating System Virtualization: A scalable, High-performance Alternative to Hypervisors Stephen Soltesz, Herbert Potzl, Marc E. Fiuczynski,
Virtualization overview
Virtual Servers.
XenFS Sharing data in a virtualised environment
Xen Summit Spring 2007 Platform Virtualization with XenEnterprise
Running other code under LINUX
Group 8 Virtualization of the Cloud
OS Virtualization.
Virtualization Techniques
Windows Virtual PC / Hyper-V
Full and Para Virtualization
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System Virtualization
Presentation transcript:

Xen and the Art of Virtualization MHVLUG Meeting Aug 6th 2006 Sean Dague sean * dague * net

Brief History of Virtualization First introduced virtualization for development environments 5 Years later, it became clear that this was useful for production environments S/390 / zSeries / System z Many iterations of hardware / software coevolution to make virtualization faster and more efficient Big Unix Virtualization coevolved with the hardware In all these cases a single vendor was coevolving hardware and software to make virtualization easy to use, and efficient.

Problems in x86 Land The Intel x86 architecture was never designed to be virtualizable http://www.usenix.org/publications/library/proceedings/sec20 00/full_papers/robin/robin_html/index.html x86 CPUs have 4 modes of operation, known as the 4 rings. Ring 0 is the most priviledged and ring 3 the least. There are 17 sensitive instructions in x86 that can be executed in ring 3. Results end up unexpected. This prevents running arbitrary guest OS in a less priveiledged ring

x86 Virtualization Flavors Containers: OpenVZ, Vservers Add OS hooks to enforce application namespaces All applications running under a single kernel instance Full virtualization: VMware, VirtualPC, QEMU Run multiple unmodified guest OSes Requires binary rewriting and emulation tricks (i386 is not virtualization friendly) Para-virtualization: Xen, Denali Create idealized architecture, port OS to that architecture Requires Source Code for Operating System

Xen Remember, there are 17 instructions that are sensitive You can either spend a lot of time emulating .... or just not do them “It hurts if I touch it.” “Then don't touch it!” Xen takes the para-virtualization approach Guest operating systems are modified to make explicit hypercalls to the hypervisor instead of using troublesome instructions Approach requires access to OS source code Linux 2.4, 2.6, NetBSD, FreeBSD, Plan9 all ported to Xen A Windows port has shown to be possible, though MS source license is required A Xen Running environment Xen runs in Ring 0 – where OS used to run Modified OS runs in Ring 1 or 2 – hasn't be used since OS/2 days Userspace remains in Ring 3 – userspace uneffected

Xen in Pictures SMP VT-x Xen Virtual Machine Monitor 32/64bit VM0 VM1 Device Manager & Control s/w Unmodified User Software Unmodified User Software Unmodified User Software GuestOS (XenLinux) GuestOS (XenLinux) GuestOS (XenLinux) Unmodified GuestOS (WinXP)) Back-End Back-End SMP Native Device Driver Native Device Driver Front-End Device Drivers Front-End Device Drivers VT-x Control IF Safe HW IF Event Channel Virtual CPU Virtual MMU Xen Virtual Machine Monitor 32/64bit Hardware (SMP, MMU, physical memory, Ethernet, SCSI/IDE)

Xen Terminology Domains – running guest Operating Systems There is no concept of an offline domain. Domain lifecycle is much more like process lifecycle in a UNIX environment Dom0 – The first domain, has administrative priveldges and controls Xen contains no device drivers A Dom0 must be started by Xen on boot Dom0 is a Linux 2.6 kernel (no other OS has been built for Dom0) As of Xen 3.0.2, only 1 Dom0 is allowed Can be thought of as “Host OS”, though not strictly true Root in Dom0 is more powerful than Root in general, as Dom0 can directly map memory of any DomU

Xen Terminology DomU – Additional domains. These do not have administrative privs. Can be thought of as “Guest OS” Where normal workloads would run in Xen Xend / Xm – Xen Management interface A python daemon and command line through which all xen management occurs Python daemon is needed because significant state is required to support DomU reboots, and Migration man xm for full details XenStore / Xenbus – A “registry” and fake device bus used in virtual device bringup

Xen Terminology Frontend / Backend Drivers – Para Virtual Device drivers All virtual device drivers have a front end in DomU Back end in Dom0 Communicate across event channels Current Devices: vbd – virtual block device vif – virtual interface vtpm – virtual tpm Live Migration – Migration of a DomU from 1 Dom0 to another, without DomU service interuption Highly cool Xen demo, uses shadow page tables to allow copying of domain state while running Final cutover is ~30 ms downtime

Using Xen

Xen Requirements CPU => PII or better Realistically > 2 Ghz if you have lots of images x86_64 supported Memory => > 1 GB recommended Need memory for Xen, Dom0, and DomUs Memory can not be overcommitted Devices => NIC & HD Often good to have 2 NICs, one for management of Dom0, one for DomU data traffic Linux Install for Dom0 Nearly any distro can be made to work

Getting Xen Yourself Xen is included in many distros already FC5, SUSE 10.1, SLES10, Gentoo Download from - http://getxen.org Binary builds, rpms, live cd Get the latest and greatest bits get mercurial (http://www.selenic.com/mercurial/) hg clone http://xenbits.xensource.com/xen-unstable.hg cd xen-unstable.hg make world make install

Xen grub.conf # Grub conf file # grub is required due to multiboot support for Xen title Xen 3.0 / XenLinux 2.6 kernel /boot/xen-3.0.gz dom0_mem=262144 module /boot/vmlinuz-2.6-xen root=/dev/sda4 ro console=tty0 module /boot/initrd-2.6-xen.img

A Xen Guest Config kernel = "/boot/vmlinuz-2.6.16.13-xen" memory = 64 name = "ExampleDomain" vif = [ 'mac=00:16:3e:00:00:11', 'bridge=xenbr0' ] disk = [ 'phy:sda7,hda1,w' ] root = "/dev/hda1 ro" #on_poweroff = 'destroy' #on_reboot = 'restart' #on_crash = 'restart'

Guest Disk Options Objects are exported to Xen DomUs as raw partitions Exported Devices can be one of: raw partition loopback mount device logical volume blktap files Guests can have swap (which is important for memory constrained systems)

Guest Root Partition Look very similar to bare linux root partition Can get samples from http://www.oszoo.org/download.html Differences Devices will be different virtual consoles don't exist in the same way

Guest Network Options Guest NICs appears as vifX.Y in Dom0 Dom0 can use any standard Linux networking mechanisms to get guests on the network bridging – bind all vifs + physical network to a single bridge device routing – setup routes per standard mechanisms nat – use iptables to nat out guests

Common Xen Usage Virtual Colocation users can all have root access to their own systems Virtual Build Farm Single machine has many running OS versions at the same time Server Consolodation Moving many workloads to a single machine to increase power

Full Virtualization with Xen Intel and AMD have seen the value of virtualization Released processors that support virtualization Intel – Vtx (Core2Duo) AMD – SVM (AM2) Full Virtualization allows running of Legacy Oses which can not be modified Old RHEL, SLES MS Windows ;) Hey, I'm a Linux guy

Getting Help Mailing List xen-users@lists.xensource.com IRC #xen on irc.oftc.net ##xen on irc.freenode.net