CitrixXenServer®6.1.0SoftwareDevelopmentKitPublishedTuesday,25September20121.0EditionCitrixXenServer®6.1.0SoftwareDevelopmentKitCopyright©2012CitrixSystems.Inc.AllRightsReserved.Version:6.1.0Citrix,Inc.851WestCypressCreekRoadFortLauderdale,FL33309UnitedStatesofAmericaDisclaimersThisdocumentisfurnishedASIS.Citrix,Inc.disclaimsallwarrantiesregardingthecontentsofthisdocument,including,butnotlimitedto,impliedwarrantiesofmerchantabilityandfitnessforanyparticularpurpose.Thisdocumentmaycontaintechnicalorotherinaccuraciesortypographicalerrors.Citrix,Inc.reservestherighttorevisetheinformationinthisdocumentatanytimewithoutnotice.ThisdocumentandthesoftwaredescribedinthisdocumentconstituteconfidentialinformationofCitrix,Inc.anditslicensors,andarefurnishedunderalicensefromCitrix,Inc.CitrixSystems,Inc.,theCitrixlogo,CitrixXenServerandCitrixXenCenter,aretrademarksofCitrixSystems,Inc.and/oroneormoreofitssubsidiaries,andmayberegisteredintheUnitedStatesPatentandTrademarkOfficeandinothercountries.Allothertrademarksandregisteredtrademarksarepropertyoftheirrespectiveowners.TrademarksCitrix®XenServer®XenCenter®iiiContents1.Introduction...................................................................................................12.GettingStarted..............................................................................................22.1.SystemRequirementsandPreparation..........................................................................22.2.Downloading...............................................................................................................22.3.What'sNew.................................................................................................................22.4.ContentMap...............................................................................................................23.OverviewoftheXenServerAPI.....................................................................43.1.GettingStartedwiththeAPI........................................................................................43.1.1.Authentication:acquiringasessionreference.....................................................43.1.2.AcquiringalistoftemplatestobaseanewVMinstallationon.............................43.1.3.InstallingtheVMbasedonatemplate...............................................................53.1.4.TakingtheVMthroughastart/suspend/resume/stopcycle..................................53.1.5.Loggingout.......................................................................................................53.1.6.Installandstartexample:summary....................................................................63.2.ObjectModelOverview...............................................................................................63.3.WorkingwithVIFsandVBDs........................................................................................83.3.1.CreatingdisksandattachingthemtoVMs..........................................................83.3.1.1.Creatinganewblankdiskimage.............................................................83.3.1.2.AttachingthediskimagetoaVM............................................................93.3.1.3.HotpluggingtheVBD............................................................................103.3.2.CreatingandattachingNetworkDevicestoVMs...............................................103.3.3.Hostconfigurationfornetworkingandstorage..................................................103.3.3.1.Hoststorageconfiguration:PBDs...........................................................103.3.3.2.Hostnetworkingconfiguration:PIFs.......................................................113.4.ExportingandImportingVMs.....................................................................................113.4.1.XenVirtualAppliance(XVA)VMImportFormat.................................................123.5.XML-RPCnotes..........................................................................................................153.5.1.Datetimes.......................................................................................................153.6.Wheretolooknext....................................................................................................15iv4.UsingtheAPI..............................................................................................164.1.Anatomyofatypicalapplication.................................................................................164.1.1.Choosingalow-leveltransport.........................................................................164.1.2.Authenticationandsessionhandling................................................................164.1.3.Findingreferencestousefulobjects.................................................................174.1.4.Invokingsynchronousoperationsonobjects.....................................................174.1.5.UsingTaskstomanageasynchronousoperations...............................................184.1.6.Subscribingtoandl