The VMware Perl SDK is only supported on RHEL 5.* and its derivatives, which is getting a bit old hat now. Previously, getting the perl UUID module to compile on RHEL 6 was problematic. But, the problem seems to have gone away. Here's my method of getting the SDK running on CentOS 6.4, with a perbrew'd 5.16.3...

This will entirely be carried out as an ordinary user - it does irk me that so many things unnecessarily want installing as root. I'm going to assume you've got perlbrew installed, and you've built and 'switched' to 5.16.3 (which you've installed --as 5.16 - feel free to adjust the notes below accordingly, if you've used a different label), and you've got cpanm installed through the perlbrew install-cpanm method.

First off, let's make a self contained lib for our SDK to install into:

$ perlbrew lib create vmwsdk
$ perlbrew use 5.16@vmwsdk

We need to install some dependencies in the OS before we build the required Perl modules:

$ sudo yum install -y libuuid-devel libxml2-devel expat-devel openssl-devel

And now let's install the Perl module dependencies:

$ cpanm UUID Class::MethodMaker Crypt::SSLeay LWP SOAP::Lite XML::LibXML

Download the SDK, and extract the tarball. Don't use the vmware-install.pl script! Just run a standard Perl like install:

$ perl Makefile.PL
$ make
$ make install

You'll find the support scripts in ~/.perlbrew/libs/5.16@vmwsdk/bin/apps. All of the .pl files have /usr/bin/perl as the shebang line, which is no good for us. So just fix them with - a bit of perl!

$ perl -pi -e 's#/usr/bin/perl.+$#/usr/bin/env perl#' *.pl

Et voila! You're good to go.

$ [vagrant@c6 general]$ ./connect.pl
Connection Successful
Server Time : 2013-06-13T20:46:27.218764Z

Comments

comments powered by Disqus