I just wasted another 30min of my life finding out what I had found out before like 100 times. I executed the installer for the vSphere SDK for Perl and wondered why I couldn’t actually use the modules. Well, the one thing I always forget about is to set the http_proxy and ftp_proxy environment variable. So this post is just to save me some time the next time.

1. Download latest version of vSphere SDK for Perl


2. Install any dependencies

The following line is taken from this website, but relates to Ubuntu 10.04. It works in 12.10 but might not work in future versions or Debian.

apt-get install libarchive-zip-perl libcrypt-ssleay-perl libclass-methodmaker-perl libdata-dump-perl libsoap-lite-perl perl-doc libssl-dev libuuid-perl liburi-perl libxml-libxml-perl ia32-libs

3. Extract the archived

tar xvf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz

4. Set environment variables (IMPORTANT)

export http_proxy=
export ftp_proxy=

5. Execute Installer

sudo ./vmware-install.pl

The output should finish like this:

Do you accept? (yes/no) yes

Thank you.

In which directory do you want to install the executable files?

Please wait while copying vSphere CLI files...

The installation of vSphere CLI 5.1.0 build-780721 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:

This installer has successfully installed both vSphere CLI and the vSphere SDK
for Perl.

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

Compress::Zlib 2.037 or newer
Compress::Raw::Zlib 2.037 or newer
IO::Compress::Base 2.037 or newer
IO::Compress::Zlib::Constants 2.037 or newer
UUID 0.03 or newer


6. Disable certificate checking

By default, you will get an error like this connecting to the API:

Error: Server version unavailable at 'https://...'

This is a problem with the HTTPS certificate checking performed by LWP. To disable this, you have two options:

Disable checking globally by editing https.pm of the LWP module:

sudo vim  /usr/share/perl5/LWP/Protocol/https.pm

Look for the following line

$ssl_opts{SSL_verify_mode} ||= 1;

and change it to

$ssl_opts{SSL_verify_mode} ||= 0;

Disable in your own perl script:

To disable certificate checking for your own perl script add the following line to the top:



Now all I have to do is actually remember I blogged this info the next time I need it.