You are here

Installing CLI 5 on Ubuntu Precise

    http://communities.vmware.com/community/vmtn/server/vsphere/automationto...

    Download the vCLI 5.0 from the link above. It will require for you to log in. Get the version that is appropriate for
    your operating system (32 or 64 bit)

    Install the folllowing dependencies:

    sudo apt-get install libxml-libxml-perl libclass-methodmaker-perl libcrypt-ssleay-perl perl-doc

    Check the md5sum to ensure that you're download matches.

    md5sum VMware-vSphere-CLI-5.0.0-422456.i386.tar.gz
    Match them against the following sums:

    VMware vSphere CLI (vCLI) - 32-bit Linux Installer
    Command-line tools (for 32-bit Linux environments) to manage your vSphere infrastructure.
      20M gz
    (md5sum:5146cd1d1fc80b989bb527132a920eb8)
    (sha1sum:4256ac52f508c9a7df03df336a4d8d01406b1b8b)
    VMware vSphere CLI (vCLI) - 64-bit Linux Installer
    Command-line tools (for 64-bit Linux environments) to manage your vSphere infrastructure.
      20M gz
    (md5sum:a318daee9660f65a8fce7313e99fbecf)
    (sha1sum:68061fee16b9bff7674c8641840221b01d28167a)

    Extract the tar file:

    tar -xvf VMware-vSphere-CLI-5.0.0-422456.i386.tar.gz

    Change into the directory and run the installer:

    cd vmware-vsphere-cli-distrib

    sudo ./vmware-install.pl

    This will fail with something similar to the following message:


    After excepting the EULA, It will mention that no proxy is configured, then exit. Similar to the following:

    Do you accept? (yes/no) yes

    Thank you.
     

    http_proxy not set. please set environment variable 'http_proxy' e.g. export
    http_proxy=http://myproxy.mydomain.com:0000 .
     

    ftp_proxy not set. please set environment variable 'ftp_proxy' e.g. export
    ftp_proxy=http://myproxy.mydomain.com:0000 .

    You will need to manually edit the bin/vmware-uninstall-vSphere-CLI.pl file. You can accomplish this by first making the file writeable (chmod +w bin/vmware-uninstall-vSphere-CLI.pl), then open it in your editor of choice and comment out the following:

    Make this part:


            if ( !( $ftpproxy && $httpproxy)) {
              uninstall_file($gInstallerMainDB);
             exit 1;
            }
            require CPAN;

    Look like this:


            if ( !( $ftpproxy && $httpproxy)) {
    #          uninstall_file($gInstallerMainDB);
    #        exit 1;
            }
            require CPAN;

    Then re-run the following:

    sudo ./vmware-install.pl

    I have had mixed results on a couple of different machines. In one instance the installer complained about the following missed dependencies:

    Archive::Zip 1.20 or newer

    Data::Dump 1.15 or newer

    SOAP::Lite 0.710.08 or newer

    You can resolve these dependencies by running the following:

    sudo apt-get install libarchive-zip-perl libsoap-lite-perl libdata-dump-perl

    Once they are installed, re-run the installer: sudo ./vmware-install.pl