Xen: Hypervisor for the Cloud - CCC13
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Xen: Hypervisor for the Cloud - CCC13

on

  • 2,352 views

Talk given by Xen Project Evangelist Russ Pavlicek at CloudStack Collaboration Conference 2013 in Santa Clara, CA

Talk given by Xen Project Evangelist Russ Pavlicek at CloudStack Collaboration Conference 2013 in Santa Clara, CA

Statistics

Views

Total Views
2,352
Views on SlideShare
1,496
Embed Views
856

Actions

Likes
8
Downloads
51
Comments
0

3 Embeds 856

http://www.xenproject.org 771
http://xenproject.org 84
http://192.168.33.10 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Xen: Hypervisor for the Cloud - CCC13 Presentation Transcript

  • 1. Russell PavlicekXen Project EvangelistRussell.Pavlicek@XenProject.orgXen: FOSS Hypervisor for the Cloud@RCPavlicekSkype: russpavlicek
  • 2. So Who’s the Fat Geek up Front?
  • 3. • Linux user since 1995; Linux desktop since 1997• Linux advocate before I ever saw the software• Early Linux advocate at Digital Equipment Corporation, Compaq• Former FOSS columnist for Infoworld, Processor magazines• Former panelist on The Linux Show webcast• Wrote book, Embracing Insanity: Open Source Software Development (2000)• Speaker at about 50 Open Source conferences• Became Xen Project Evangelist employed by Citrix in January 2013• Not a Xen Project expert… yetAbout the Speaker...
  • 4. A Word About the Xen Stack• The main components:– Xen Hypervisor, the central FOSS project– Xen Cloud Platform, the Cloud enabled subproject• With its enablement layer, XAPI– These are the subjects of this talk• And then there’s:– XenServer, a popular Xen-based product• Xen Cloud Platform +• There’s a XenServer talk tomorrow
  • 5. The Cloud “Problem”
  • 6. IT: Pre-Cloud• Stability is Paramount– The value of IT to the corporation is consistent service availability– Service capacity specified a year or more in advance– What’s up, stays up• Change is Bad– Change to status quo is disruptive and dangerous– Changes are beaten into submission until they become part ofthe new status quo – and then they are no longer changes
  • 7. IT in the Cloud• Availability of Services is Paramount– The value of IT to the corporation is consistent service availabilityat levels matching dynamic business demand– Service capacity must move with business needs– What’s up when depends on what’s needed when• Change is Good– Services must change to cover the needs of the moment– Lack of change = lack of value
  • 8. Layers of the CloudAppOperating System LayerVirtualization LayerCloud Orchestration Layer
  • 9. Virtualization in the Cloud• It must be stable• It must be secure• It must be configurable on a large scale– The “user at machine” paradigm does not work– If it requires a mouse, you’re in trouble• It must take orchestration (APIs, command line)• It must be multi-tenant• It must not lock you into one concept or provider of Cloud
  • 10. Xen: Stable• Solid track record–Amazon bets their AWS cloud business on us• Linux Foundation Project Partners:–AMD, Amazon, Cisco, Citrix, Intel, Oracle,Samsung, Verizon, and more
  • 11. Xen: Secure• SELINUX• FLASK– NSA involvement– If the NSA cares enough to secure Xen, you can rely on Xensecurity• Disaggregation– Segment device drivers into discrete VMs
  • 12. Xen: Configurable at Scale• Toolstacks give rich API and command line capabilities• Not GUI-centric• Empowers orchestration via scripting, power tools (Puppet,Chef, etc.), GUIs, and Cloud layers
  • 13. Single HostBasic FunctionsMultiple HostsAdditional FunctionalityXen: Rich ToolstacksIncreased level of functionality and integration with other componentsDefault / XL (XM)Toolstack / Console Libvirt / VIRSH XAPI / XEHypervisorSingle HostAdditional FunctionalityXen Hypervisor
  • 14. 14Xen: Tools for Different SolutionsIncreased level of functionality and integration with other componentsDefault / XL (XM)Toolstack / Console Libvirt / VIRSHProducts Oracle VM Huawei UVP Citrix XenServerProjectXAPI / XEXen Hypervisor
  • 15. 15Xen: Tools for Different CloudsIncreased level of functionality and integration with other componentsDefault / XL (XM)Toolstack / Console Libvirt / VIRSHUsed by …ProjectXAPI / XEProducts Oracle VM Huawei UVP Citrix XenServerXen Hypervisor
  • 16. Focus on XAPI: The Cloud LayerMultiple HostsAdditional FunctionalityXAPI / XEXen Hypervisor• VM lifecycle: live snapshots, checkpoint, migration• Storage XenMotion: Migrate VMs between hosts or poolswithout 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 vSwitch support built-in (default)More info: wiki.xenproject.org/wiki/XCP_Release_Features
  • 17. Xen: A Multi-tenant Solution• Multiple groups share common resources securely– Clouds require sharing common resources– Organizations often need their VMs to be visible to each other,but entirely invisible to all other VMs– Xen Cloud Platform makes this happen– Critical ability for hosting providers
  • 18. Xen: Doesn’t lock you in• Xen does not force its view of the Cloud on you• Xen does not force you to use a “favored” Cloud solution• This is one of the reasons why Cloud innovation happens inthe world of FOSS: It gives power to the Cloud, but allowsCloud orchestration solutions to innovate• There is no attempt to bend your efforts to the will ofsome corporate business plan
  • 19. XAPI : Orchestration ChoicesMultiple HostsAdditional FunctionalityXAPI / XEXen Hypervisor
  • 20. Xen Project Healthcheck
  • 21. • See the following teams on the new XenProject.org site:– 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 leadershipNews: Xen Project in Linux Foundation
  • 22. Xen contributor community is diversifying0%10%20%30%40%50%60%70%80%90%100%2010 2011 2012Citrix UPCSUSE AmazonUniversity AMDGridCentric IndividualNSA IntelFujitsu iWebMisc OracleSpectralogic University of British Columbia• The number of “significant”active vendors is increasing• New feature development drivingnew participation
  • 23. More Xen Features• Live Migration of VMs: XenMotion (in Xen CloudPlatform)• High Availability: Remus• Wide variety of Control Domains supported• Even wider variety of Guest Domains• Multiple virtualization modes improve performance
  • 24. Hypervisor Architecture
  • 25. Hypervisor ArchitecturesType 1: Bare metal HypervisorA pure Hypervisor that runs directly on thehardware and hosts Guest OS’s.Provides partition isolation + reliability,higher securityHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand Apps
  • 26. Hypervisor ArchitecturesType 1: Bare metal HypervisorA pure Hypervisor that runs directly on thehardware and hosts Guest OS’s.Type 2: OS ‘Hosted’A Hypervisor that runs within a Host OS and hostsGuest OS’s inside of it, using the host OS servicesto provide the virtual environment.Provides partition isolation + reliability,higher securityLow cost, no additional driversEase of use & installationHost HWMemory CPUsI/OHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand AppsHost OSDevice DriversRing-0 VM Monitor“Kernel “VMnVM1VM0Guest OSand AppsUserAppsUser-level VMMDevice Models
  • 27. Xen: Type 1 with a TwistType 1: Bare metal HypervisorHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand Apps
  • 28. Xen: Type 1 with a TwistType 1: Bare metal HypervisorHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand AppsHost HWMemory CPUsI/OHypervisorVMnVM1VM0Guest OSand AppsXen ArchitectureScheduler MMU
  • 29. Xen: Type 1 with a TwistType 1: Bare metal HypervisorHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand AppsHost HWMemory CPUsI/OHypervisorVMnVM1VM0Guest OSand AppsXen ArchitectureScheduler MMUControl domain(dom0)DriversDevice ModelsLinux & BSD
  • 30. Xen Project and Linux• Xen Hypervisor is not in the Linux kernel• BUT: everything Xen and Xen Guests need to run is• Xen packages in all distros (not RHEL6, but CentOS 6)– Install Control Domain (Dom0) Linux distribution– Install Xen package(s) or meta package– Reboot– Configure stuff: set up disks, peripherals, etc.More info: wiki.xenproject.org/wiki/Category:Host_Install
  • 31. Basic Xen Concepts31Control domain(dom0)Host HWVMnVM1VM0Guest OSand AppsMemory CPUsI/OConsole• Interface to the outside worldControl Domain aka Dom0• Dom0 kernel with drivers• Xen Management ToolstackGuest Domains• Your appsDriver/Stub/Service Domain(s)• A “driver, device model or controlservice in a box”• De-privileged and isolated• Lifetime: start, stop, killDom0 KernelHypervisorScheduler MMU XSMTrusted Computing Base
  • 32. Basic Xen Concepts: Toolstack+32Control domain(dom0)Host HWVMnVM1VM0Guest OSand AppsConsoleMemory CPUsI/ODom0 KernelToolstackHypervisorScheduler MMU XSMConsole• Interface to the outside worldControl Domain aka Dom0• Dom0 kernel with drivers• Xen Management ToolstackGuest Domains• Your appsDriver/Stub/Service Domain(s)• A “driver, device model or controlservice in a box”• De-privileged and isolated• Lifetime: start, stop, killTrusted Computing Base
  • 33. Basic Xen Concepts: Disaggregation33Control domain(dom0)Host HWVMnVM1VM0Guest OSand AppsConsoleMemory CPUsI/OOne or moredriver, stub orservice domainsDom0 KernelToolstackHypervisorScheduler MMU XSMConsole• Interface to the outside worldControl Domain aka Dom0• Dom0 kernel with drivers• Xen Management ToolstackGuest Domains• Your appsDriver/Stub/Service Domain(s)• A “driver, device model or controlservice in a box”• De-privileged and isolated• Lifetime: start, stop, killTrusted Computing Base
  • 34. Xen : Types of Virtualization
  • 35. Xen Virtualization Vocabulary• PV – Paravirtualization– Hypervisor provides API used by the OS of the Guest VM– Guest OS needs to be modified to provide the API• HVM – Hardware-assisted Virtual Machine– Uses CPU VM extensions to handle Guest requests– No modification to Guest OS– But CPU must provide VM extensions• FV – Full Virtualization (another name for HVM)
  • 36. Xen Virtualization Vocabulary• PVHVM – PV on HVM drivers– Allows H/W virtualized guests to use PV disk and I/O drivers– No modifications to guest OS– Better performance than straight HVM• PVH – PV in HVM Container (coming in 4.4)– Almost fully PV– Uses HW extensions to eliminate PV MMU– Possibly best mode for CPUs with virtual H/W extensions
  • 37. The Virtualization SpectrumFully Virtualized (FV) VS VS VS VHFV with PV for disk & network P VS VS VHPVHVM P P VS VHPVH P P P VHFully Paravirtualized (PV) P P P PVH Virtualized (HW)P ParavirtualizedVS Virtualized (SW)HVM mode/domainPV mode/domainXen 4.4
  • 38. The Virtualization SpectrumFully Virtualized (FV) VS VS VS VHFV with PV for disk & network P VS VS VHPVHVM P P VS VHPVH P P P VHFully Paravirtualized (PV) P P P PScope for improvementPoor performanceOptimal performanceHVM mode/domainXen 4.4PV mode/domain
  • 39. The Virtualization SpectrumFully Virtualized (FV) VS VS VS VHFV with PV for disk & network P VS VS VHPVHVM P P VS VHPVH P P P VHFully Paravirtualized (PV) P P P PScope for improvementPoor performanceOptimal performanceHVM mode/domainXen 4.4PV mode/domainImportant: Xen automatically picks the bestoption based on HW & OS capabilities andavailable drivers.As a Xen user I chose a HVM or PV domain.
  • 40. 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 XenServer”Used today by Qubes OS and Citrix XenClient XTPrototypes for XAPIDisaggregationSee qubes-os.orgDifferent windows runin different VMs
  • 41. More SecurityIncreased serviceability and flexibilityBetter RobustnessBetter PerformanceBetter ScalabilityBenefits of DisaggregationAbility to safely restart parts of the system(e.g. just 275ms outage from failed Ethernet driver)
  • 42. Next: XAPI Architecture DiagramBefore and After Disaggregation
  • 43. CPUCPURAM RAMNIC(or SR-IOV VF)NIC(or SR-IOV VF)NIC(or SR-IOV VF)NIC(or SR-IOV VF)RAIDXenDom0NetworkdriversNFS/iSCSIdriversQemu xapi LocalstoragedriversNFS/iSCSIdriversNetworkdriversQemueth eth eth eth scsiUser VM User VMNB gntdev NBNF BF NF BFqemu qemuxapivswitchnetworkdtapdiskblktap3storagedsyslogdvswitchnetworkdtapdiskblktap3storagedtapdiskblktap3storagedgntdev gntdevDom0xenopsdlibxlhealthdDomainmanagerDom0....Xenxapi
  • 44. CPUCPURAM RAMNIC(or SR-IOV VF)NIC(or SR-IOV VF)NIC(or SR-IOV VF)NIC(or SR-IOV VF)RAIDDom0 NetworkdriverdomainNFS/iSCSIdriverdomainQemudomainxapidomainLoggingdomainLocalstoragedriverdomainNFS/iSCSIdriverdomainNetworkdriverdomainUser VM User VMNB gntdev NBNF BF NF BFdbus over v4vqemuxapixenopsdlibxlhealthdDomainmanagervswitchnetworkdtapdiskblktap3storagedsyslogd vswitchnetworkdtapdiskblktap3storagedtapdiskblktap3storagedgntdev gntdeveth eth eth eth scsiXen XenDom0dbus over v4v...
  • 45. 45Xen 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 (Linux Security Modules)– 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 featuresMore info: http://www.slideshare.net/xen_com_mgr/a-brief-tutorial-on-xens-advanced-security-features
  • 46. 46Xen Security Modules (XSM) -- FLASK• What does FLASK provide?– Granular security• Can a guest domain talk with other guest domains?• Can a guest domain only communicate with the Control Domain?• Can a Guest domain have memory which cannot be read by the Control Domain?• What type of device model is used in this domain?• The ability to define multiple security roles on the domain level• User types can be defined and assign roles• Policy constraint logicMore info: http://wiki.xen.org/wiki/Xen_Security_Modules_:_XSM-FLASK
  • 47. CPUCPURAM RAMNIC(or SR-IOV VF)NIC(or SR-IOV VF)NIC(or SR-IOV VF)NIC(or SR-IOV VF)RAIDXenDom0 NetworkdriverdomainNFS/iSCSIdriverdomainQemudomainxapidomainLoggingdomainLocalstoragedriverdomainNFS/iSCSIdriverdomainNetworkdriverdomaineth eth eth eth scsiUser VM User VMNB gntdev NBNF BF NF BFqemuxapixenopsdlibxlhealthdDomainmanagervswitchnetworkdtapdiskblktap3storagedsyslogd vswitchnetworkdtapdiskblktap3storagedtapdiskblktap3storagedgntdev gntdevFLASK policyrestricting accessDom0...dbus over v4v dbus over v4vXen
  • 48. ARM Hypervisor
  • 49. Fully functional for ARM v7 & v8ARM v7: Versatile Express, Arndale &Samsung ChromebookARM v8: Fast ModelXen 4.3 for ARM Servers
  • 50. ARM SOCXen + ARM = a perfect MatchARM Architecture Features for VirtualizationHypervisor mode : EL2Kernel mode : EL1User mode : EL0GICv2GT2 stageMMUI/ODevice Tree describes …Hypercall Interface HVC
  • 51. ARM SOC ARM Architecture Features for VirtualizationEL2EL1EL0GICv2GT2 stageMMUI/ODevice Tree describes …HVCXen + ARM = a perfect MatchXen Hypervisor
  • 52. ARM SOC ARM Architecture Features for VirtualizationEL2EL1EL0GICv2GT2 stageMMUI/ODevice Tree describes …HVCXen + ARM = a perfect MatchXen HypervisorAny Xen Guest VM (including Dom0)KernelUser SpaceHVC
  • 53. ARM SOC ARM Architecture Features for VirtualizationEL2EL1EL0GICv2GT2 stageMMUI/ODevice Tree describes …HVCXen + ARM = a perfect MatchXen HypervisorDom0onlyAny Xen Guest VM (including Dom0)KernelUser SpaceI/OPVbackPVfrontI/OHVC
  • 54. One mode to rule them allx86: PVHVM P P VS VHx86: PVH P P P VHARM v7 & v8 P VH VH VHScope for improvementOptimal performanceHVM mode/domainPV mode/domain
  • 55. Code Size of x86 and ARM HypervisorsX86 Hypervisor 100K -120K LOC Any x86 CPUARM Hypervisor formobile Devices60K LOC ARM v5 – v7(no virtual extensions)(extra code for RT)ARM Hypervisor forServers17K LOC ARM v7+(w/ virtual extensions)
  • 56. Mirage OS
  • 57. Application stacks only running on Xen APIsWorks on any Xen based cloud or hosting serviceExamples– ErlangOnXen.org : Erlang– HalVM : Haskell– Mirage OS : OcamlBenefits:– Small footprint– Low startup latency– Extremely fast migration of VMsLibrary Operating SystemsXenControl domain(dom0)Host HWGuest VMnAppsHW DriversPV Back EndsLibrary OSembeddedin Languagerun-timeDom0 Kernel
  • 58. • Recently added to Xen Project incubator• In beta stage: first release on its way• Clean-slate protocols implementations, e.g.– TCP/IP, DNS, SSH, Openflow (switch/controller), HTTP, XMPP, ...– New applications using next generation XAPI(disaggregated XAPI architecture)Mirage OSMore info: http://www.slideshare.net/xen_com_mgr/mirage-extreme-specialisation-of-virtual-appliances
  • 59. What’s Next?
  • 60. • Release is Imminent!• Xen ARM for Servers• Extend scope of Xen Security Modules• qxl Spice support for 3d acceleration• Updated and improved libvirt drivers for Xen• Lots of other stuff:– scalability, performance, better NUMA support, …Coming in Xen 4.3 (June 26, 2013)More info: http://wiki.xenproject.org/wiki/Xen_Roadmap/4.3
  • 61. • Establish a shared test infrastructure– Most major contributors are duplicating effort– Mirage OS provides interesting opportunities• Usability and better distribution integration– Example: Xen + XAPI in CentOS 6.4• More focus on downstreams– Examples: CloudStack and Xen Orchestra• Disaggregation in Xen toolstacks (e.g XAPI)• Better Libvirt and virt-manager integration– Embed Xen more into the Linux ecosystem and provide benefits for thewider Linux communityWhat’s next (and already happening)
  • 62. • Document Days (monthly; today in fact)• Test Days (prior to release)• Mailing Lists and IRC• XenProject.org (sign up, it’s free!)Getting Started with Xen ProjectXen Hackathon, Next one details TBD 2014Xen Developer Summit, 10/25-26, EdinburghXen User Summit, 9/18, New OrleansCFPs open right now!
  • 63. Thank You!Slides available under CC-BY-SA 3.0From www.slideshare.net/xen_com_mgr@RCPavlicekSkype: russpavlicek• News: blog.XenProject.org• Web: XenProject.org– Help for IRC, Lists, …– Stackoverflow-like Q&A• Wiki: wiki.XenProject.org• Presentations: slideshare.net/xen_com_mgr• Videos: vimeo.com/channels/xen