10 Years of Xen and beyond Lars Kurth
10 Years of Xen and beyond … Lars Kurth Xen Project Community Manager lars. kurth@xen. org @lars_kurth FREENODE: lars_kurth
Xen. org becomes Xen. Project. org • Teams aka sub-projects – – Hypervisor XAPI ARM Hypervisor (for Servers as well as Mobile Devices) Mirage OS • Governance : mixture between Linux Kernel and Apache – – Consensus decision making Sub-project life-cycle (aka incubator) PMC style structure for team leadership Funded by companies (Advisory Board)
Xen contributor community is diversifying • The number of “significant” active vendors is increasing 100% 90% 80% 70% 60% • New feature development driving new participation 50% 40% 30% 20% 10% 0% 2010 Citrix SUSE University Grid. Centric NSA Fujitsu Misc Spectralogic 2011 2012 UPC Amazon AMD Individual Intel i. Web Oracle University of British Columbia
Hypervisor Architecture
Hypervisor Architectures Type 1: Bare metal Hypervisor A pure Hypervisor that runs directly on the hardware and hosts Guest OS’s. VMn VM 1 VM 0 Guest OS and Apps Scheduler Device Drivers/Models I/O Memory Hypervisor MMU CPUs Host HW 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 hardware and hosts Guest OS’s. A Hypervisor that runs within a Host OS and hosts Guest OS’s inside of it, using the host OS services to provide the virtual environment. VMn User-level VMM User Apps VM 1 VM 0 Device Models VMn VM 1 VM 0 Guest OS and Apps Host OS Scheduler Device Drivers/Models I/O Memory Hypervisor Device Drivers MMU CPUs Host HW Provides partition isolation + reliability, higher security Host HW I/O Ring-0 VM Monitor “Kernel “ Memory CPUs Low cost, no additional drivers Ease of use & installation
Xen: Type 1 with a Twist Type 1: Bare metal Hypervisor VMn VM 1 VM 0 Guest OS and Apps Scheduler Device Drivers/Models I/O Memory Hypervisor MMU CPUs Host HW
Xen: Type 1 with a Twist Xen Architecture Type 1: Bare metal Hypervisor VMn VM 1 VMn VM 0 VM 1 VM 0 Guest OS and Apps Scheduler Device Drivers/Models I/O Memory Hypervisor Scheduler MMU CPUs Guest OS and Apps Host HW I/O Hypervisor MMU Memory CPUs Host HW
Xen: Type 1 with a Twist Xen Architecture Type 1: Bare metal Hypervisor Control domain (dom 0) VMn VM 1 VMn Device Models VM 0 VM 1 Guest OS and Apps Scheduler Device Drivers/Models I/O Memory Hypervisor CPUs Host HW Guest OS and Apps Linux & BSD Scheduler MMU VM 0 Drivers I/O Hypervisor MMU Memory CPUs Host HW
Xen Project 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 RHEL 6) – Install Dom 0 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 • VMn Control domain (dom 0) VM 1 VM 0 Guest OS and Apps Dom 0 Kernel Scheduler MMU XSM Hypervisor Control Domain aka Dom 0 • • Memory Trusted Computing Base CPUs Dom 0 kernel with drivers Xen Management Toolstack Guest Domains • Your apps Driver/Stub/Service Domain(s) • I/O Interface to the outside world Host HW • • A “driver, device model or control service in a box” De-privileged and isolated Lifetime: start, stop, kill 11
Basic Xen Concepts Console • VMn Control domain (dom 0) VM 1 VM 0 Toolstack Guest OS and Apps Dom 0 Kernel Scheduler MMU XSM Hypervisor Control Domain aka Dom 0 • • Memory Trusted Computing Base CPUs Dom 0 kernel with drivers Xen Management Toolstack Guest Domains • Your apps Driver/Stub/Service Domain(s) • I/O Interface to the outside world Host HW • • A “driver, device model or control service in a box” De-privileged and isolated Lifetime: start, stop, kill 12
Basic Xen Concepts Console • VMn Control domain (dom 0) Toolstack Dom 0 Kernel Scheduler VM 1 One or more driver, stub or service domains MMU XSM VM 0 Guest OS and Apps Hypervisor Control Domain aka Dom 0 • • Memory Trusted Computing Base CPUs Dom 0 kernel with drivers Xen Management Toolstack Guest Domains • Your apps Driver/Stub/Service Domain(s) • I/O Interface to the outside world Host HW • • A “driver, device model or control service in a box” De-privileged and isolated Lifetime: start, stop, kill 13
Xen Variants for Server & Cloud Hypervisor Xen Hypervisor 14
Xen Variants for Server & Cloud Hypervisor Toolstack / Console Xen Hypervisor Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Single Host Basic Functions Single Host Additional Functionality Multiple Hosts Additional Functionality 15
Xen Variants for Server & Cloud Hypervisor Toolstack / Console Xen Hypervisor Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Single Host Basic Functions Single Host Additional Functionality Multiple Hosts Additional Functionality
Xen Variants for Server & Cloud Project Toolstack / Console Xen Hypervisor Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Products Oracle VM Huawei UVP Citrix Xen. Server 17
Xen Variants for Server & Cloud Project Toolstack / Console Xen Hypervisor Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Products Oracle VM Huawei UVP Citrix Xen. Server Used by … 18
Xen : Types of Virtualization
PV Domains Technology: • Paravirtualization Linux PV guests have limitations: • limited to a subset of virtual HW Guest VMn Control domain (dom 0) Apps PV Back Ends PV Front Ends Advantages • Fast • Works on any system HW Drivers Dom 0 Kernel Guest OS (even without virt extensions) Xen Hypervisor I/O Memory CPUs Host HW 20
PV Domains & Driver Domains Guest VMn Control domain (dom 0) Apps PV Back Ends PV Front Ends Driver Domain e. g. • Disk • Network PV Back End HW Drivers Dom 0 Kernel Guest OS Dom 0 Kernel* Xen Hypervisor I/O Memory CPUs Host HW Technology: • Paravirtualization Linux PV guests have limitations: • limited to a subset of virtual HW Advantages • Fast • Works on any system (even without virt extensions) Driver Domains • Security • Isolation • Reliability and Robustness *) Can be Mini. OS 21
HVM & Stub Domains Dom 0 Device Model Technology: • Shows emulation using QEMU/Device Guest VMn Model (SW Virtualization) • In other situation HW can be used IO Emulation Disadvantages • Emulation slower than PV IO Event Dom 0 Kernel (mainly I/O devices) VMEXIT Xen Hypervisor I/O Memory CPUs Advantages • No kernel support needed Host HW 22
HVM & Stub Domains Dom 0 Device Model Guest VMn IO Emulation IO Event Dom 0 Kernel Guest VMn Stubdomn Device Model IO Emulation IO Event VMEXIT Mini OS Memory CPUs Model (SW Virtualization) • In other situation HW can be used Disadvantages • Emulation slower than PV (mainly I/O devices) VMEXIT Xen Hypervisor I/O Technology: • Shows emulation using QEMU/Device Host HW Advantages • No kernel support needed Stub Domains • Security • Isolation • Reliability and Robustness 23
pt s, Tim Em er Le ulat s ga ed cy M b o Pr ivi oot the rb an leg oa d ed rd pa In , ge st ta ruc bl ti es on s or an d Paravirtualized Di In sk P rru Virtualized (HW) tw VH te Virtualized (SW) Ne VS k The Virtualization Spectrum Fully Virtualized (FV) VS VS VS VH FV with PV for disk & network P VS VS VH PVHVM P P VS VH P P P P PVH Fully Paravirtualized (PV) Xen 4. 4 HVM mode/domain PV mode/domain
k Optimal performance pt rru In te Di sk an d Poor performance s, Ne tw or Scope for improvement Tim Em er Le ulat s ga ed cy M b o Pr ivi oot the rb an leg oa d ed rd pa In , ge st ta ruc bl ti es on s The Virtualization Spectrum Fully Virtualized (FV) VS VS VS VH FV with PV for disk & network P VS VS VH PVHVM P P VS VH P P P P PVH Fully Paravirtualized (PV) Xen 4. 4 HVM mode/domain PV mode/domain
The Virtualization Spectrum k Optimal performance pt rru In te Di sk an d Poor performance s, Ne tw or Scope for improvement Tim Em er Le ulat s ga ed cy M b o Pr ivi oot the rb an leg oa d ed rd pa In , ge st ta ruc bl ti es on s Important: Xen automatically picks the best option based on HW & OS capabilities and available drivers. As a Xen user I chose a HVM or PV domain. Fully Virtualized (FV) VS VS VS VH FV with PV for disk & network P VS VS VH PVHVM P P VS VH P P P P PVH Fully Paravirtualized (PV) Xen 4. 4 HVM mode/domain PV mode/domain
XAPI, XCP and XCP-XAPI : What is it? Hypervisor Toolstack / Console Xen Hypervisor Default / XL (XM) Libvirt / VIRSH XAPI / XE Increased level of functionality and integration with other components Single Host Basic Functions Single Host Additional Functionality Multiple Hosts Additional Functionality
XAPI : What do I get? Xen Hypervisor XAPI / XE Multiple Hosts Additional Functionality • VM lifecycle: live snapshots, checkpoint, migration • Storage Xen. Motion: Migrate VMs between hosts or pools without shared storage (while the VM is running) • Resource pools: flexible storage and networking • Event tracking: progress, notification • Upgrade and patching capabilities • Real-time performance monitoring and alerting • Templates for Windows and Linux guests • Open v. Switch support built-in (default) More info: wiki. xen. org/wiki/XCP_Release_Features
XAPI : two variants! Xen Hypervisor XAPI / XE XCP ISO (at v 1. 6) Xen 4. 1. 3 + XAPI Cent. OS 5. 3 Kernel (v 2. 6. 32. 43) OVS 1. 4. 2 Multiple Hosts Additional Functionality XCP-XAPI packages Debian Wheezy Ubuntu 12. 04 LTS Others in progress …
XAPI : Orchestration and UIs Xen Hypervisor XAPI / XE Multiple Hosts Additional Functionality
Other XEN Cloud Orchestration Xen Hypervisor XM or XL Libvirt Single Host Basic Functions Single Host Additional Functionality
Challenges for FOSS hypervisors
“Security and Qo. S/Reliability are amongst the top 3 blockers for cloud adoption” www. colt. net/cio-research
System characteristics cloud users care about: “Robustness, Performance, Scalability & Security” Results XCP User Survey 2013 – 90% of users quoted these as most important attributes
Disaggregation Split Control Domain into Driver, Stub and Service Domains – See: ”Breaking up is hard to do” @ Xen Papers – See: “Domain 0 Disaggregation for XCP and Xen. Server” Used today by Qubes OS and Citrix Xen. Client XT Prototypes for XAPI See qubes-os. org Different windows run in different VMs
Benefits of Disaggregation More Security Increased serviceability and flexibility Better Robustness Better Performance Better Scalability Ability to safely restart parts of the system (e. g. just 275 ms outage from failed Ethernet driver)
Next: XAPI Architecture Diagram Before and After Disaggregation
User VM Dom 0 Domain manager healthd xenopsd libxl User VM NF BF NB gntdev Network drivers NFS/ i. SCSI Local storage drivers storaged vswitch tapdisk blktap 3 eth scsi Network drivers NFS/ Dom 0 Qemu i. SCSI drivers networkd vswitch storaged qemu tapdisk blktap 3 syslogd xapi eth Qemu xapi . . qemu networkd xapi Dom 0 eth Xen NIC (or SRIOV VF) CPU RAM CPU NIC (or SRIOV VF) RAID
User VM Dom 0 Domain manager healthd xenopsd libxl User VM NF BF NB gntdev Network driver domain NFS/ i. SCSI Local storage driver domain storaged tapdisk blktap 3 eth scsi networkd vswitch Qemu domain xapi domain driver domain storaged qemu tapdisk blktap 3 D o m 0 . . . xapi Logging domain networkd syslogd dbus over v 4 v eth vswitch eth Xen NIC (or SRIOV VF) CPU RAM CPU NIC (or SRIOV VF) RAID
Xen Security Advantages • Even without Advanced Security Features – Well-defined trusted computing base (much smaller than on type-2 HV) – Minimal services in hypervisor layer • Xen Security Modules (or XSM) and FLASK – – – XSM is Xen equivalent of LSM FLASK is Xen equivalent of SELinux Developed, maintained and contributed to Xen by NSA Compatible with SELinux (tools, architecture) XSM object classes maps onto Xen features More info: http: //www. slideshare. net/xen_com_mgr/ a-brief-tutorial-on-xens-advanced-security-features 40
User VM Dom 0 Domain manager healthd xenopsd libxl User VM NF BF NB gntdev Network driver domain NFS/ i. SCSI Local storage driver domain storaged tapdisk blktap 3 eth scsi networkd vswitch Qemu domain xapi domain driver domain storaged qemu tapdisk blktap 3 D o m 0 . . . xapi Logging domain networkd syslogd dbus over v 4 v eth eth FLASK policy restricting access Xen NIC (or SRIOV VF) vswitch CPU RAM Xen RAM CPU NIC (or SRIOV VF) RAID
Xen Advanced Security Recipes • Xen has many Security Features (besides the ones I covered) • Most are not switched on by default • Although most are simple to use, some seen complicated See: http: //www. slideshare. net/xen_com_mgr/ a-brief-tutorial-on-xens-advanced-security-features And more will be coming! 42
ARM Hypervisor
In depth presentation tomorrow … Xen on ARM • by Stefano Stabellini – Xen and Xen-ARM Linux maintainer • New York III from 10: 45 to 11: 30 • Including a demo One mode to rule them all
Mirage OS
Library Operating Systems Application stacks only running on Xen APIs Works on any Xen based cloud or hosting service Control domain (dom 0) Guest VMn Apps Examples – Erlang. On. Xen. org : Erlang – Hal. VM : Haskell – Mirage OS : Ocaml Benefits: – Small footprint – Low startup latency – Extremely fast migration of VMs PV Back Ends HW Drivers Library OS embedded in Language run-time Dom 0 Kernel Xen Host HW
Mirage OS • Recently added to Xen Project incubator • In beta stage : first release on its way (July 2013) • Clean-slate protocols implementations, e. g. – TCP/IP, DNS, SSH, Openflow (switch/controller), HTTP, XMPP, . . . – New applications using next generation XAPI (disaggregated XAPI architecture) More info: http: //www. slideshare. net/xen_com_mgr/ mirage-extreme-specialisation-of-virtual-appliances
Hot Topics and Projects
Xen 4. 3 Release (June 2013) • Release candidates & Xen Test Days (today, June 5 th) • • • Xen ARM for Servers Extend scope of Xen Security Modules Default to QEMU upstream Updated and improved libvirt drivers for Xen Lots of other stuff: – scalability, performance, better NUMA support, … More info: http: //lists. xen. org/archives/html/xen-devel/2013 -05/msg 01134. html
Xen 4 + XAPI in Cent. OS 6 (June 2013) “For about a year members of the Xen Project, the Cent. OS community and large Xen Users have worked on bringing Xen and XAPI to Cent. OS 6” Driven by demand from the community : • • • Can run Xen on Cent. OS 6 today, but non-trivial We wanted “YUM INSTALL XEN” Mostly a packaging problem Teams from Cent. OS, Citrix, Go Daddy & Rackspace QA and usability sanity checks
The Xen Community is Changing “Growth is leading to more structure & more collaboration & more openness!” • Establishing a shared and open test infrastructure – Goal: Increase development velocity • Improved usability and better distro-integration – Xen + XAPI in Cent. OS 6. 4 • More focus on downstreams – Open. Stack and Xen Orchestra – Better Libvirt and virt-manager integration • Changing the XAPI / XCP release model • Xen on ARM and collaboration with Linaro
Getting Started with Xen Projects Online : xenproject. org > User & Help menus • Mailing Lists and IRC • Q&A System • Find me and I can get you hooked up! Events : xenproject. org/about/events. html • • Test Days (IRC at #xentest) … today, June 5 th Document Days (IRC at #xendocs) … the next one is May 28 th User (Sept 18, New Orleans) and Developer Summits (Oct 24 -25, Edinburgh) Hackathons - last week search for “[Hackathon Minutes]” on xen-devel
• News: blog. xenproject. org • Web: xenproject. org > Help – Help for IRC, Lists, … – Stackoverflow like Q&A • Wiki: wiki. xenproject. org • Presentations: slideshare. net/xen_com_mgr • Videos: vimeo. com/channels/xen Thank You! @lars_kurth FREENODE: lars_kurth Slides available under CC-BY-SA 3. 0 From www. slideshare. net/xen_com_mgr
- Slides: 53