this is obsolete doc -- see http://doc.nethence.com/ instead

Setting up vSphere CLi 6.0 32-bit on RHEL6.7 32-bit 

 

Installation 

Fetch vSphere CLI for RHEL. 

[vSphere CLI 5.1](https://my.vmware.com/fr/group/vmware/details?downloadGroup=VSP510-VCLI-510&productId=285) 

[vSphere CLI 5.5 update 2](https://my.vmware.com/group/vmware/get-download?downloadGroup=VCLI55U2) 

vSphere CLI 6.0 

https://my.vmware.com/fr/group/vmware/details?productId=491&downloadGroup=VCLI600 

https://my.vmware.com/group/vmware/details?downloadGroup=VCLI600&productId=489 

Using 6.0 in this guide 

 

Requirements, 

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 

#rpm -Uvh http://epel.mirrors.ovh.net/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 

rpm -q openssl openssl-devel perl-Crypt-SSLeay gcc perl-CPAN perl-Archive-Zip perl-Class-MethodMaker perl-SOAP-Lite perl-XML-SAX perl-XML-NamespaceSupport perl-XML-LibXML perl-Data-Dump uuid-perl libuuid-devel uuid-devel | grep ^Package 

rpm -q libuuid libuuid-devel uuid uuid-devel uuid-perl | grep ^Package 

 

Install the CLI, 

tar xzf VMware-vSphere-CLI-5.1.0-780721.i386.tar.gz 

#tar xzf VMware-vSphere-CLI-6.0.0-2503617.x86_64.tar.gz 

cd vmware-vsphere-cli-distrib/ 

now run, 

  ./vmware-install.pl 

 

You now have to play and search what's available either as RHEL package or at search.cpan.org. For example I need this, 

MIME::Base64 3.14 or newer 

so, 

  yum search mime-base64 

  yum search perl | grep -i mime-base64 

==> no mime-base64 package 

then go to http://search.cpan.org/ and search for mime::base64, 

  wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/MIME-Base64-3.15.tar.gz 

  tar xzf... 

  cd ... 

  perl Makefile.PL 

  make 

  make install 

and re-install vmware until there is no error left. 

 

Note. to uninstall, 

  /usr/bin/vmware-uninstall-vSphere-CLI.pl 

 

Ready to go 

List all VMs on an ESX server, 

  vmware-cmd --server ESXI_HOST_FQDN -U short@ad.domain.net -P 'password' -l 

==> works 

Note. no need to enable ssh on the vihost (the esxi) 

Note the adding the FQDN helped when contacting one of the ESXis of the farm, otherwise I had the SOAP timeout too. 

 

List all VM registered on the vCenter, 

  vmware-cmd --server VCENTER_HOST_FQDN --vihost ESXI_HOST_FQDN -U short@ad.domain.net -P 'password' -l 

==> doesn't work I get, 

  SOAP request error - possibly a protocol issue: 500 read timeout 

 

Quoting vmware doc, 

--server Target ESXi or vCenter Server system. 

--vihost When you run vmware-cmd with the -H option pointing to a vCenter Server system, use --vihost to specify the ESXi host to run the command against. 

 

References 

Installation de VMWare Vsphere Remote CLI 5.1 sur Centos/RHEL 6.4 (64 bits): http://www.hosthis.org/2013/05/installation-de-vmware-vsphere-remote-cli-5-1-sur-centosrhel-6-4-64-bits/ 

vSphere CLI for vSphere 5.5: https://developercenter.vmware.com/tool/vsphere_cli/5.5 

VMware vSphere CLI 5.5 Update 2: https://my.vmware.com/group/vmware/get-download?downloadGroup=VCLI55U2 

VMware vSphere CLI 6.0: https://my.vmware.com/group/vmware/details?downloadGroup=VCLI600&productId=489 

How to install perl modules (i.e. with cpan): https://access.redhat.com/solutions/4147 

vmware-cmd Overview: https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vcli.examples.doc%2Fcli_manage_vms.10.2.html 

How to Install VMware vSphere SDK for Perl 5.1: https://kb.op5.com/display/HOWTOs/How+to+Install+VMware+vSphere+SDK+for+Perl+5.1 

How to install VMWare ESXi CLI on CentOS 6.0?: http://serverfault.com/questions/368504/how-to-install-vmware-esxi-cli-on-centos-6-0