6.5
Table Of Contents
- vSphere SDK for Perl Programming Guide
- Contents
- Getting Started with vSphere SDK for Perl
- Writing vSphere SDK for Perl Scripts
- Refining vSphere SDK for Perl Scripts
- Creating and Using Filters
- Filtering Views Selectively Using Properties
- Retrieving the ServiceInstance Object on a vSphere Host
- Saving and Using Sessions
- Using Multiple Sessions
- Learning About Object Structure Using Data::Dumper
- Specifying Untyped Arguments in Scheduled Tasks and Callbacks
- Using Advanced Subroutines
- vSphere SDK for Perl Subroutine Reference
- Web Services for Management Perl Library
- Credential Store Perl Library
vSphere SDK for Perl Programming Guide
26 VMware, Inc.
Managed Object Hierarchy
TheServiceContentserver‐sideobjectprovidesaccesstoallotherserver‐sideobjects.Eachpropertyofthe
ServiceContentobjectisareferencetoaspecificmanagedobject.Youmustknowthosepropertynamesto
accesstheotherobjects.YoucanusetheMOB(see“UsetheManagedObjectBrowsertoExplore
Server‐Side
Objects”onpage 24)orusetheAPIReferencedocumentation.
ThevSphereAPIReferenceGuidecontainsdefinitionsofallserver‐sideobjectsandtheirpropertiesandmethods.
YoucanthereforeusethevSphereAPIReferenceGuidetoidentifythelistofparametersandoperationsthatyou
canusewith
specificvSphereSDKforPerlviewsthatyoucreateandmanipulateinyourcode.
To view documentation for server-side objects
1FindthevSphereAPIReferenceGuide,availablefromtheVMwareAPIsandSDKsDocumentationpage.
2ClickAllTypestoseealistofallmanagedobjecttypes.
3FindtheServiceContentobject.
ServiceContentprovidesaccessservices,such
asPerformanceManager,andtoinventoryobjects,
whichallowyoutoaccesstheentitiesinthevirtualdatacentersuchashosts(HostSystem)andvirtual
machines(VirtualMachine).ServiceContent propertiesalsoallowaccesstoothermanagedobjects,
forexample:
TherootFolderpropertyisaManagedObjectReferencetoaFoldermanagedobjecttype.
TheperfManagerpropertyisaManagedObjectReferencetoaspecificinstanceofa
PerformanceManagermanagedobjecttype,andsoon.
ThevSphereClientdisplaysthehierarchyofinventoryobjects.ThevSphereClientusestheinformationabout
theobjects(thepropertiesandtherelationshipsamongthem)forthedisplay.Forinformationaboutthe
vSphereClientandhowtoworkwithitsdisplay,seethedocumentsinthevSphereonlinelibrary
Managed Entities in the Inventory
Theinventoryconsistsofthemanagedentitiesontheserver.Amanagedentityisamanagedobjectthat
extendstheManagedEntitymanagedobjecttype.ManagedEntityisanabstractclassthatdefinesthebase
propertiesandoperationsforvSpheremanagedobjectssuchasdatacentersandhosts.SeeFigure 2‐2foran
overview.
ThefollowingmanagedobjecttypesextendtheManagedEntitysuperclass:
Datacenter–Containsothermanagedentities,includingfolders,virtualmachines,andhostsystems.A
vCenterServerinstancecansupportmultipledatacenters,butanESX/ESXihostsupportsonlyone
datacenter.
Datastore–Representslogicalstoragevolumesonwhichtostorevirtualmachinefilesandotherdata.
Distributed Virtual Switch–InterfacefortheVMwaredistributedvirtualswitch(DVS).
Folder–Containsreferencestootherentities,forexample,otherfolders(Folder)orhosts(HostSystem).
HostSystem–Providesaccesstoavirtualizationhostplatform.
Network–Abstractionforaphysicalorvirtualnetwork(VLAN).
VirtualMachine–Representsasinglevirtualmachine.
ResourcePool–AllowsyoutocombineCPUandmemoryresourcesfrommultiplehostsandtoestablish
rulesfordividingthoseresourcesamongallvirtualmachinesassociatedwiththesehosts.
ClusterComputeResource–RepresentsaclusterofHostSystemobjects.Administratorscreateclusters
tocombinetheCPUandmemoryresourcesofhostsandtosetupVMwareHAorVMwareDRSforthose
clusters.SeetheResourceManagementGuide,whichispartofthevSpheredocumentationset.
ComputeResource–Abstractsahostsystem’sphysicalresourcesandallowsyoutoassociatethose
resourceswiththevirtualmachinesthatrunonthehost.
VirtualService–Containerforoneormorevirtualmachinesanassociatedobjectpackageusingopen
virtualformat(OVF).