Step 1. Visit the vSphere SDK for Perl Home Page

You will find latest Downloads, Reference Documentation and Community Discussions and links to resources.

Step 2. Become familiar with vSphere SDK for Perl Resources:

Step 3. Explore new ways of managing your vSphere Platform using the remote CLI

  • Try some of the esxcfg-* commands bundled with the vCLI/RCLI

Additional utilities bundled with vCLI/RCLI installation

Step 4. Develop and create your own scripts and utlities using the vSphere SDK for Perl
Become familiar vSphere 4.0 API Reference documentation

Step 5. Learn how to get started with writing your own Perl script using vSphere SDK for Perl

  • This VMware document is a little out dated but it still all applies to writing your own Perl scripts using the vSphere SDK for Perl

Step 6. For more scripts developed against the vSphere SDK for Perl, check out the vGhetto Script Repository for more examples!
I think the easiest way to learn this is to start playing with some of the canned scripts and to make it even easier to have an environment that's all setup for you with both the vCLI and vSphere SDK for Perl, you can download VMware vMA.

7 thoughts on “Getting started with the vSphere SDK for Perl

  1. Hi William,

    Would you please tell how to put an ampersand (&) sign into the password string in the perl script? As if I just put the password with ampersand (&) sign in the password string as ‘1234&5678’, the script will return HTTP 500 Internal Server Error before it connect the ESXi server.

  2. Hello,

    I am not too familiar with vSphere ESXI and I am trying to find a way to monitor host hardware. So, if we lose a drive or DIMM we will get notified via email about it. I do not have licensed ESXI and I am running ESXI 5.5. I found your script In my lab environment I created a vMA running the latest version. I have been following instructions from the following article:

    I guess I am lost on how to execute this command. I transferred the script to my vMA but that is as far as I am getting. Do I need to edit the script with my SMTP settings and email under default configuration? Do I need to place the script in the following directory /usr/bin/perl -w?

    Sorry in advance I am not an expert in Linux or Perl.

    Any help is appreciated.


    • There’s many other ways of doing this through rsyslog, splunk, PowerCLI, etc. You can also use good ‘ole vCenter alarms to do this as well.
      This actually reminds me of a discussion I am having with a co-worker about continuing to use Perl SDK for vSphere into 2017. Personally, PowerShell/PowerCLI/C# are perfect and do 99.999% of the automation neededĀ and Perl is a PTA to manage at times.

Thanks for the comment!