28
Virtualization Introduction Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Simon COTER Principal Product Manager Oracle VM & VirtualBox [email protected] https://blogs.oracle.com/scoter November 21 st , 2016

02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

VirtualizationIntroduction

Copyright©2015,Oracleand/oritsaffiliates.Allrightsreserved.|

SimonCOTERPrincipalProductManagerOracleVM&[email protected]://blogs.oracle.com/scoter

November21st,2016

Page 2: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

SafeHarborStatementThefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.

2

Page 3: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Whatisvirtualization?

OperatingSystem

App.A App.B App.C App.D

Hardware

VirtualizationLayer

VirtualContainer

App.A App.B

Hardware

VirtualContainer

App.C App.D

‘Nonvirtualized’ systemAsingleOScontrolsallhardwareplatformresources

VirtualizedsystemItmakesitpossibletorunmultipleVirtualContainersonasinglephysicalplatform

Virtualizationisabroadterm(virtualmemory,storage,network,etc)Virtualizationbasicallyallowsonecomputertodothejobofmultiplecomputers,bysharingtheresourcesofa

singlehardwareacrossmultipleenvironments

Page 4: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Howdiditstart?

• Servervirtualizationhasexistedforseveraldecades– IBMpioneeredmorethan30yearsagowiththecapability

to“multitask”• Theinceptionwasinspecialized,proprietary,high-endserverand

mainframesystems• By1980/90serversvirtualizationadoptioninitiatedareduction

– Inexpensivex86hardwareplatforms– Windows/LinuxadoptedasserverOSs

Page 5: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

ComputingInfrastructure– 2000• 1machineà 1OSà severalapplications• Applicationscanaffecteachother• Bigdisadvantage:machineutilizationisverylow,mostofthetimesitisbelow

than25%

X86WindowsXP

X86Windows2003

X86Suse

X86RedHat

12%HardwareUtilization

15%HardwareUtilization

18%HardwareUtilization

10%HardwareUtilization

App App App App App App App App

Page 6: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Virtualizationagain…

x86serverdeploymentsintroducednewITchallenges:• Lowserverinfrastructureutilization(10-18%)• Increasingphysicalinfrastructurecosts(facilities,power,cooling,etc)• IncreasingITmanagementcosts(configuration,deployment,updates,etc)• Insufficientfailoveranddisasterprotection

Thesolutionforalltheseproblemswastovirtualizex86platforms

Page 7: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

ComputingInfrastructure- Virtualization• Itmatchesthebenefitsofhighhardwareutilizationwithrunningseveraloperatingsystems

(applications)inseparatedvirtualizedenvironments– Eachapplicationrunsinitsownoperatingsystem– Eachoperatingsystemdoesnotknowitissharingtheunderlyinghardwarewithothers

X86Multi-Core,MultiProcessor

70%HardwareUtilization

X86WindowsXP

App.A

X86Windows2003

App.B

X86SuseLinux

App.C

X86RedHatLinux

App.D

Page 8: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

EvolutionofSoftwaresolutions

• 1st Generation:Fullvirtualization(Binaryrewriting)– SoftwareBased– VMwareandMicrosoft

Time

• 3rd Generation:Silicon-based(Hardware-assisted)virtualization– Unmodifiedguest– VMwareandXenon

virtualization-awarehardwareplatforms

• 2nd Generation:Paravirtualization– Cooperativevirtualization– Modifiedguest– VMware,Xen

DynamicTranslation

VirtualMachine

Hardware

OperatingSystem

VirtualMachine…

Hypervisor

Hardware

VMVM

Hardware

VirtualMachine

VirtualMachine…

VirtualizationLogic

Hypervisor

Page 9: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

FullVirtualization

• 1st Generationofferingofx86/x64servervirtualization• Dynamicbinarytranslation

– Theemulationlayertalkstoanoperatingsystemwhichtalkstothecomputerhardware

– TheguestOSdoesn'tseethatitisusedinanemulatedenvironment

• AllofthehardwareisemulatedincludingtheCPU• TwopopularopensourceemulatorsareQEMUandBochs

EmulatedHardware

VirtualMachine

GuestO

SDeviceDrivers

App.A

App.B

App.C

Hardware

HostOS

DeviceDrivers

Page 10: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

FullVirtualization- Advantages

• Theemulationlayer– IsolatesVMsfromthehostOSandfromeachother– ControlsindividualVMaccesstosystemresources,preventinganunstableVMfromimpactingsystem

performance

• TotalVMportability– Byemulatingaconsistentsetofsystemhardware,VMshavetheabilitytotransparentlymovebetweenhosts

withdissimilarhardwarewithoutanyproblems• Itispossibletorunanoperatingsystemthatwasdevelopedforanotherarchitectureonyourownarchitecture

• AVMrunningonaDellservercanberelocatedtoaHewlett-Packardserver

Page 11: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

FullVirtualization- Drawbacks• Hardwareemulationcomeswithaperformanceprice• Intraditionalx86architectures,OSkernelsexpecttorunprivilegedcodeinRing0

– However,becauseRing0iscontrolledbythehostOS,VMsareforcedtoexecuteatRing1/3,whichrequirestheVMMtotrapandemulateinstructions

• Duetotheseperformancelimitations,paravirtualization andhardware-assistedvirtualizationweredeveloped

Application Ring3

OperatingSystem

Ring0

Traditionalx86Architecture

Application Ring3

GuestOS Ring1/3

VirtualMachineMonitor

Ring0

FullVirtualization

Page 12: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Para-Virtualization

• TheGuestOSismodifiedandthusrunkernel-leveloperationsatRing1(or3)– theguestisfullyawareofhowtoprocessprivilegedinstructions– thus,privilegedinstructiontranslationbytheVMMisnolonger

necessary– TheguestoperatingsystemusesaspecializedAPItotalktothe

VMMand,inthisway,executetheprivilegedinstructions• TheVMMisresponsibleforhandlingthevirtualizationrequests

andputtingthemtothehardware

VirtualMachineMonitor

VirtualMachine

GuestO

S

DeviceDrivers

App.A

App.B

App.C

SpecializedAPI

Hardware

Hypervisor

DeviceDrivers

Page 13: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Para-Virtualization• Today,VMguestoperatingsystemsareparavirtualized usingtwodifferentapproaches:

– RecompilingtheOSkernel• Paravirtualization driversandAPIsmustresideintheguestoperatingsystemkernel• YoudoneedamodifiedoperatingsystemthatincludesthisspecificAPI,requiringacompilingoperatingsystems

tobevirtualizationaware– Somevendors(suchasNovell)haveembracedparavirtualization andhaveprovidedparavirtualized OS

builds,whileothervendors(suchasMicrosoft)havenot– Installingparavirtualized drivers

• Insomeoperatingsystemsitisnotpossibletousecompleteparavirtualization,asitrequiresaspecializedversionoftheoperatingsystem

• Toensuregoodperformanceinsuchenvironments,paravirtualization canbeappliedforindividualdevices• Forexample,theinstructionsgeneratedbynetworkboardsorgraphicalinterfacecardscanbemodifiedbefore

theyleavethevirtualizedmachinebyusingparavirtualized drivers

Page 14: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Hardware-assistedvirtualization

• TheguestOSrunsatring0• TheVMMusesprocessorextensions(suchasIntel®-VTorAMD-V)to

interceptandemulateprivilegedoperationsintheguest• Hardware-assistedvirtualizationremovesmanyoftheproblemsthat

makewritingaVMMachallenge• TheVMMrunsinamoreprivilegedringthan0,avirtual-1ringis

createdVirtualMachineMonitor

VirtualMachine

GuestO

SDeviceDrivers

App.A

App.B

App.C

SpecializedAPI

Hardware

Hypervisor

DeviceDrivers

Page 15: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Hardware-assistedvirtualization

• Pros– ItallowstorununmodifiedOss(solegacyOScanberunwithoutproblems)

• Cons– SpeedandFlexibility

• AnunmodifiedOSdoesnotknowitisrunninginavirtualizedenvironmentandso,itcan’ttakeadvantageofanyofthevirtualizationfeatures– Itcanberesolvedusingparavirtualization partially

Page 16: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

ABriefHistoryofXenintheCloud

Oct‘03

XenPresentedatSOSP

XCP1.xCloudMgmt

‘08‘06

AmazonEC2andSlicehostlaunched

RackspaceCloud

Late 90s

XenoServer Project(CambridgeUniv.)

‘09 ‘11

XCPAnnounced

‘12

XCPpackagesinLinux

XenforARMbasedServersPVHmode

Linux3.0

Page 17: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• GuardianofXenHypervisorandrelatedOSSProjects• XenGovernancesimilartoLinuxKernel• Projects– XenHypervisor(ledby5committers,2fromCitrix)– XenCloudPlatformakaXCP(ledbyCitrix)– XenARM:Xenformobiledevices(ledbySamsung)– PVOPS:XencomponentsandsupportinLinuxKernel(ledbyOracle)

• 10+vendorscontributingmorethan1%totheproject(AWS,AMD,Citrix,GridCentric,Fujitsu,Huawei,iWeb,Intel,NSA,Oracle,Samsung,Suse,…)

Xen.org

Page 18: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 18

XenVariantsforServer&Cloud

XenHypervisor XCP

Increasedleveloffunctionalityandintegrationwithothercomponents

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

Products OracleVM HuaweiUVP CitrixXenServer

GetBinaries from… LinuxDistros LinuxDistros Debian &Ubuntu

ISO fromXen.org

Usedby… ManyOthers

Page 19: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Extendingtheconceptofvirtualizationfordesktops• Servers

– Hostedvirtualization- mainframes– VMMs/BareMetalhypervisors– OSvirtualization

• Desktops– Desktopvirtualization– Server-sideworkspacevirtualization– Client-sideworkspacevirtualization

• Applicationvirtualization– Applicationisolation– Applicationstreaming

Page 20: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

DesktopVirtualization• AVMMorhypervisorrunningonaphysicaldesktop

• Examplesinclude:– MicrosoftVirtualPC– OracleVMVirtualBox

– ParallelsDesktopforMac

– VMwareFusion

• Usecasesinclude:– EmulatingWindowsgamesontheMacintosh

– TestingcodeinsideVMs– Underpinningclient-sideworkspacevirtualization

• DesktophypervisorsandVMMsdon’tnecessarilyscaletomeetenterpriseneeds;that’swhymostoftheprovidershaveserverproductsaswell

Page 21: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Server-sideworkspacevirtualization• Aworkspace(desktopoperatingsystemwithcustomconfiguration)runninginsideavirtualmachine

hostedonaserver

• Examplesinclude:– VMwareVDI

• Usecasesinclude:– Centrallymanageddesktopinfrastructure

– Securityenforcementandlockdown

• Apoolofvirtualworkspacesresidesontheserver.RemoteuserslogintothemfromanynetworkeddeviceviaMicrosoft’sRemoteDesktopProtocol(RDP)

• Userscancustomizetheirvirtualworkspacetotheirheart’scontent,whileoperatorsenjoytherelativelystraightforwardtaskofmanagingdesktopconfigurationononecentralserver

• Connectionbrokersarbitratebetweenapoolofvirtualworkspacesresidingonacentralserver

• Thebiggestproblemwithserver-hostedworkspacevirtualizationisthatit’sabandwidthhog.Performanceisconstrainedbytheperformanceofyournetwork

Page 22: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Blade&Servers

• Manually installed servers, manually configured networks, manually configured operating systems, lightly automated deployments

Page 23: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

VirtualMachines

• Software installed servers (guests), partially automated networks, manually configured operating systems, lightly automated deployments

Page 24: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Containers:LXC&Docker• Software installed servers (guests),

fully automated network setup, automated OS setup, automated application setup, automated deployments, slice up VM into smaller units• Each unit appears to the application

as owning it’s own OS• In reality, all units share the same

kernel

Page 25: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

DevOps

• DevOps ("development" and "operations") aims at establishing a culture and environment where building, testing, and releasing software, can happen rapidly, frequently, and more reliably.

Page 26: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Vision:Virtualization&Container…….together

26

Page 27: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Q&A

27

Page 28: 02 Virtualization General - unimi.it · 2016-11-22 · –Xen ARM : Xen for mobile devices (led by Samsung) –PVOPS : Xen components and support in Linux Kernel (led by Oracle) •