关闭

关闭

封号提示

内容

首页 虚拟机技术简介.pdf

虚拟机技术简介.pdf

虚拟机技术简介.pdf

上传者: huainian66 2011-12-16 评分 5 0 194 26 883 暂无简介 简介 举报

简介:本文档为《虚拟机技术简介pdf》,可适用于IT/计算机领域,主题内容包含年月日诸葛建伟ERCIS,ICST,PKUAnIntroductiontoVirtualMachine虚拟机技术简介年月日内容虚拟化技术基本概念与发符等。

年月日诸葛建伟ERCIS,ICST,PKUAnIntroductiontoVirtualMachine虚拟机技术简介年月日内容虚拟化技术基本概念与发展历程虚拟机技术分类虚拟机技术实现机制虚拟机技术引领者-VMwareDrMendelRosenblum:What’sahead年月日关于“虚拟虚拟机虚拟化”的词汇†你可能听说接触过的相关词汇„虚拟内存、虚拟光驱、虚拟网卡、虚拟磁盘、虚拟CPU„虚拟机:VMware,VirtualPC,Java虚拟机,Bochs,Qemu,UML,Xen,KVM,etc…„虚拟主机(Virtualhosting)„虚拟网络:虚拟局域网(VLAN)、虚拟专有网(VPN)、虚拟内网(VNN)„虚拟货币、虚拟资产、虚拟世界、虚拟现实、虚拟人生†EverythingcanbevirtualVirtualBrain年月日什么是虚拟化†虚拟化(Virtualization)„创建某种事物的虚拟(非真实)版本的方法和过程„thecreationofavirtual(ratherthanactual)versionofsomethingWhatiscom†虚拟(Virtual)„通常用于区分纯粹概念上的事物和拥有物理实体的事物„Ingeneral,itdistinguishessomethingthatismerelyconceptualfromsomethingthathasphysicalreality„反义词:真实的,实际的,物理的,绝对的„Opposite:real,actual,physical,absolute年月日什么是计算领域中的虚拟化†计算领域中的虚拟化whatiscomwebopedia„创建某种计算资源的虚拟版本的方法和过程„某种事物Æ某种计算资源„示例:处理器,内存,磁盘,完整的计算机,网络,等†计算领域中的虚拟化wikipedia„在计算领域中虚拟化是一个含义广泛的词汇指的是对计算机资源的抽象化(abstraction)虚拟化对计算机资源的用户(应用程序或终端用户)隐藏了它们的物理特性。„IBMWhitepaper:Virtualizationineducation年月日Abstraction,Interface,Architecture,Implementation†抽象化(Abstraction)„Incomputerscience,abstractionisamechanismandpracticetoreduceandfactoroutdetailssothatonecanfocusonafewconceptsatatime†接口(Interface)„Separateslevelsofabstraction,facilitatesindependentsubsystemdevelopmentbybothhardwareandsoftwareteams†体系框架(Architecture)„Referstoaformalspecificationofaninterfaceinthesystem,includingthelogicalbehaviorofresourcesmanagedviatheinterface†实现(Implementation)„Describestheactualembodimentofanarchitecture年月日Abstraction对于CS发展的巨大意义†克服复杂性„计算机系统结构已无比复杂„能够很好地工作„有条不紊地继续发展新的计算机理论和技术†促进多样性„接口规范和标准化„有效的社会分工全才Æ专业人才„生态环境的多样性Æ稳定性†示例„Intel,AMD设计和开发CPU实现IntelIA(x)指令集规范接口„M$设计和开发Windows操作系统,提供API接口和VisualStudio等开发环境,编译二进制指令符合x指令集规范接口„Win平台应用软件开发者使用API接口VS编写应用软件年月日ArchitectedInterfaces†ISA:InstructionSetArchitecture„Interface:systemISA,visibleonlytoOSformanagingHW„Interface:userISA,visibletoanapplicationprogram†ABI:ApplicationBinaryInterface„Interface:systemcallinterface„Interface:userISA†API:ApplicationProgrammingInterface„Interface:highlevellanguage(HLL)librarycalls„Interface:userISAFigure:ComputerSystemArchitecture年月日抽象化VS虚拟化†抽象化带来的问题„Lackofinteroperability(互操作性)„根据特定接口和体系框架设计实现的系统和组件无法直接在另外接口上运行†虚拟化„虚拟化可以从真实系统构建虚拟版本„可以将一种抽象接口转换成另外一种抽象接口„与抽象化不同:虚拟化并不一定隐藏细节Figure:Abstractionandvirtualizationappliedtodiskstorage年月日虚拟化技术的提出与复兴†“Zerogeneration”:MainframeVirtualization„:IBMmainframes(CP,MX,S,CP,CPCMS,S,VM)–timesharing,virtualmemory,runVMunderVM,tomultiplexsuchascarceresourceamongmultipleapplications„:IEEEComputer“SurveyofVirtualMachineResearch”†s,s:VMMsdisappearedduetomodernmultitaskingoperatingsystemscheaperhardware†:Revivalofvirtualization–JavaVM(),VirtualPC(Connectix,),VMware()年月日WhytheRevival†多任务操作系统硬件价格下降导致问题„机器数量的泛滥导致资源利用率低„操作系统的复杂性导致其脆弱性†oneapplicationrunningpermachine„减少系统崩溃和入侵造成的影响„带来硬件需求增加,资源利用率低„增加了硬件费用、管理和能源负担†WhytheRevivalofVirtualMachine„Multiplexinghardware:serverconsolidationandutilitycomputing„moreasolutionfor:easeofmanagement,security,reliability年月日VirtualizationBenefits:DecouplingHWandSW†tremendouscontroloverhowGuestOSsuseHWresource†uniformviewofunderlyinghardware„将硬件视为物理资源池可以按需运行任意服务†completeencapsulation„mapremap,suspendresumecheckpointrevert,migratereplicate„loadbalancing„robustmodelfordealingwithhardwarefailures„supportsaverygeneralmobilitymodel†totalmediationofallinteractionsbtwHWandSW„Multiplexingofmanyvirtualmachinesonasinglehardwareplatform„strongisolation:valuableforreliabilityandsecurity年月日虚拟化技术的复兴:firstgeneration†ThefirstGeneration:xvirtualization()„:VirtualPCforMacintoshbyConnectix„:DianeGreene和MendelRosenblum利用Stanford研究成果创建VMware公司申请专利技术„:VMwareVirtualPlatform(Workstation)forx„:VMwareGSXServerproduct(Server,freerelease)„:M$acquiredConnectix(VirtualPCVirtualServer),EMCacquiredVMwarefor$million„FullVirtualizationwithBinaryTranslation年月日†ThesecondGeneration:HardwareOSassistedVirtualization()†Hardwareassistedvirtualization„:Intel’sIVT(VanderpoolSilvervale)„:AMD’sAMDV(Pacifica)„NativeVirtualization†OSassistedvirtualization(paravirtualization)„:DenalibyWashingtonU„:XenbyXenSource(fromUofCamb)„:VirtualMachineInterfacebyVMware„:XenSourceisalsodevelopingacompatibilitylayerforM$WindowsServer„paravirtualization†VirtualInfrastructure:thirdgeneration„:VirtualInfrastructurebyVMware虚拟化技术的复兴:secondgeneration年月日内容虚拟化技术基本概念与发展历程虚拟机技术分类虚拟机技术实现机制虚拟机技术引领者-VMwareDrMendelRosenblum:What’sahead年月日WhatisaVirtualMachine†VirtualMachine„virtualversionofa“machine”†Whatisa“Machine”then„Considerthemeaningfrombothaprocessandsystemperspective†Fromtheprocess’sperspective„AlogicalmemoryaddressspaceUserlevelinstructionsandregistersIO(onlyvisiblethroughtheoperatingsystemcalls)„Thus,ABIdefinesthemachineasseenbyaprocess,APIspecifiesthemachineasseenbyHLLprogram†FromtheOS’sperspective„theunderlyinghardware’scharacteristicsalonedefinethemachine„ISAprovidestheinterfacebetweenthesystemandmachine年月日ProcessVMSystemVM†ProcessVM„AprocessVMisavirtualplatformthatexecutesanindividualprocess„JavaVM,FVMSandbox,etc†SystemVM„asystemVMprovidesacomplete,persistentsystemenvironmentthatsupportsanoperatingsystemalongwithitsmanyuserprocesses„VMware,Qemu,etc†Basicconcepts„guest,host,runtime,VMMFigure:ProcessandsystemVMs年月日ProcessVMs†Multiprogrammedsystems多任务操作系统„MostOSsimultaneouslysupportmultipleuserprocessesthroughmultiprogramming„mostcommonprocessVM†EmulatorsandDynamicBinaryTranslators„支持针对特定ISA编译的二进制程序在其他ISA上执行„解释执行(interpretation)„DynamicBinaryTranslator:动态二进制代码翻译(dynamicbinarytranslation)†SameISAbinaryoptimizerstranslators„在二进制代码解释执行翻译过程进行代码优化:Dynamo„相同ISA,不同ABI的代码解释翻译:Wine†HighlevellanguageVMs高级语言虚拟机„crossplatformportability:JavaVM,NETframework年月日HLLVMs-高级语言虚拟机†HLLVMs„Fullcrossplatformportability„在高级编程语言开发环境中直接考虑对processVM的支持†传统的平台相关编译环境VS高级语言虚拟机环境„传统平台相关编译环境:发布生成二进制文件,限于特定的ISAOS„高级语言虚拟机环境:发布虚拟ISA可移植的代码和元数据,通过VM解释器编译器生成运行平台的二进制指令Figure:highlevellanguageenvironments年月日SystemVM年月日SystemVMs†Classicsystem(hypervisor)VMs„ss,VMM直接运行于物理硬件之上„VMM运行于最高权限,guestOS运行于受限权限„VMM劫持和仿真guestOS操作访问操纵关键硬件资源„回归:VMwareESXServer†HostedVMs„VMM运行在宿主操作系统上„优势†VMM安装普通应用软件†可依赖于宿主操作系统提供设备驱动和其他底层服务„VMwareWorkstationServer,Xen…年月日SystemVMs()†WholesystemVMs„hostandguestsystemsdonothaveacommonISA„ISA:x,PowerPC,ARM,IA(Itanium)„VMM需要仿真应用程序和操作系统代码„Example:VirtualPC,QEMU,etc†CodesignedVMs„codesignedVMs使用新的、专属的ISA,以提升性能降低能源使用等为目标„VMM一般和硬件协同设计,实现紧耦合„Example†IBMAS():providesupportforanobjectbasedinstructionset†TransmetaCrusoe():HostISAverylonginstructionwordarchitectureGuestISA–xAdv:powersaving年月日VirtualMachineTaxonomyFigure:Virtualmachinetaxonomy年月日内容虚拟化技术基本概念与发展历程虚拟机技术分类虚拟机技术实现机制虚拟机技术引领者-VMwareDrMendelRosenblum:What’sahead年月日SystemVMM实现需求和目标†SystemVMM实现需求„向GuestOS提供与真实硬件相类似的硬件接口„硬件接口:CPU,Memory,IO(Disk,Network,Peripheralequipment)†SystemVMM实现目标„Compatibility:abilitytorunlegacysoftware„Performance:lowvirtualizationoverhead„Simplicity:secureisolation(befreeofbugs),reliability(withoutVMMfailure)„Varioustechniques,eachofferingdifferentdesigntradeoffs年月日CPUVirtualization†ACPUarchitectureisvirtualizable„ifitsupportsthebasicVMMtechniqueofdirectexecution†directexecution„在VMM保持对CPU的最终控制权前提下能够让虚拟机中的指令直接在真实主机上运行„实现directexecution需要:†virtualmachine’sprivilegedandunprivilegedcode:CPU’sunprivilegedmode†VMM:CPU’sprivilegedmode†virtualmachineperformsprivilegedoperation:CPUtrapsintotheVMM,emulatestheprivilegedoperationonthevirtualmachinestate†提供可虚拟化的CPU体系框架的关键„提供trapsemantics,使得VMM可以安全的、透明地、直接的使用CPU执行虚拟机年月日CPUVirtualizationChallenge†大部分modernCPU并不支持可虚拟化,如x†需直接访问内存和硬件的操作系统特权代码必须在Ring执行†CPU虚拟化必须在GuestOS下面添加VMM(Ring)†一些关键指令在非Ring权限级执行具有不同语义:不能有效虚拟化,如POPF指令†非特权级指令可以查询CPU的当前特权级,x并不trap这些指令Figure:xprivilegelevelarchitecturewithoutvirtualization年月日CPUVirtualizationTech:Fullvirtualizationusingbinarytranslation†directexecutioncombinedwithfastbinarytranslation„运行普通程序代码的CPU模式可虚拟化:直接运行†Highperformance„不可虚拟化的特权级CPU模式:binarytranslator†fast:sameISA,negligibleoverhead†dynamiconthefly:oppositeparavirtualization†Compatible:guestOSisnotaware,runlegacysoftwaremainadv†Fullvirtualization是无需硬件和OS支持实现对特权指令虚拟化唯一选择Figure:thebinarytranslationapproachtoxvirtualization年月日CPUVirtualizationTech:Paravirtualization†Paravirualization„alongsidevirtualization„OSassistedvirtualization„VMM设计者需要定义虚拟机接口将不可虚拟化的指令替换为可虚拟化可高效直接执行的等价指令„Adv:消除trap等虚拟化overhead,性能高效„Disadv:不兼容,需要修改操作系统,对商业OS第三方无法移植†Xen,WindowsSvr,VMwareVirtualMachineInterfaceFigure:theparavirtualizationapproachtoxvirtualization年月日CPUVirtualizationTech:NativeVirtualizationhardwareassistedFigure:thenativevirtualizationapproachtoxvirtualization年月日CPUVirtualizationTech:NativeVirtualizationhardwareassisted†VirtualizableCPU„随着虚拟化技术复兴,硬件厂商快速跟进并推出简化虚拟化技术的CPU新特性„IntelVirtualizationTechnology(VTx)„AMD’sAMDV†针对特权代码的虚拟化„在Ring之下增加一个新的rootmode(VMM)„特权代码会自动trap至hypervisor,无需paravirtualization或dynamictranslation„gueststate存储于VirtualMachineControlStructures(VTx)VirtualMachineControlBlocks(AMDv)„Disadv:highhypervisortoguesttransitionoverhead„VMwarelimitedcases(bitguestsupport),Xen年月日CPUVirtualization:SummaryAverageAverageLowSimplicityAverageExcellentGoodPerformanceExcellentPoorExcellentCompatibilityNativeVirtualizationParavirtualizationDynamicTranslation†ThreeCurrentCPUVirtualizationTechs„DynamicTranslation,Paravirtualization,NativeVirtualization„UniqueAdvsandDisadvs„Trends†More,betterhardwareassistance:betterperformance†More,betterOSassistance:standardvirtualmachineinterface,improveCompatibilityforparavirtualization†Multimode,flexiblearchitecture,selectbestmodefortheworkloadMorereading:KeithAdams,OleAgesen,AComparisonofSoftwareandHardwareTechniquesforxVirtualization,ASPLOS’年月日MemoryVirtualizationRequirements†sharingthephysicalsystemmemoryanddynamicallyallocatingittovirtualmachines†Tradeoffbetweenisolationandsharing„Isolationforsecurityandreliability„Sharingforperformance†Pagethevirtualmachinetodisk„Likeatraditionaloperatingsystem’svirtualmemorysubsystems年月日MemoryVirtualizationTechnique†similartothevirtualmemorysupportbymodernOS„pagetables:mappingsofvirtualmemorytophysicalmemory„Memorymanagementunit(MMU),translationlookasidebuffer(TLB)†shadowpagetablesformemorytranslation:shadowphysicalmemoryÆactualmachinememoryFigure:memoryvirtualizationtechnique年月日MemoryVirtualizationChallengesAdvancedTechniques†Twolevelsofmemorytranslationcausesperformanceoverhead„Fromshadowpagetablestodirectpagetables†VMMusesTLBtomapthevirtualmemorydirectlytothemachinememory†maintainingMMUupdatesduetomappingchanges†pagingoutmemorypagestodisk„GuestOShavemuchinfoaboutwhichpagesaregoodcandidates„paravirtualizationlikeapproach:balloonprocess†Runningmultiplevirtualmachineswasteconsiderablememoryduetoredundant„contentbasedpagesharing„normalcopyonwritepagesharingscheme年月日MemoryVirtualizationNewFeature†Hardwareassistedpaging„IntelExtendedPageTables(EPT):March„AMDNestedPageTables(NPT):March„XenandtheArtofVirtualizationRevisited,IanPratt,NSDIKeynote,Apr†CurrentimplementationsseemtodoratherworsethanshadowPTs(eg)†HWwillimprove:TLBswillgetbigger,cachingmoreelaborate,prefetchmoreaggressive年月日IOVirtualization†IOVirtualizationRequirements„IO:Network,Disk,otherdevices„managingtheroutingofIOrequestsbetweenvirtualdevicesandthesharedphysicalhardware†ClassicApproachins„NativeIO:achannelbasedarchitecture„aseparatechannelprocessor:safelyexportIOdeviceaccessdirectlytothevirtualmachine„Advs:verylowvirtualizationoverheadforIO„WorkedwellfortheIOdevicesofthattime:textterminals,disks,cardreaders,andcardpunches年月日IOVirtualizationChallenge†RicherandmorediversecollectionofIOdevices„makevirtualizingIOmuchmoredifficult†somedeviceshaveextremelyhighperformancerequirements„graphicssubsystemornetworkinterface„evenmorecriticalprerequisite:lowoverheadvirtualizationFigure:IOvirtualization年月日IOVirtualizationTech:SoftwarebasedIOVirtualization†UsesdevicedriversofHostOS†Example:„GuestOS:readswritesblocksfromvirtualdisk„VMM:translatestofilereadswrites„HostOS:nativediskreadswrites†Advs:„SimpletoinstallVMM„fullyaccommodatestherichdiversityofIOdevices„VMMcanusethescheduling,resourcemanagement,andotherservicestheHostOSenvironmentoffers„offersrichsetoffeatures†Disadvs:„JustforhostedVM„Performanceoverhead„LackofresourcemanagementsupportFigure:softwarebasedIOvirtualization年月日IOVirtualizationTech:HypervisorDirectIOVirtualization†Requirements„Sophisticatedschedulingandresourcemanagement„highlyoptimizedIOperformancefornetworkandstoragedevices†Runningdirectlyonthehardware„VMwareESXServer:usedevicedriversfromtheLinuxkernel„Paravirtualization:theabilitytoexportspecialhighlyoptimizedvirtualIOdevicesthatdon’tcorrespondtoanyexistingIOdevicesFigure:hypervisordirectIOvirtualization年月日IOVirtualizationTech:PassthroughIOVirtualization†Guestdrivesdevicedirectly„WithoutCPU,EffectivelyeliminatingIOvirtualizationoverhead„achievehighperformanceIOdevicevirtualization„DiscreteIOdevicesÆchannellikeIOdevices†supportmultiplevirtualinterfaces†PSÆUSB,IDEÆSCSI,SATA†IOdevicesperformDMArequiresmemoryremapping†routingdevicecompletioninterruptstothecorrectvirtualmachine†Benefits:Performance,improvedsecurityandreliabilitygainedfromremovingdevicedrivers†FutureHardwarefeaturesupports„IOMMUforDMAaddresstranslationandprotection(IntelVTd,AMDIOMMU)„PartitionableIOdeviceforsharing(PCISIGIOVSRMRspecification)Figure:passthroughIOvirtualization年月日IOVirtualizationSummary†Tradeoffbetweenfunctionalityandefficiency„VirtualizedIOprovidesrichfunctionality†SoftwarebasedSplit†DypervisorDirect„PassthroughIOminimizesCPUutilizationFigure:VirtualizedIOVSpassthroughIO年月日内容虚拟化技术基本概念与发展历程虚拟机技术分类虚拟机技术实现机制虚拟机技术引领者-VMwareDrMendelRosenblum:What’sahead年月日VMwareInc†虚拟化技术引领者-VMWareInc„Foundedat,fromStanford„年被EMC公司收购„全球虚拟化市场-EMCVMware过半市场份额,M$Connectix,CitrixXen,Sun,Oracle†VMware大佬们„PresidentCEO:DianeGreene,Berkeley„ChiefScientist:DrMendelRosenblum,Standford年月日VMware的虚拟机技术†HostedArchitecture:ACE,Workstation,Server†HypervisorArchitecture:ESXServer†CPUVirtualization:FullVirtualizationwithBTParaVirtualizationNativeVirtualizationMultiModeVMMArchitecture†MemoryVirtualization:shadowpagetables†IOVirtualization:softwarebased,hypervisordirectforstoragenet年月日VMware’sparavirtualization†Xen’sparavirtualization„Paravirtualizedoperationsystem†majorLinuxdistributionsarestartingtobundleparavirtualizationintotheOSkernel†WindowsServer„strongdependencybetweenparavirtualizedOSwithhypervisor„Deliversperformancebenefitswithmaintenancecostsandincompatibility†VMware’sTransparentParavirtualization„proposedstandardcommunicationmechanismbetweenGuestOSandhypervisor:VirtualMachineInterface„Balancesperformancebenefitswithmaintenancecosts年月日VirtualMachineInterface†VMIstandard„layerbetweenthehypervisorandtheparavirtualizedGuestOS„Transparentparavirtualization„SameGuestOScanruneithernativelyorvirtualizedonanycompatiblehypervisor†Implementation„paravirtopsintokernelsince„VMIbackendsince„RaisecompatibilityfrompoortogoodFigure:VirtualMachineInterface年月日VMware的产品线和技术解决方案年月日What’sahead–Serverside†What’saheadDrMendelRosenblum,VirtualMachineMonitors:CurrentTechnologyandFutureTrendsIEEEComputer,May†Quicklyprovision,monitor,andmanageVMsfromasingleconsole†createnewserversfromanexistingtemplate,viewcomputerssimplyaspartofaresourcepool†Hotmigration:moverapidlybetweenphysicalmachineswithcontinuousserviceavailability†Handlehardwarefailures,maintenance,upgradeeasilywithoutserviceinterruptions†createsanddestroysvirtualmachinesondemand年月日VMwareVirtualInfrastructure年月日VMwareInfrastructureCentralManagementEnterpriseClassVirtualizationSystemPartitioningAutomationAggregationAvailabilityOptimizationNEWNEWNEWVMotionResourcePoolsDRSHAConsolidatedBackupVirtualCenterVirtualSMPVMFSESXServer年月日Requirementsforenterpriseclassvirtualization†Virtualizationofservers,storageandnetwork„Notjustservers,storageandnetworkvirtualizationaswell!†Reliability,scaleandperformance„ESXServeratacustomersite:dayscontinuousuptime!†Interoperabilityandcertification„Extensivecertification,testingandinteroperabilit

类似资料

编辑推荐

狄更斯文集之—— 圣诞故事集.pdf

传播学教程(郭庆光+着).pdf

郑玄之谶纬学.pdf

价值再发现_(Rediscovering Benjamin Graham).pdf

偏微分方程总结.pdf

职业精品

精彩专题

上传我的资料

精选资料

热门资料排行换一换

  • 我杀了他【东野圭吾】精校文字版.…

  • 绘图针灸易学+清·李守先撰+中国…

  • 金镜内台方议.pdf

  • 弹性力学-徐芝纶-下-第四版.p…

  • 平衡计分卡:化战略为行动.pdf

  • 黄帝内经灵枢注证发微(明·马莳撰…

  • 海药本草.pdf

  • (英文版)国际政治的社会理论_w…

  • 华东师大版《太极拳术》·陈微明.…

  • 资料评价:

    / 76
    所需积分:1 立即下载

    意见
    反馈

    返回
    顶部