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:
- 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
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.
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 ?
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
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)
Thanks. I've fixed the URL
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.
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
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.
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