The interaction model between the SDK and the vSphere API on the host directly affects how each script is structured, and is the basis for troubleshooting.

vSphere SDK for Perl subroutines interact with the host and perform variations of the following basic tasks.

  • Connect to a remote host using user-supplied connection parameters, and disconnect.
  • Find objects on the remote host (server-side objects). For example, find all virtual machines on a host.
  • Retrieve or modify server-side objects, for example, manage the virtual machine life cycle (start, stop, suspend, and so on).
  • Collect information from server-side objects.
  • Manage sessions.

Most routines retrieve a vSphere API object and make it available as a Perl object, called a view object, that you can then manipulate with your script.

The vSphere SDK for Perl has the following components.

  • vSphere SDK for Perl Runtime – Client-side runtime components that include the following.
    • A complete Perl binding of the vSphere API, which makes all server-side operations and data structures available. The SDK handles the data type mapping between server-side and client-side objects transparently.
    • VMware Perl modules (VIRuntime.pm and VILib.pm) that provide subroutines for basic functionality.
  • vSphere SDK for Perl Utility Applications – Management applications that you can run without modification in your virtual datacenter. You run each application with connection parameters and other, application-specific parameters. See the vSphere SDK for Perl Utility Applications Reference.
  • Sample Scripts – Scripts that you can customize for your needs and that illustrate the vSphere SDK for Perl's functionality. You must know Perl to customize the scripts. Unlike the utility applications, sample scripts are not supported by VMware.

A vSphere SDK for Perl installation also includes the following libraries.

  • Web Services for Management Perl Library and Examples – The WS-Management Perl Library allows you to write scripts that retrieve CIM data from the ESXi host using CIMOM, a service that provides standard CIM management functions over a WBEM (Web-Based Enterprise Management). See Web Services for Management Perl Library.
  • Credential Store Library and Examples – Allows vSphere SDK for Perl applications to manage the vSphere credential store. The credential store allows vSphere SDK for Perl scripts to authenticate themselves to ESXi or vCenter Server systems. See Credential Store Perl Library.