Tải bản đầy đủ - 0 (trang)
Chapter 1. Xen-Background and Virtualization Basics

Chapter 1. Xen-Background and Virtualization Basics

Tải bản đầy đủ - 0trang

wouldneedtomaintainmanyphysicalmachines,eachwitha

specialsoftwareconfiguration,evenifthecomputingresources

inonemachinearesufficienttorunallofyourapplicationsat

once.

Virtualmachinemonitors(hypervisors)arebecoming

increasinglyimportantinmoderncomputingbecausetheyallow

manydifferentoperatingsystemsandsoftwareconfigurations

toexistonthesamephysicalmachine.Thehypervisorcontrols

theunderlyinghardware,allowingittobeusedbymanyguest

systemsatonce,andgiveseachguestsystemtheillusionthat

itisrunningonitsownprivatehardware.

Thehypervisorabstractsthephysicalresourcesofthehost

computerintodiscretevirtualcounterpartsthatcanbeallocated

forusebyindividualguests.Virtualgueststreattheirvirtual

hardwareasifitwerereal,andthehypervisorensuresthatthis

illusionisseamless.Additionally,hypervisorsmustensuresome

levelofisolationbetweenguests.Inaway,hypervisorsactas

bothmagicianandtrafficcop.Figure1.1illustratesthe

relationshipbetweenthephysicalhardware,thehypervisor,and

theguestvirtualmachines.

Figure1.1.Thehypervisorsitsbetweentheguest

domainsandthephysicalhardware.

[Viewfullsizeimage]



Virtualmachinemonitorsalsoprovideauniforminterfacetothe

hardware.Thisuniforminterfaceshieldsguestsystemsfrom

somelowerleveldetailsofthephysicalcomputingresources

andprovidesportability,whichisanotherkeybenefitof

virtualization.Infact,manymodernhypervisorsallowguest

systemstomovefromonephysicalmachinetoanotherwithout

interruption.Guestsystemconfigurationscaneasilybe

developedononemachineandthendeployedonmany

systems.Thiseasesthejobofmanagingordeployingsoftware

onacollectionofmachineswithdifferenthardware

characteristics.Guestsystemscanevenmigratefromone

physicalcomputertoanotherwhilerunning.Xencallsthislive

migration.Somebenefitsofvirtualizationareasfollows.

Debuggingoperatingsystemsistimeconsumingand

requiresexceptionallyskilledprogramming.Virtualization

caneasetheburdenbyallowingadevelopertotestnew

operatingsystemsasaguestonamorestablehost.This

techniquehasbeenusedformanyyearsandhasproven

effective.Similarly,securityresearcherscancreateguest

operatingsystemsthatareisolatedfromoneanotheras

wellasthehost.Suchguestsallowresearcherstostudythe

effectsofworms,Trojans,andviruses,withoutaffectingthe

hostsystem.Theseisolatedguestsarecolloquiallyreferred



toasbeing"sandboxed."Sandboxedguestscanalsobe

usedtotestupdatesorcutting-edgesoftwarebefore

applyingthemtoproductionsystems.

Anotherbenefitofvirtualizationistheabilitytorecover

quicklyfromsoftwareproblemscausedbydeliberate

maliciousattacksoraccidentalmalfunctions.Bymaintaining

acopyofastableguestimage,recoveringfromanattack

canbeassimpleasrollingbacktothistrustedsavedpoint.

Virtualizationcanprovidehigheravailabilitybyrelocating

guestswhenaservermachineisinoperable.Server

environmentscanhavemanyphysicalmachines,each

runninganumberofguestsystems.Guestsystemscanbe

movedseamlesslybetweenphysicalmachinestobalance

theloaddynamically,thususingtheaggregateresources

mostefficiently.Manyenterprisecustomershaveenjoyed

thesebenefitsonexotichardwareplatformsformanyyears.

Xennowprovidestheseadvantagestoawideraudience.

Otherbenefitsofvirtualizationbecomeespeciallyclearina

serverenvironment.Oneexampleistheabilityto

consolidatemanyservicesononephysicalmachinewhile

stillallowingeachservicetobeadministeredindependently.

Inamultihostingenvironment,aserviceprovidermayrun

guestsystemsbelongingtomanydifferentindividualsor

businessesonthesamephysicalmachine.Eachentitycould

haveitsownrootoradministrativeaccess,makeitsown

choicesastowhatsoftwaretorun,andadministeritsown

virtualguestautonomouslywithoutanyneedtoconsultor

coordinatewiththeownersoftheotherguestsystems.

Mostoftheadvantagesofvirtualization,especiallyon

commodityplatformssuchasx86,derivefromthe

abundanceofcomputingpoweravailableonasingle

machine.Asthepoweroftheaveragesystemhas

increased,theamountofcomputingpowerthatgoes

underutilizedisalsoincreasing—especiallywith

multiprocessorandmulticoresystems.Virtualization



providesawaytotakeadvantageofthislatentcomputing

powerbyconsolidationontotoday'sincreasinglypowerful

physicalmachines.

Hypervisorscanbeespeciallyusefulfordevelopers,

becausethedevelopersnolongerneedtorestartphysical

machinestoswitchbetweenvariousoperatingsystems.

Multibootconfigurationsarejustnotsufficientforthese

developersanylonger.Developersrequiringthis

functionalityarebecomingmorecommonasmore

applicationsaremademultiplatform.

Fromabusinessperspective,virtualizationcanprovidea

reducedtotalcostofownership(TCO).Hardwareisutilized

morefullywhenmultipleoperatingsystemscoexistona

singlephysicalmachine.Imaginerunningjusttwovirtual

machinesoneachserveracompanyowns.Thiswould

mean50percentofthehardwarewouldbeneededforthe

samecomputinginfrastructure.Now,wedonotmeanto

implyeverycomputershouldberunningsimultaneous

virtualizedguestoperatingsystems,butoftenmany

machinessitpracticallyidle,andthesecomputersareprime

candidatesforconsolidationviavirtualization.Trainingcosts

foremployeescanbedecreasedwhenusingvirtualization

becauseitallowsseveraldifferenttrainingconfigurations

(operatingsystemsandapplications)tocoexistonasingle

platform,thusfewercomputersareneededfortraining,and

reconfigurationisminimizedbetweendifferenttraining

sessions.

Inmanybusinessenvironments,usersareaffordedthe

advantageofbeingabletovirtualizelegacyoperating

systemsandapplicationsonmodernhardwareplatforms.

Typically,migrationoftheseapplicationstocurrent

architecturesistoocostly.Evenifmigrationwassuccessful,

thoseapplicationswouldneeddebuggingformanyyearsto

beasrobustastheoriginalapplications.Withavirtual

machine,usersarefreetoexecutelegacyproductsina



protectedvirtualenvironmentwithoutthefearofsome

roguelegacyapplicationbringingthesystemtoahalt.

Thefinalbenefitofvirtualizationthatbearsmentioningis

decreasedpowerconsumptionandcoolinginfrastructure.

Serversrunningvirtualizedathigherutilizationmakemore

efficientuseofpowerthanmanysystemsfunctioningatlow

capacity.Becausesmallerspaceisoccupiedbythe

computinginfrastructure,thereismoreroomtoadequately

cooltoday'sverydenseandverywarmdatacenters.In

somecasesasubstantialcostsavingsforairconditioning

canberealized.



Chapter1.Xen—Backgroundand

VirtualizationBasics

Xenisavirtualmachinemonitor(hypervisor)thatallowsyouto

useonephysicalcomputertorunmanyvirtualcomputers—for

example,runningaproductionWebserverandatestserveron

thesamephysicalmachineorrunningLinuxandWindows

simultaneously.Althoughnottheonlyvirtualizationsystem

available,Xenhasacombinationoffeaturesthatmakeit

uniquelywellsuitedformanyimportantapplications.Xenruns

oncommodityhardwareplatformsandisopensource.Xenis

fast,scalable,andprovidesserver-classfeaturessuchaslive

migration.Thischapterdiscussescommonusesandtypesof

virtualization,describesthehistoryofvirtualizationandorigins

ofXen,providesabriefoverviewoftheXenarchitecture,and

comparesXenwithothervirtualizationsystems.



CommonUsesandBenefitsof

Virtualization

Virtualmachinemonitorsprovideaconvenientwaytousethe

samephysicalcomputerhardwareformanydifferenttasks.

Operatingsystemshavebeendoingthisforyearssimplyby

enablinguserstorunmanydifferentapplicationsatonce,such

asWebbrowsers,databaseservers,andgames.However,

withoutvirtualization,theactofchoosinganoperatingsystem

andsystemconfigurationtorunonyourphysicalcomputerhas

theunfortunatesideeffectofclosingoffmanyotheroptions.

Forexample,ifyourunLinuxtodevelopandtestprogramsin

thatenvironment,youmaynotbeabletorunprogramswritten

exclusivelyforWindows.Also,ifyourunthenewestandfully

patchedversionofWindows,reproducingproblemsexperienced

bycustomersonearlierversionsmaybedifficult.Additionally,if

yourWebserveranddatabaseserverrequiredifferentversions

ofasystemlibrary,theymaynotbeabletorunonthesame

system.Withoutvirtualizationineachoftheseexamples,you



wouldneedtomaintainmanyphysicalmachines,eachwitha

specialsoftwareconfiguration,evenifthecomputingresources

inonemachinearesufficienttorunallofyourapplicationsat

once.

Virtualmachinemonitors(hypervisors)arebecoming

increasinglyimportantinmoderncomputingbecausetheyallow

manydifferentoperatingsystemsandsoftwareconfigurations

toexistonthesamephysicalmachine.Thehypervisorcontrols

theunderlyinghardware,allowingittobeusedbymanyguest

systemsatonce,andgiveseachguestsystemtheillusionthat

itisrunningonitsownprivatehardware.

Thehypervisorabstractsthephysicalresourcesofthehost

computerintodiscretevirtualcounterpartsthatcanbeallocated

forusebyindividualguests.Virtualgueststreattheirvirtual

hardwareasifitwerereal,andthehypervisorensuresthatthis

illusionisseamless.Additionally,hypervisorsmustensuresome

levelofisolationbetweenguests.Inaway,hypervisorsactas

bothmagicianandtrafficcop.Figure1.1illustratesthe

relationshipbetweenthephysicalhardware,thehypervisor,and

theguestvirtualmachines.

Figure1.1.Thehypervisorsitsbetweentheguest

domainsandthephysicalhardware.

[Viewfullsizeimage]



Virtualmachinemonitorsalsoprovideauniforminterfacetothe

hardware.Thisuniforminterfaceshieldsguestsystemsfrom

somelowerleveldetailsofthephysicalcomputingresources

andprovidesportability,whichisanotherkeybenefitof

virtualization.Infact,manymodernhypervisorsallowguest

systemstomovefromonephysicalmachinetoanotherwithout

interruption.Guestsystemconfigurationscaneasilybe

developedononemachineandthendeployedonmany

systems.Thiseasesthejobofmanagingordeployingsoftware

onacollectionofmachineswithdifferenthardware

characteristics.Guestsystemscanevenmigratefromone

physicalcomputertoanotherwhilerunning.Xencallsthislive

migration.Somebenefitsofvirtualizationareasfollows.

Debuggingoperatingsystemsistimeconsumingand

requiresexceptionallyskilledprogramming.Virtualization

caneasetheburdenbyallowingadevelopertotestnew

operatingsystemsasaguestonamorestablehost.This

techniquehasbeenusedformanyyearsandhasproven

effective.Similarly,securityresearcherscancreateguest

operatingsystemsthatareisolatedfromoneanotheras

wellasthehost.Suchguestsallowresearcherstostudythe

effectsofworms,Trojans,andviruses,withoutaffectingthe

hostsystem.Theseisolatedguestsarecolloquiallyreferred



toasbeing"sandboxed."Sandboxedguestscanalsobe

usedtotestupdatesorcutting-edgesoftwarebefore

applyingthemtoproductionsystems.

Anotherbenefitofvirtualizationistheabilitytorecover

quicklyfromsoftwareproblemscausedbydeliberate

maliciousattacksoraccidentalmalfunctions.Bymaintaining

acopyofastableguestimage,recoveringfromanattack

canbeassimpleasrollingbacktothistrustedsavedpoint.

Virtualizationcanprovidehigheravailabilitybyrelocating

guestswhenaservermachineisinoperable.Server

environmentscanhavemanyphysicalmachines,each

runninganumberofguestsystems.Guestsystemscanbe

movedseamlesslybetweenphysicalmachinestobalance

theloaddynamically,thususingtheaggregateresources

mostefficiently.Manyenterprisecustomershaveenjoyed

thesebenefitsonexotichardwareplatformsformanyyears.

Xennowprovidestheseadvantagestoawideraudience.

Otherbenefitsofvirtualizationbecomeespeciallyclearina

serverenvironment.Oneexampleistheabilityto

consolidatemanyservicesononephysicalmachinewhile

stillallowingeachservicetobeadministeredindependently.

Inamultihostingenvironment,aserviceprovidermayrun

guestsystemsbelongingtomanydifferentindividualsor

businessesonthesamephysicalmachine.Eachentitycould

haveitsownrootoradministrativeaccess,makeitsown

choicesastowhatsoftwaretorun,andadministeritsown

virtualguestautonomouslywithoutanyneedtoconsultor

coordinatewiththeownersoftheotherguestsystems.

Mostoftheadvantagesofvirtualization,especiallyon

commodityplatformssuchasx86,derivefromthe

abundanceofcomputingpoweravailableonasingle

machine.Asthepoweroftheaveragesystemhas

increased,theamountofcomputingpowerthatgoes

underutilizedisalsoincreasing—especiallywith

multiprocessorandmulticoresystems.Virtualization



providesawaytotakeadvantageofthislatentcomputing

powerbyconsolidationontotoday'sincreasinglypowerful

physicalmachines.

Hypervisorscanbeespeciallyusefulfordevelopers,

becausethedevelopersnolongerneedtorestartphysical

machinestoswitchbetweenvariousoperatingsystems.

Multibootconfigurationsarejustnotsufficientforthese

developersanylonger.Developersrequiringthis

functionalityarebecomingmorecommonasmore

applicationsaremademultiplatform.

Fromabusinessperspective,virtualizationcanprovidea

reducedtotalcostofownership(TCO).Hardwareisutilized

morefullywhenmultipleoperatingsystemscoexistona

singlephysicalmachine.Imaginerunningjusttwovirtual

machinesoneachserveracompanyowns.Thiswould

mean50percentofthehardwarewouldbeneededforthe

samecomputinginfrastructure.Now,wedonotmeanto

implyeverycomputershouldberunningsimultaneous

virtualizedguestoperatingsystems,butoftenmany

machinessitpracticallyidle,andthesecomputersareprime

candidatesforconsolidationviavirtualization.Trainingcosts

foremployeescanbedecreasedwhenusingvirtualization

becauseitallowsseveraldifferenttrainingconfigurations

(operatingsystemsandapplications)tocoexistonasingle

platform,thusfewercomputersareneededfortraining,and

reconfigurationisminimizedbetweendifferenttraining

sessions.

Inmanybusinessenvironments,usersareaffordedthe

advantageofbeingabletovirtualizelegacyoperating

systemsandapplicationsonmodernhardwareplatforms.

Typically,migrationoftheseapplicationstocurrent

architecturesistoocostly.Evenifmigrationwassuccessful,

thoseapplicationswouldneeddebuggingformanyyearsto

beasrobustastheoriginalapplications.Withavirtual

machine,usersarefreetoexecutelegacyproductsina



protectedvirtualenvironmentwithoutthefearofsome

roguelegacyapplicationbringingthesystemtoahalt.

Thefinalbenefitofvirtualizationthatbearsmentioningis

decreasedpowerconsumptionandcoolinginfrastructure.

Serversrunningvirtualizedathigherutilizationmakemore

efficientuseofpowerthanmanysystemsfunctioningatlow

capacity.Becausesmallerspaceisoccupiedbythe

computinginfrastructure,thereismoreroomtoadequately

cooltoday'sverydenseandverywarmdatacenters.In

somecasesasubstantialcostsavingsforairconditioning

canberealized.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 1. Xen-Background and Virtualization Basics

Tải bản đầy đủ ngay(0 tr)

×