Virtualization in the Cloud: Featuring Xen and XCP
Total Page:16
File Type:pdf, Size:1020Kb
Virtualization in the Cloud: Featuring Xen and XCP Lars Kurth Xen Community Manager [email protected] FREENODE: lars_kurth @lars_kurth A Brief History of Xen in the Cloud Late 90s XenoServer Project A Brief History of Xen in the Cloud Late 90s ‘03 XenoServer Project Xen 1.0 A Brief History of Xen in the Cloud Late 90s ‘03 ‘06 ‘08 XenoServer Amazon EC2 Project and Slicehost launched Xen 1.0 Rackspace Cloud A Brief History of Xen in the Cloud Late 90s ‘03 ‘06 ‘08 ‘11 ‘12 XenoServer Amazon EC2 XCP 1.x Project and Slicehost Cloud Mgmt launched Xen 1.0 Rackspace Cloud XCP packages in Linux A Brief History of Xen in the Cloud Late 90s ‘03 ‘06 ‘08 ‘11 ‘12 XenoServer Amazon EC2 XCP 1.x Project and Slicehost Cloud Mgmt launched Xen 1.0 Rackspace Linux 3.0 Cloud XCP packages in Linux A Brief History of Xen in the Cloud Late 90s ‘03 ‘06 ‘08 ‘11 ‘12 ‘13 XenoServer Amazon EC2 XCP 1.x Project and Slicehost Cloud Mgmt launched Xen 1.0 Rackspace Linux 3.0 Xen for Cloud ARM servers XCP packages in Linux 10th birthday The Xen Hypervisor was designed for the Cloud straight from the outset! Xen.org • Guardian of Xen Hypervisor and related OSS Projects • Xen Governance similar to Linux Kernel – Plus project lifecycle and Project Management Committee (PMC) • Projects – Xen Hypervisor (led by 5 committers, 2 from Citrix, 1 from Suse, 2 Independent) – Xen Cloud Platform aka XCP (led by Citrix) – Xen ARM : Xen for mobile devices (led by Samsung) Xen contributor community is diversifying 100% 90% • The number of “significant” 80% active vendors is increasing 70% 60% 50% • New feature development driving 40% 30% new participation 20% 10% 0% 2010 2011 2012 Citrix UPC SUSE Amazon University AMD GridCentric Individual NSA Intel Fujitsu iWeb Misc Oracle Spectralogic University of British Columbia Xen Overview Hypervisor Architectures Type 1: Bare metal Hypervisor A pure Hypervisor that runs directly on the hardware and hosts Guest OS’s. VMn VM1 VM0 Guest OS and Apps Scheduler Hypervisor Device Drivers/Models MMU Host HW I/O Memory CPUs Provides partition isolation + reliability, higher security Hypervisor Architectures Type 1: Bare metal Hypervisor Type 2: OS ‘Hosted’ A pure Hypervisor that runs directly on the A Hypervisor that runs within a Host OS and hosts hardware and hosts Guest OS’s. Guest OS’s inside of it, using the host OS services to provide the virtual environment. VM User-level VMM n VMn User VM1 VM Apps 1 VM Device Models 0 VM0 Guest OS Guest OS and Apps and Apps Host OS Hypervisor Scheduler Ring-0 VM Monitor Device Drivers “Kernel “ Device Drivers/Models MMU Host HW Host HW I/O Memory CPUs I/O Memory CPUs Provides partition isolation + reliability, Low cost, no additional drivers higher security Ease of use & installation Xen: Type 1 with a Twist Type 1: Bare metal Hypervisor VMn VM1 VM0 Guest OS and Apps Scheduler Hypervisor Device Drivers/Models MMU Host HW I/O Memory CPUs Xen: Type 1 with a Twist Type 1: Bare metal Hypervisor Xen Architecture VMn VM 1 VMn VM 0 VM1 Guest OS VM0 and Apps Guest OS and Apps Scheduler Hypervisor Device Drivers/Models MMU Scheduler MMU Hypervisor Host HW Host HW I/O Memory CPUs I/O Memory CPUs Xen: Type 1 with a Twist Type 1: Bare metal Hypervisor Xen Architecture Control domain (dom0) VMn VM 1 Device Models VMn VM 0 VM1 Guest OS VM0 and Apps Drivers Guest OS Linux & BSD and Apps Scheduler Hypervisor Device Drivers/Models MMU Scheduler MMU Hypervisor Host HW Host HW I/O Memory CPUs I/O Memory CPUs Xen and Linux • Xen Hypervisor is not in the Linux kernel • BUT: everything Xen and Xen Guests need to run is! • Xen packages are in all Linux distros (except RHEL6) – Install Dom0 Linux distro – Install Xen package(s) or meta package – Reboot – Config stuff: set up disks, peripherals, etc. More info: wiki.xen.org/wiki/Category:Host_Install Basic Xen Concepts Console • Interface to the outside world Control Domain aka Dom0 VM n • Dom0 kernel with drivers Control domain VM1 (dom0) • Xen Management Toolstack VM0 Guest OS Guest Domains Dom0 Kernel and Apps • Your apps Scheduler MMU XSM Hypervisor Driver/Stub/Service Domain(s) • A “driver, device model or control Host HW I/O Memory CPUs service in a box” • De-privileged and isolated • Lifetime: start, stop, kill Trusted Computing Base 18 Basic Xen Concepts Console Console • Interface to the outside world Control Domain aka Dom0 VM n • Dom0 kernel with drivers Control domain VM1 (dom0) • Xen Management Toolstack VM0 Toolstack Guest OS Guest Domains Dom0 Kernel and Apps • Your apps Scheduler MMU XSM Hypervisor Driver/Stub/Service Domain(s) • A “driver, device model or control Host HW I/O Memory CPUs service in a box” • De-privileged and isolated • Lifetime: start, stop, kill Trusted Computing Base 19 Basic Xen Concepts Console Console • Interface to the outside world Control Domain aka Dom0 VM n • Dom0 kernel with drivers Control domain VM1 (dom0) • Xen Management Toolstack One or more VM0 Toolstack driver, stub or Guest OS Guest Domains service domains Dom0 Kernel and Apps • Your apps Scheduler MMU XSM Hypervisor Driver/Stub/Service Domain(s) • A “driver, device model or control Host HW I/O Memory CPUs service in a box” • De-privileged and isolated • Lifetime: start, stop, kill Trusted Computing Base 20 Xen Variants for Server & Cloud Hypervisor Xen 21 Xen Variants for Server & Cloud Hypervisor Xen Toolstack / Console Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Single Host Single Host Basic Functions Additional Functionality Multiple Hosts Additional Functionality 22 Xen Variants for Server & Cloud Hypervisor Xen XCP Toolstack / Console Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Single Host Single Host Basic Functions Additional Functionality Multiple Hosts Additional Functionality 23 Xen Variants for Server & Cloud Project Xen XCP Toolstack / Console Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Get Binaries from … Linux Distros Linux Distros Debian & Ubuntu ISO from Xen.org 24 Xen Variants for Server & Cloud Project Xen Hypervisor XCP Toolstack / Console Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Get Binaries from … Linux Distros Linux Distros Debian & Ubuntu ISO from Xen.org Products Oracle VM Huawei UVP Citrix XenServer 25 Xen Variants for Server & Cloud Project Xen Hypervisor XCP Toolstack / Console Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Get Binaries from … Linux Distros Linux Distros Debian & Ubuntu ISO from Xen.org Used by … More info: xen.org/community/ecosystem.html xen.org/community/presentations.html xen.org/products/case_studies.html26 Xen : Types of Virtualization PV Domains Technology: Control domain Guest VM n • Paravirtualization (dom0) Apps Linux PV guests have limitations: • limited set of virtual hardware PV Back Ends PV Front Ends Advantages HW Drivers • Fast Dom0 Kernel Guest OS • Works on any system (even without virt extensions) Xen Hypervisor Host HW I/O Memory CPUs 28 PV Domains & Driver Domains Technology: Control domain Guest VM Driver Domain n • Paravirtualization (dom0) e.g. Apps • Disk • Network Linux PV guests have limitations: • limited set of virtual hardware PV Back Ends PV Front Ends PV Back End Advantages HW Drivers HW Driver • Fast Dom0 Kernel Guest OS Dom0 Kernel* • Works on any system (even without virt extensions) Xen Hypervisor Driver Domains • Security Host HW I/O Memory CPUs • Isolation • Reliability and Robustness *) Can be MiniOS 29 HVM & Stub Domains Technology: Dom0 Guest VM n • Shows emulation using QEMU/Device Model (SW Virtualization) IO Emulation Device Model • In other situation HW can be used Disadvantages IO Event • Emulation slower than PV Dom0 Kernel VMEXIT (mainly I/O devices) Xen Hypervisor Advantages • No kernel support needed Host HW I/O Memory CPUs 30 HVM & Stub Domains Technology: Dom0 Guest VM Stubdom Guest VM n n n • Shows emulation using QEMU/Device Model (SW Virtualization) IO Emulation IO Emulation Device Model Device Model • In other situation HW can be used Disadvantages IO Event IO Event • Emulation slower than PV Dom0 Kernel VMEXIT Mini OS VMEXIT (mainly I/O devices) Xen Hypervisor Advantages • No kernel support needed Host HW I/O Memory CPUs Stub Domains • Security • Isolation • Reliability and Robustness 31 The Virtualization Spectrum VS Virtualized (SW) VH Virtualized (HW) P Paravirtualized Fully Virtualized (FV) VS VS VS VH FV with PV for disk & network P VS VS VH HVM mode/domain PVHVM P P VS VH PVH Xen 4.3 P P P VH PV mode/domain Fully Paravirtualized (PV) P P P P The Virtualization Spectrum Optimal performance Scope for improvement Poor performance Fully Virtualized (FV) VS VS VS VH FV with PV for disk & network P VS VS VH HVM mode/domain PVHVM P P VS VH PVH Xen 4.3 P P P VH PV mode/domain Fully Paravirtualized (PV) P P P P The Virtualization Spectrum Important: Xen automatically picks the best option based on HW & OS capabilities and Optimal performance available drivers. Scope for improvement As a Xen user I chose a HVM or PV domain. Poor performance Fully Virtualized (FV) VS VS VS VH FV with PV for disk & network P VS VS VH HVM mode/domain PVHVM P P VS VH PVH Xen 4.3 P P P VH PV mode/domain Fully Paravirtualized (PV) P P P P XCP Project XCP – Xen Cloud Platform Complete stack for server virtualization • Extends Xen to cover multiple