Code Snippet

Just another Code Snippet site

[ESX] vSphere CLI

Install CLI (with internet access) : https://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.vcli.getstart.doc%2Fcli_install.4.5.html
without internet access : https://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.vcli.getstart.doc%2Fcli_install.4.4.html

Pre requisite :

yum install e2fsprogs-devel libuuid-devel glibc.i686 perl-XML-LibXML

DL VMware-vSphere-CLI-6.X.X-XXXXX.XXXX.x86_64.tar.gz from VM Ware siteUnzip the installer :

tar –zxvf VMware-vSphere-CLI-6.X.X-XXXXX.XXXX.x86_64.tar.gz

Execute the installer :

cd vmware-vsphere-cli-distrib
./vmware-install.pl

Connect to the vSphere server

esxcli --server <ESXI_HOSTNAME_OR_IP> --username <MY_USERNAME> --password <MY_PASSWORD>