I wasted a bunch of time today figuring my way around numerous issues so I figured I'd post about it in hopes Google picks it up and others find the thread so they don't waste as much time.
I have a CentOS 5.5 x86_64 (aka RedHat Enterprise 5) system that had been set up with vCLI to communicate with a vCenter 4.1 server and numerous ESXi 4.1 hosts, mostly just for command line resetting of vm's, etc. We upgraded vCenter to 5.1 and will soon be upgrading the hosts so the old vCLI commands stopped functioning.
I downloaded the VMware-vSphere-CLI-5.1.0-780721.x86_64.tar.gz file from the vCLI 5.1 download page in my portal. It extracts to vmware-vsphere-cli-distrib. Vmware's documentation would have you believe installing everything is as simple as running vmware-vsphere-cli-distrib/vmware-isntall.pl and it takes care of the rest for you. What it actually did is correctly recognize that I had a version 4.1 install of vCLI and told me it would need to be removed before the 5.1 install goes on and would I like it to do that for me? Sure. It spits out a license agreement and then acts as if everything went fine when all it apparently did was uninstall my 4.1 commands and did nothing else.
So, here's the process of getting things working again that I had to took; some steps may be unecessary and/or redundant, but no way for me to know which ones were after the fact, just that it works now:
yum install libxml2-devel perl-Crypt-SSLeay expat-devel perl-Archive-Zip
These are all standard RHEL packages. The installer stupidly needs these for the perl library install portion to complete but doesn't bother to tell you this, doesn't attempt to install them and just fails silently.
install Class::Inspector
install ExtUtils-MakeMaker
install SOAP::Lite
install Task::Weaken
install Test::Simple
install UUID
install XML::LibXML
install XML::NamespaceSupport
install XML::Parser
install XML::SAX
install XML::SAX-Base
Some of these are pre-reqs for one or more of each other, so as you go through the list, you may find it asks you to install one or more of them to complete installing one of the others, so then when you go to install the one in question, it will tell you its already up to date; no harm. Now, some of these will fail to install for whatever reason, and when that occurs, you'll need to exit the interactive shell (type ctrl-D) and go to /root/.cpan/build/ and then into the directory of the module file in question. For example, UUID will fail, so you'll end up going to /root/.cpan/build/UUID-0.05/ and in there you'll want to type: perl Makefile.PL followed by make followed by 'make install' Several of the modules need to be installed manually in that manner. Each time you encounter one that requires the manual install, just complete it and then go back into the CPAN shell and install the next module.
Hi,
I followed your instruction to install VCLI in my CentOS machine. but still I am getting bellow miss CPAN shell. I have tried to install it but still it not install.
So Please help me to fix this issue.
Please wait while configuring CPAN ...Please wait while configuring perl modules using CPAN ...CPAN is downloading and installing pre-requisite Perl module "Archive::Zip" .Archive::Zip Install Command failed .CPAN is downloading and installing pre-requisite Perl module"Class::MethodMaker" .CPAN is downloading and installing pre-requisite Perl module "UUID" .CPAN is downloading and installing pre-requisite Perl module"XML::LibXML::Common" .CPAN is downloading and installing pre-requisite Perl module "XML::LibXML" .CPAN not able to install following Perl modules on the system. These must beinstalled manually for use by vSphere CLI:Archive::Zip 1.28 or newerClass::MethodMaker 2.10 or newerUUID 0.03 or newerXML::LibXML::Common 0.13 or newerXML::LibXML 1.63 or newer
The fact that it's trying to download some of the things in my list of pre-reqs makes it sound like you may have skipped that part? UUID for example. You need to start the cpan shell and install all the things in the list I gave or the vCLI will fail to install.
Thanks for this post!
I was going crazy trying to figure out how to get this installed on CentOS 6.4. UUID was the final piece that kept failing because I didn't realize that I didn't have enough of the develoment tools installed. I did a "yum -y groupinstall "development tools" and it gave me enough to finally complete the make.
Then, I realized that I needed to yum install the devel UUID packages. What a pain, but finally the installer finished.
Thanks!
-Derek
Thank you for your post.
Unfortunately, after much struggling, I was unable to install vCLI 5.1 on CentOS 5 x86_64. Mercifully, the vCLI 5.5 has been released recently and it installs with the option of using precompiled Perl scripts. With that option selected I was able to quickly install it. vCLI 5.5 is backward compatible with ESX 5.x, so seems to be a good solution.
Try this first:
# yum -y install libuuid-devel
This was a bug that is fixed now: https://rt.cpan.org/Public/Bug/Display.html?id=76126
#