linuxcon eu : virtualization in the cloud featuring xen and xcp

35
Lars Kurth Xen Community Manager [email protected] Virtualization in the Cloud: Featuring Xen @lars_kurth @xen_com_mgr FREENODE: lars_kurth

Upload: the-linux-foundation

Post on 19-May-2015

104.680 views

Category:

Technology


0 download

DESCRIPTION

The Xen Hypervisor was built for the Cloud from the outset: when Xen was designed, we anticipated a world, which today is known as cloud computing. Today, Xen powers the largest clouds in production. This talk explores success criteria, architecture, trade-offs and challenges for cloudy hypervisors. It is intended for users and developers and starts with a brief introduction to Xen and XCP, their architecture, shine some light on common challenges for KVM and Xen, such as the NUMA performance tax and securing the cloud. It will introduce the concept of domain disaggregation as an approach to increase security, robustness and scalability: all important factors for building clouds at scale. The talk will conclude with an update on Xen support in Linux, Xen for ARM servers and other exciting developments in the Xen community and their implications for building open source clouds.

TRANSCRIPT

Page 1: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Lars KurthXen Community Manager

[email protected]

Virtualization in the Cloud:Featuring Xen

@lars_kurth@xen_com_mgrFREENODE: lars_kurth

Page 2: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

A Brief History of Xen in the Cloud

The XenoServer project is buildingpublic infrastructure for wide-area distributed computing. We envisage a world in which XenoServer execution platforms will be scattered across the globe and available for any member of the public to submit code for execution.

Global Public Computing

“This dissertation proposes a new distributed computing paradigm, termed global public computing, which allows

any user to run any code anywhere. Such platforms price computing resources, and ultimately charge users for resources consumed.“

Evangelos Kotsovinos, PhD dissertation, 2004

Late 90s

XenoServer Project(Cambridge Univ.)

Page 3: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

A Brief History of Xen in the Cloud

Oct ‘03

Xen Presented at SOSP

XCP 1.xCloud Mgmt

‘08‘06

Amazon EC2and Slicehostlaunched

RackspaceCloud

Late 90s

XenoServer Project(Cambridge Univ.)

‘09 ‘11

XCPAnnounced

‘12

XCP packagesin Linux

Xen for ARMbased ServersPVH mode

Linux 3.0

Page 4: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

The Xen Hypervisor was designed for the Cloud straight from the outset!

Page 5: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

• Guardian of Xen Hypervisor and related OSS Projects• Xen Governance similar to Linux Kernel• Projects

– Xen Hypervisor (led by 5 committers, 2 from Citrix)– Xen Cloud Platform aka XCP (led by Citrix)– Xen ARM : Xen for mobile devices (led by Samsung)– PVOPS : Xen components and support in Linux Kernel (led by Oracle)

• 10+ vendors contributing more than 1% to the project(AWS, AMD, Citrix, GridCentric, Fujitsu, Huawei, iWeb, Intel, NSA, Oracle, Samsung, Suse, …)

Xen.org

Page 6: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Xen Overview

Page 7: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Hypervisor ArchitecturesType 1: Bare metal HypervisorA pure Hypervisor that runs directly on the hardware and hosts Guest OS’s.

Type 2: OS ‘Hosted’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.

Provides partition isolation + reliability, higher security

Low cost, no additional drivers Ease of use & installation

Host HWMemory CPUsI/O

Host HWMemory CPUsI/O

HypervisorScheduler

MMUDevice Drivers/Models

VMn

VM1

VM0

Guest OSand Apps

Host OS

Device DriversRing-0 VM Monitor “Kernel “

VMn

VM1

VM0

Guest OSand Apps

UserApps

User-level VMM

Device Models

Page 8: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Xen: Type 1 with a Twist

8

Control domain (dom0)

Host HW

VMn

VM1

VM0

Guest OSand Apps

Memory CPUsI/O

Thinner hypervisor• Functionality moved to Dom0

Using Linux PV OPS• Using Linux Device Drivers• PV, PV on HVM and PVH modes• Sharing components with KVM

In other words• Re-use of Dom0 kernel components• Ease of use & Installation • Isolation & Security

Drivers

Device Models

Linux & BSD

HypervisorScheduler MMU XSM

Page 9: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Xen and Linux• Xen Hypervisor is not in the Linux kernel• BUT: everything Xen and Xen Guests need to run is!• Xen packages are mostly in Linux distros

– 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

Page 10: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Basic Xen Concepts

10

Control domain (dom0)

Host HW

VMn

VM1

VM0

Guest OSand Apps

Console

Memory CPUsI/O

One or moredriver, stub or service domains

Control Domain aka Dom0• Dom0 kernel with drivers• Xen Management Toolstack• Trusted Computing Base

Guest Domains• Your apps• E.g. your cloud management stack

Driver/Stub/Service Domain(s)• A “driver, device model or control

service in a box”• De-privileged and isolated• Lifetime: start, stop, kill

Dom0 Kernel

Toolstack

HypervisorScheduler MMU XSM

Page 11: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

11

Xen Variants for Server & CloudXen Hypervisor XCP

Increased level of functionality and integration with other components

Default / XL (XM)Toolstack / Console Libvirt / VIRSH XAPI / XE

Products Oracle VM Huawei UVP Citrix XenServer

Get Binaries from … Linux Distros Linux Distros Debian & Ubuntu

ISO from Xen.org

Used by … ManyOthers

More info: xen.org/community/presentations.html

Page 12: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Xen : Types of Virtualization

Page 13: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

13

PV Domains

Xen Hypervisor

Control domain (dom0)

Host HW

Guest VMn

Apps

Memory CPUsI/O

Technology:• Paravirtualization

Linux PV guests have limitations:• limited set of virtual hardware

Advantages• Fast• Works on any system

(even without virt extensions)

Driver Domains• Security• Isolation• Reliability and Robustness

HW Drivers

PV Back Ends PV Front Ends

Driver Domaine.g. • Disk• Network

HW Driver

PV Back End

Dom0 Kernel*

*) Can be MiniOS

PV Domains & Driver Domains

Guest OSDom0 Kernel

Page 14: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

14

HVM

Xen Hypervisor

Dom0

Host HW

Guest VMn

Technology:• Shows emulation using QEMU/Device Model

(SW Virtualization)• In other situation HW can be usedDisadvantages• Emulation slower than PV

(mainly I/O devices)

Advantages• No kernel support needed

Stub Domains• Security• Isolation• Reliability and Robustness

Device Model

HVM & Stub Domains

IO Emulation

IO Event

VMEXIT

Stubdomn

Device Model

Mini OS

Guest VMn

IO Emulation

IO Event

VMEXITDom0 Kernel

Page 15: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

The Virtualization Spectrum

Fully Virtualized (FV) VS VS VS VH

FV with PV disk & network P VS VS VH

PVHVM P P VS VH

PVH x86 P P P VH

PVH ARM v7+ P VH P VH

Fully Paravirtualized (PV) P P P P

VH Virtualized (HW)

P Paravirtualized

VS Virtualized (SW)

HVM mode/domain

PV mode/domain

Disk an

d Net

workInte

rrupts,

Timer

sEm

ulated

Moth

erboard

,

Le

gacy

bootPriv

ilege

d Instr

uctions

an

d page t

ables

Xen 4.3

Xen 4.3

Page 16: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

The Virtualization Spectrum

Fully Virtualized (FV) VS VS VS VH

FV with PV disk & network P VS VS VH

PVHVM P P VS VH

PVH x86 P P P VH

PVH ARM v7+ P VH P VH

Fully Paravirtualized (PV) P P P P

Scope for improvement

Poor performance

Optimal performance

HVM mode/domain

PV mode/domain

Disk an

d Net

workInte

rrupts,

Timer

sEm

ulated

Moth

erboard

,

Le

gacy

bootPriv

ilege

d Instr

uctions

an

d page t

ables

Xen 4.3

Xen 4.3

Page 17: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

• Solves a number of historical problems with PV and HVM– AMD 64 bit and x86-64 architecture is not a good match for PV for Privileged Instructions

and Page Tables– Will allow to simplify the Xen and PVOPS architecture in the longer term

• Fastest of PV and HVM on all architectures– No need for emulation– Uses HW virtualization where it is fastest– Uses PV where PV is fastest– Should provide the best trade-offs for most work-loads

PVH Benefits

More info: wiki.xen.org/wiki/Virtualization_Spectrum & More info: xen.org/xensummit/xs12na_talks/M9.html

Page 18: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

XCP Project

Page 19: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

XCP – Xen Cloud Platform

Complete stack for server virtualization• Extends Xen to cover multiple hosts• Adds further functionality and integrations for cloud, storage and networking to Xen HV• GPLv2• XenServer is a commercial XCP distro

Two Flavours• Appliance (ISO using CentOS Dom0)• Packages in Debian & Ubuntu (more distros to come)

Page 20: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Major XCP Features• VM lifecycle: live snapshots, checkpoint, migration • Resource pools: flexible storage and networking• Event tracking: progress, notification • Upgrade and patching capabilities • Real-time performance monitoring and alerting• Built-in support and templates for Windows and Linux guests• Open vSwitch support built-in (default)

More info: wiki.xen.org/wiki/XCP_Release_Features

Page 21: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

• Internal Improvements: Xen 4.1.2, CentOS 5.7 with kernel 2.6.32.43, Open vSwitch 1.4.1• New format Windows drivers: installable by Windows Update Service• Networking: Better VLAN scalability, LACP bonding, IPv6• More guest OS templates: Ubuntu Precise 12.04, RHEL/CentOS, Oracle Enterprise Linux 6.1 & 6.2, Windows 8• Storage XenMotion:

– Migrate VMs between hosts or pools without shared storage– Move a VM’s disks between storage repositories while the VM is running

XCP 1.6 Beta

More info: xen.org/download/xcp/releasenotes_1.6.0.html & More info: xen.org/download/xcp/index_1.6.0.html

Page 22: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

XCP and Cloud Orchestration Stacks

Page 23: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Challenges for FOSS hypervisors

Page 24: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

“Security and QoS/Reliability are amongst the top 3 blockers for cloud adoption”

www.colt.net/cio-research

Page 25: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

System characteristics cloud users care about: “Robustness, Performance, Scalability & Security”Results XCP User Survey 2012 – 90% of users quoted these as most important attributes

Page 26: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

• 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”

• Unique benefit of the Xen architecture– Robustness: ability to safely restart parts of the system

(e.g. just 275ms outage from failed Ethernet driver)– Performance: lightweight, Xen scheduler– Scalability: more distributed system (less reliable on Dom0)– Security: Minimum privilege; Narrow interfaces; Restart domains

• Used today by Qubes OS and Citrix XenClient XT• Prototypes for XCP and XenServer

Disaggregation

Page 27: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

CPUCPURAM RAMNIC

(or SR-IOV VF)

NIC(or SR-IOV VF)

NIC(or SR-IOV VF)

NIC(or SR-IOV VF)

RAID

Xen

Dom0Network drivers

NFS/iSCSI drivers

Qemu xapi Local storage drivers

NFS/iSCSI drivers

Network drivers

Qemu

eth eth eth eth scsi

User VM User VM

NB gntdev NB

NF BF NF BF

qemu qemu

xapivswitch

networkd

tapdiskblktap3

storaged

syslogd

vswitch

networkd

tapdiskblktap3

storaged

tapdiskblktap3

storaged

gntdev gntdev

Dom0

xenopsdlibxl

healthd

Domain manager

Dom0

.

.

.

.

Page 28: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

CPUCPURAM RAMNIC

(or SR-IOV VF)

NIC(or SR-IOV VF)

NIC(or SR-IOV VF)

NIC(or SR-IOV VF)

RAID

Xen

Dom0 Network driver

domain

NFS/iSCSI driver

domain

Qemudomain

xapi domain

Logging domain

Local storage

driver domain

NFS/iSCSI driver

domain

Network driver

domain

Qemudomain

eth eth eth eth scsi

User VM User VM

NB gntdev NB

NF BF NF BF

dbus over v4v

qemu qemu

xapixenopsd

libxl

healthd

Domain manager

vswitch

networkd

tapdiskblktap3

storaged

syslogd vswitch

networkd

tapdiskblktap3

storaged

tapdiskblktap3

storaged

gntdev gntdev

Page 29: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

29

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)– Developed, maintained and contributed to Xen by NSA– Generalized Security Framework for Xen– Compatible with SELinux (tools, architecture)– XSM object classes maps onto Xen features

• XSM together with Disaggregation– Security sensitive Desktop use-cases developed for the NSA

Page 30: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

CPUCPURAM RAMNIC

(or SR-IOV VF)

NIC(or SR-IOV VF)

NIC(or SR-IOV VF)

NIC(or SR-IOV VF)

RAID

Xen

Dom0 Network driver

domain

NFS/iSCSI driver

domain

Qemudomain

xapi domain

Logging domain

Local storage

driver domain

NFS/iSCSI driver

domain

Network driver

domain

Qemudomain

eth eth eth eth scsi

User VM User VM

NB gntdev NB

NF BF NF BF

dbus over v4v

qemu qemu

xapixenopsd

libxl

healthd

Domain manager

vswitch

networkd

tapdiskblktap3

storaged

syslogd vswitch

networkd

tapdiskblktap3

storaged

tapdiskblktap3

storaged

gntdev gntdev

XSM policyrestricting access

Page 31: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

News from the Xen Community

Page 32: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

• New PVH virtualization mode (Oracle)– Patches being up-streamed to Xen and Linux (3.7 & 3.8) as we speak– Sweet spot for performance

• Xen for ARM servers (using new PVH mode)– Cortex A15/ ARM v7: can start guests on Versatile Express; Samsung Chromebook next– ARM v8: porting work started on simulator and patches being up-streamed

• New Xen ports– FreeBSD Xen port (SpectraLogic & HP)– Xen MIPS port (by BroadCom)

• Language run-times running on bare-metal Xen– ErlangOnXen.org , Openmirage.org

Cool new functionality & initiatives

More info: wiki.xen.org/wiki/Xen_Roadmap/4.3 & wiki.xen.org/wiki/XCP_Roadmap

Page 33: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Summary: Why Xen?

Page 34: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

• Designed for the Cloud : many advantages for cloud use!– Resilience, Robustness & Scalability – Security: Small surface of attack, Isolation & Advanced Security

Features

• Widely used by Cloud Providers and Vendors

• XCP– Ready for use with cloud orchestration stacks – Packages in Linux distros: flexibility and choice

• Open Source with a large community and eco-system– Exciting new developments in the pipeline

Page 35: Linuxcon EU : Virtualization in the Cloud featuring Xen and XCP

Questions …Slides available under CC-BY-SA 3.0From www.slideshare.net/xen_com_mgr

@lars_kurth@xen_com_mgr

FREENODE: lars_kurth

• IRC: ##xen @ FREENODE• Mailing List: xen-users & xen-api (lists.xen.org)• Wiki: wiki.xen.org• Ecosystem pages:

xen.org/community/ecosystem.html• Presentations & Videos:

xen.org/community/presentations.html

• Xen Day Barcelona @ LinuxCon, Nov 8th :xen.org/community/events/xendaybarcelona2012.html