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
52 VMware, Inc.
Required Perl Modules
TheWS‐ManagementPerllibraryrequiresthesePerlmodules:
SOAP::Lite–Version0.67‐version0.69aresupported.Versionsbefore0.67or0.7orlaterarenot
supported.
UUID–Version0.02andlater.
Data::Dump–Version1.07andlater.
Ifthesystemyouareusingisbehindafirewall,makesurethatthehttp_proxyandftp_proxyenvironment
variablesaresettomatchyourProxyserverbeforeyouproceedwiththefollowinginstructionsforWindows
orLinux.
To install required Perl modules on a Windows system
1 DeterminewhichversionofPerlyouareusing
byrunningtheperl -vcommand.
Forversion5.6,typethefollowingatthecommandprompt:
C:\>ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/SOAP-Lite.ppd
Forversion5.8,typethefollowingatthecommandprompt:
C:\>ppm install http://theoryx5.uwinnipeg.ca/ppms/SOAP-Lite.ppd
2RunthefollowingcommandtoinstallUUID:
C:>ppm install UUID
3RunthefollowingcommandtoinstallData::Dump:
C:>ppm install Data-Dump
To install required Perl modules on a Linux system
1EnterthefollowingcommandsforremoteaccesstoCPAN(comprehensivePerlarchivenetwork)ina
terminalwindow:
$ sudo -s
# perl -MCPAN -e shell
2RunthefollowingcommandattheCPANprompttoinstallSOAP::Lite:
cpan> install SOAP::Lite
3Respondtothequestionsthatappear.
Themoduleinstalls.
4Gotothecpan.orgWebsite,searchforUUID,anddownloadthelatestsource.
5Untarthedownloadedfile,openaterminalwindow.
6GototheuntarreddirectoryandrunthefollowingcommandstoinstallUUID:
# make
# make test
# make install
Ifrunningmakeresultsinerrorsaboutmissingitems,installuuid-devwithapt-getonDebian‐based
systemsore2fsprogs-dev[el]onothersystems.
7EnterrunthefollowingcommandstoinstallData::Dump:
# perl -MCPAN -e shell
cpan> install Data::Dump
NOTEIfyouuseoneofthesupportedLinuxdistributions,therequiredmodulesareincludedwiththe
vSphereSDKforPerlandyoudonothavetoinstallthem.