WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Getting started with the vSphere SDK for Perl

Getting started with the vSphere SDK for Perl

05.30.2010 by William Lam // 8 Comments

Step 1. Visit the vSphere SDK for Perl Home Page

  • vSphere SDK for Perl

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

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

  • Support Information: vSphere, VI 3.x SDK - Support Information
  • VMware Code Central (Sample Code) : vSphere SDK for Perl
  • Take a look at Getting Started with vSphere SDKs document

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

  • vSphere SDK for Perl utility documentation
  • VI Perl Toolkit utility documentation

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

  • vSphere 4.0 API Reference
  • VI 3.5 API Reference

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.

More from my site

  • Creating Custom vSphere Reports is a Breeze with CloudPhysics
  • What's new in the vSphere 4.1 MOB
  • New vSAN Management 6.6 API / SDKs / CLIs
  • Cool Docker Container for VMware Utilities
  • List of VMware CLIs, SDKs & DevOps Tools

Categories // Uncategorized Tags // api, perl, sdk, vma, vSphere

Comments

  1. *protectedChakravarthi PS says

    01/08/2016 at 4:06 am

    Hi, I am trying to see how to change password for a SSO user account (not *protected email*) through Perl SDK and/or PowerCLI . Can you please help me with some clue / suggestion to achieve it ?

    Reply
    • William Lam says

      01/08/2016 at 7:26 am

      There are not SSO Admin APIs currently, so you won't be able to use any of the VMware APIs to perform these operations. Have a look at http://www.virtuallyghetto.com/2015/06/vcenter-server-6-0-tidbits-part-10-automating-sso-admin-configurations.html & http://www.virtuallyghetto.com/2015/06/vcenter-server-6-0-tidbits-part-11-automate-sso-admin-password-change.html for some details

      Reply
  2. *protectedDigitalGaz says

    05/18/2016 at 1:53 am

    Hi, Thanks for your blog posts. spotted a broken link thought I would mention
    >> Try some of the esxcfg-* commands bundled with the vCLI/RCLI (http://www.virtuallyghetto.com/p/vmware-vcli-rcli.html)
    found the right page
    (http://www.virtuallyghetto.com/vmware-vcli-and-rcli-html)

    Reply
    • William Lam says

      05/18/2016 at 9:01 pm

      Thanks. I've fixed the URL

      Reply
  3. *protectedK.W. Li says

    07/27/2016 at 3:37 am

    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.

    Reply
  4. *protectedGraham says

    12/20/2016 at 7:59 am

    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 vmwarevSphereHealthCheck.pl. In my lab environment I created a vMA running the latest version. I have been following instructions from the following article:
    https://communities.vmware.com/docs/DOC-9842

    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.

    Thanks

    Reply
    • *protectedJody Whitlock says

      12/22/2016 at 10:53 pm

      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.

      Reply
  5. *protectedyourschandu says

    11/27/2019 at 4:50 am

    Hi,
    I am looking for a perl script to disable alarms in vcenter.
    Could you please help me on how to use "EnableAlarmActions" objects in perl sdk.?
    EnableAlarmActions
    Enables or disables alarms on the specified managed entity.
    Required Privileges
    None
    Since
    vSphere API 4.0
    Parameters

    NAME TYPE DESCRIPTION
    _this ManagedObjectReference A reference to the AlarmManager used to make the method call.
    entity P ManagedObjectReference
    to a ManagedEntity
    The managed entity on which to set a schedule.
    enabled xsd:boolean
    true, if alarms are enabled during the schedule.
    P Required privilege: Alarm.DisableActions

    Reply

Leave a Reply to yourschanduCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025