This quick howto will guide you through the installation proces of vSphere Perl SDK on a CentOS 7 server.
I don't fancy long guides, so I'll try to keep mine brief and simple.
- Download the 64bit tar.gz archive of the SDK here. Please note that my.vmware.com access is required.
- Install prerequisities, run all commands as root:
- Extract the downloaded archive and start installer:
- Follow the installation process using default options. At the very end, you might get a warning about old versions of some Perl modules. Proceed to next point to remedy this.
- Get new modules from CPAN to get rid of warnings:
yum install e2fsprogs-devel libuuid-devel openssl-devel perl-devel yum install glibc.i686 zlib.i686 yum install perl-XML-LibXML libncurses.so.5 perl-Crypt-SSLeay
tar xzf VMware-vSphere-Perl-SDK-* ./vmware-vsphere-cli-distrib/vmware-install.pl
yum install gcc perl-CPAN cpan IO::Compress::Zlib::Extra cpan MIME::Base64 cpan LWP
/usr/share/doc/vmware-vcli/samples /usr/lib/vmware-vcli/appsA good next step would be to try it! Login to your vCenter Server or ESXi host and try to save a session:
/usr/share/doc/vmware-vcli/samples/session/save_session.pl --server "hostname" \
--username "user1" --password "pass123" --savesessionfile "/tmp/vcli.test"
It should take no more than a few seconds to log in. If the script runs slower than that, you might need to downgrade Perl's Net::HTTP module to 6.03. In my experience mainly the older versions of vSphere Perl SDK used to require this, the current build seems to run fine at the default state.
That's all for today, have a good one!

Good Morning:
ReplyDeleteI have installed and configured a virtual server with CentOS 7.5, I have installed all the prerequisites indicated in the Vmware-vsphere perl SDK installation manual, but I can not get the Vmware configuration wizard running in Nagios, it tells me that it is not installed
Do you have any idea how I can prove that the SDK is installed?
Best regards...
Frank Guillén
Hi Frank,
ReplyDeleteI would suggest to reinstall the SDK by running the "vmware-install.pl" script again. At the very end, it should say "Enjoy --the VMware team". If it does that, the SDK is properly installed.
Next, please verify that nagios script check_esx3.pl actually exists in /usr/local/nagios/libexec directory. If it doesn't, copy it manually.
Lastly, set proper permissions to /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl script. It should be owned by nagios:root with 755 file permissions.
Best of luck, Pavel
This is a very interesting post and I learned so much from your blog. Do posting more.
ReplyDeleteVMware course in Chennai
VMware Training in Chennai
Cloud computing Training in Chennai
Azure Training in Chennai
Azure Training center in Chennai
AWS course in Chennai
DevOps Certification in Chennai
Cloud Computing Training in Chennai
Cloud computing courses in Chennai
Hi Sadhana, thanks. I've slowed down a bit as I am quite busy at the moment. But more stuff is coming.
ReplyDelete