LinuxCon Japan 13 : 10 years of Xen and Beyond

408,376 views

Published on

Published in: Technology
  • Be the first to comment

LinuxCon Japan 13 : 10 years of Xen and Beyond

  1. 1. Lars KurthXen Project Community Managerlars.kurth@xen.org10 Years of Xen and beyond …@lars_kurthFREENODE: lars_kurth
  2. 2. Xen.org becomes XenProject.orgXen.org(single vendor Open Source)XenProject.org(truly vendor neutral Open Source)
  3. 3. 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• Linux Foundation CollaborativeProject was next logical step
  4. 4. Xen : The Gears of the Cloud• Large user basemore than 10 million individuals users• Powers the largest clouds in production• Not just for Servers
  5. 5. • Teams aka sub-projects– Hypervisor– XAPI– ARM Hypervisor (for Servers as well as Mobile Devices)– Mirage OS (a Xen Library OS)• Governance : mixture between Linux Kernel and ApacheXenProject.org Overview
  6. 6. Hypervisor Architecture
  7. 7. 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
  8. 8. 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
  9. 9. Xen: Type 1 with a TwistType 1: Bare metal HypervisorHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand Apps
  10. 10. Xen: Type 1 with a TwistType 1: Bare metal HypervisorHost HWMemory CPUsI/OHypervisorSchedulerMMUDevice Drivers/ModelsVMnVM1VM0Guest OSand AppsHost HWMemory CPUsI/OHypervisorVMnVM1VM0Guest OSand AppsXen ArchitectureScheduler MMU
  11. 11. 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
  12. 12. Xen Project and Linux• Xen Hypervisor is not in the Linux kernel• BUT: everything Xen and Xen Guests need to run is!– Linux Kernel 3.0+ is Xen-enabled• 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
  13. 13. Basic Xen Concepts13Control 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
  14. 14. Basic Xen Concepts14Control 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
  15. 15. Basic Xen Concepts15Control 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
  16. 16. Xen : Types of Virtualization
  17. 17. 17Xen HypervisorControl domain(dom0)Host HWGuest VMnAppsMemory CPUsI/OTechnology:• ParavirtualizationLinux PV guests have limitations:• limited to a subset of set of virtual HWAdvantages• Fast• Works on any system(even without virt extensions)HW DriversPV Back Ends PV Front EndsGuest OSDom0 KernelPV Domains
  18. 18. 18Xen HypervisorControl domain(dom0)Host HWGuest VMnAppsMemory CPUsI/OTechnology:• ParavirtualizationLinux PV guests have limitations:• limited to a subset of virtual HWAdvantages• Fast• Works on any system(even without virt extensions)Driver Domains• Security• Isolation• Reliability and RobustnessHW DriversPV Back Ends PV Front EndsDriver Domaine.g.• Disk• NetworkHW DriverPV Back EndDom0 Kernel**) Can be MiniOSGuest OSDom0 KernelPV Domains & Driver Domains
  19. 19. 19Xen HypervisorDom0Host HWGuest VMnTechnology:• Shows emulation using QEMU/DeviceModel (SW Virtualization)• In other situation HW can be usedDisadvantages• Emulation slower than PV(mainly I/O devices)Advantages• No kernel support neededDevice ModelIO EmulationIO EventVMEXITDom0 KernelHVMMemory CPUsI/O
  20. 20. 20Xen HypervisorDom0Host HWGuest VMnTechnology:• Shows emulation using QEMU/DeviceModel (SW Virtualization)• In other situation HW can be usedDisadvantages• Emulation slower than PV(mainly I/O devices)Advantages• No kernel support neededStub Domains• Security• Isolation• Reliability and RobustnessDevice ModelIO EmulationIO EventVMEXITStubdomnDevice ModelMini OSGuest VMnIO EmulationIO EventVMEXITDom0 KernelHVM & Stub DomainsMemory CPUsI/O
  21. 21. 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
  22. 22. 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
  23. 23. 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.
  24. 24. Xen Variants
  25. 25. 25Xen Variants for Server & CloudXen HypervisorHypervisor
  26. 26. Single HostBasic FunctionsMultiple HostsAdditional FunctionalityXen Variants for Server & CloudIncreased level of functionality and integration with other componentsDefault / XL (XM)Toolstack / Console Libvirt / VIRSH XAPI / XEHypervisorSingle HostAdditional FunctionalityXen Hypervisor
  27. 27. 27Xen Variants for Server & CloudDefault / XL (XM)Toolstack / Console Libvirt / VIRSHProjectXAPI / XEXen HypervisorCloud Orchestration
  28. 28. 28Xen Variants for Server & CloudDefault / XL (XM)Toolstack / Console Libvirt / VIRSHProducts Oracle VM Huawei UVP Citrix XenServerProjectXAPI / XEXen Hypervisor
  29. 29. 29Xen Variants for Server & CloudDefault / XL (XM)Toolstack / Console Libvirt / VIRSHUsed by …ProjectXAPI / XEXen Hypervisor
  30. 30. XAPI, XCP and XCP-XAPI
  31. 31. XAPI : What do I get?Multiple 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.xen.org/wiki/XCP_Release_Features
  32. 32. XAPI : two variants!Multiple HostsAdditional FunctionalityXAPI / XEXen HypervisorXCP ISO (at v1.6)Xen 4.1.3 + XAPICentOS 5.3Kernel (v2.6.32.43)OVS 1.4.2XCP-XAPI packagesDebian WheezyUbuntu 12.04 LTSCentOS 6.4 soon
  33. 33. Challenges for FOSS hypervisors
  34. 34. System characteristics cloud users care about:“Robustness, Performance & Security”Results XCP User Survey 2013 – users quoted these as most important attributes
  35. 35. 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
  36. 36. 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)
  37. 37. Next: XAPI Architecture DiagramBefore and After Disaggregation
  38. 38. 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
  39. 39. 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...
  40. 40. 40XSM is Xen equivalent of LSMFLASK is Xen equivalent of SELinuxDeveloped, maintained and contributed to Xen by NSACompatible with SELinux (tools, architecture)XSM object classes maps onto Xen featuresXen Security Modules (XSM) & FLASK
  41. 41. 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
  42. 42. 42Xen Security Advantages• Even without Advanced Security Features– Well-defined trusted computing base (much smaller than on type-2 HV)– Minimal services in hypervisor layer• Advanced Security Features– Xen has many Advanced Security Features– Most are not switched on by default– Although most are simple to use, some seen complicatedMore info: http://www.slideshare.net/xen_com_mgr/a-brief-tutorial-on-xens-advanced-security-features
  43. 43. ARM Hypervisor
  44. 44. ARM Servers Coming to Market4GB RAM, 4 cores per node3 x 6 x 4 x 4 = 288 cores per 4 RUXen for ARM Servers : Why ?Single node virtualization capabilityManageability
  45. 45. Fully functional for ARM v7 & v8ARM v7: Versatile Express, Arndale &Samsung ChromebookARM v8: Fast ModelXen 4.3 for ARM Servers
  46. 46. ARM SOCXen + ARM = a perfect MatchARM Architecture Features for VirtualizationHypervisor mode : EL2Kernel mode : EL1User mode : EL0GICv2GT2 stageMMUI/ODevice Tree describes …Hypercall Interface HVC
  47. 47. 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
  48. 48. One mode to rule them allx86: PVHVM P P VS VHx86: PV P P P PARM v7 & v8 P VH VH VHScope for improvementOptimal performanceHVM mode/domainPV mode/domain
  49. 49. What’s Next?
  50. 50. • Release candidates & Xen Test Days (June 5th)• 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, …Xen 4.3 Release (June 2013)More info: http://lists.xen.org/archives/html/xen-devel/2013-05/msg01134.html
  51. 51. “For about a year members of the Xen Project, the CentOS communityand large Xen Users have worked on bringing Xen and XAPI toCentOS 6”Driven by demand from the community :• Can run Xen on CentOS 6 today, but non-trivial• We wanted “YUM INSTALL XEN”• Mostly a packaging problem• Teams from CentOS, Citrix, Go Daddy & Rackspace• QA and usability sanity checksXen 4 + XAPI in CentOS 6 (June 2013)
  52. 52. “Growth is leading to more structure & more collaboration & more openness!”• Establishing a shared and open test infrastructure– Goal: Increase development velocity and quality• Improved usability and better distro-integration– Xen + XAPI in CentOS 6.4• More focus on downstreams– OpenStack and Xen Orchestra– Better libvirt and virt-manager integration• Changing the XAPI / XCP release model• Xen on ARM and collaboration with LinaroThe Xen Community is Changing
  53. 53. 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) … next one June 5th• Document Days (IRC at #xendocs) … the next one is June 24th• User (Sept 18, New Orleans) and Developer Summits (Oct 24-25, Edinburgh)• Hackathons – see http://blog.xen.org/index.php/2013/05/28/event-report-xen-hackathon-2013/Getting Started with Xen Projects
  54. 54. Thank You!Slides available under CC-BY-SA 3.0From www.slideshare.net/xen_com_mgr@lars_kurthFREENODE: lars_kurth• 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

×