Skip to content

Latest commit

 

History

History
100 lines (73 loc) · 2.69 KB

INSTALL_VMWARESDK.md

File metadata and controls

100 lines (73 loc) · 2.69 KB

VMWare SDK for Perl Installation

Table of Contents

VMWare SDK Installation

OSX

Download the vSphere SDK for Perl 6.0 64-bit Linux installer (e.g. VMware-vSphere-Perl-SDK-6.0.0-2503617.x86_64.tar.gz) here (free registration required) and extract it:

cd ~/Downloads
tar zxvf VMware-vSphere-Perl-SDK-6.0.0-2503617.x86_64.tar.gz
cd vmware-vsphere-cli-distrib/

Perl dependencies

  • Alternative 1 - UUID 0.02 + force SDK to use this version (RECOMMENDED)
sudo cpan Class::MethodMaker Crypt::SSLeay SOAP::Lite UUID LWP XML::LibXML Data::Dumper

Patch the Makefile to allow UUID version 0.02

sudo sed -i '.bak' -e "s/'UUID' => '0.03'/'UUID' => '0.02'/" Makefile.PL
curl -s http://www.cpan.org/authors/id/C/CF/CFABER/UUID-0.03.tar.gz -o UUID-0.03.tar.gz && \
tar -xzvf UUID-0.03.tar.gz && \
cd UUID-0.03 && \
perl Makefile.PL && \
make -Wpointer-sign && \
sudo make install \
cd ~/Downloads/vmware-vsphere-cli-distrib
sudo cpan Class::MethodMaker Crypt::SSLeay SOAP::Lite UUID LWP XML::LibXML Data::Dumper

vSphere SDK for Perl

sudo perl Makefile.PL
sudo make install
# Copy esxcfg- and vicfg- commands to /usr/local/bin
sudo cp -rv ./bin/ /usr/local/bin/

Ubuntu

Perl dependencies

sudo apt-get -y install libexpat1-dev libxml2-dev libuuid-perl

vSphere SDK for Perl

Download the vSphere SDK for Perl 6.0 64-bit Linux installer (e.g. VMware-vSphere-Perl-SDK-6.0.0-2503617.x86_64.tar.gz) here (free registration required) and extract it:

cd ~/
tar zxvf VMware-vSphere-Perl-SDK-6.0.0-2503617.x86_64.tar.gz
cd vmware-vsphere-cli-distrib/
sudo perl vmware-install.pl

Go grab a coffee while CPAN does its thing.

Testing Installation

When running from the command line, set the enviroment variable to ignore trusted cert. Make sure you know what this means!

$ export PERL_LWP_SSL_VERIFY_HOSTNAME=0

Or pass the root CA file path via PERL_LWP_SSL_CA_PATH:

$ export PERL_LWP_SSL_CA_PATH=/path/to/ca/certs
vicfg-vmknic --server=$VCENTER__IP --username=$USER@vsphere.local --vihost=$VHOST --list

References

Installing the vSphere SDK for Perl on OS X