VMware Cloud Community
cookieme
Enthusiast
Enthusiast

Installing vCLI on Ubuntu Server 9.04

Hi

I not very familiar with Linux/ UNIX, but I have setup an Ubuntu Server 9.04 minimal install as a VM and I am trying to install vCLI. I went through the manual and this particular Ubuntu version is not on the supported list, so I went ahead and first installed all the pre-requisites:

- Linker utility (binutils package)

- GNU C libraries (glibc or libc6 package) 

- XML DOM/SAX libraries (libxml2 package)

- Perl documentation (perl-doc) package

- Perl URI library (liburi-perl package)

- libssl-dev

After installing the above I ran the following commands:

untar -xf vmware_vcli.tar.gz

cd vmware-vsphere-cli-distrib

sudo ./vmware-install.pl

It asks me if I want to overwrite some perl modules, so I answer the default yes and then the installer finishes successfully.

However, when I cd /usr/bin and try to run any command such as vmware-cmd I get the following error:

/usr/bin/perl: symbol lookup error: /usr/lib/perl/5.10/auto/XML/LibXML/Common/Common.so: undefined symbol: Perl_Tstack_sp_ptr

What am I doing wrong?

Thanks

0 Kudos
23 Replies
lamw
Community Manager
Community Manager

Trying Ubuntu Server 9.04 32bit with vCLI 32bit installer, you'll notice the following error after installation:


ld: cannot find -lcrypto
Unable to link the Crypt::SSLeay Perl module.  Secured connections will be
unavailable until you install the Crypt::SSLeay module.

This should be a hint on what the issue is and it's just missing the Perl module.

You'll need both gcc and make if you don't have it on your system already

sudo apt-get install gcc
sudo apt-get install make

Here are the steps to remediate:

sudo apt-get install libxml-libxml-perl
wget http://search.cpan.org/CPAN/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-2.15.tar.gz
tar -zxvf Class-MethodMaker-2.15.tar.gz
cd Class-MethodMaker-2.15/
./configure
make
make test
sudo make install

Once that is done, you can try vmware-cmd --help and it should work:

primp@ubuntu-test-32bit:~$ vmware-cmd --help
   Usage: vmware-cmd <options> <vm-cfg-path> <vm-action> <arguments>
          vmware-cmd -s <options> <server-action> <arguments>

     Options:
       Connection Options:
          -H or --server <host>            specifies an ESX host or a Virtual Center
          -T <target host>                 specifies a target host if host is a virtual center
          -O <port>                        specifies an alternative port
....

Let me know if this works for you and I'll update the document tonight referencing both 32bit/64bit steps for installing vCLI on Ubuntu Server 9.04

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
cookieme
Enthusiast
Enthusiast

Thanks for trying with 32bit version. I have done some testing of my own and I do not get your error message! This is my procedure:

1. Clean install Ubuntu Server 9.04 with option F4 "minimal virtual machine"

2. Do not select any packages towards the end of installation.

3. Following the prerequisites in "vSphere SDK for Perl Installation Guide" I installed the following packages:

installed libssl-dev

installed libxml-libxml-perl

installed libclass-methodmaker-perl

4. Now all the prerequisites, i.e.

␣ Linkerutility(binutilspackage)

␣ GNUClibraries(glibcorlibc6package)

␣ XMLDOM/SAXlibraries(libxml2package)

␣ Perldocumentation(perl-doc)package (except this one)

␣ PerlURIlibrary(liburi-perlpackage)

Are installed when I search using dpkg -l | grep package

5. Install vCLI

tar -zxvf vCLI.tar.gz*

cd vmware-vsphere-cli-distrib

sudo ./vmware-install.pl

Installation runs and asks if you want to overwrite some files I chose the default (yes).

The installation is successful without any errors!

6. Test vCLI

vmware-cmd --help

yes this works, but try to run a command against an ESXi server

vmware-cmd --server <IP_address> '[datastore1] testvm\testvm.vmx' getstate

returns the following error:

"hiding the command line arguments : symbol lookup error: /usr/lib/perl/5.10/auto/Crypt/SSLeay/SSLeay.so: undefined symbol: Perl_Tstack_sp_ptr"

0 Kudos
lamw
Community Manager
Community Manager

Not sure why you're having such a hard time, it works perfectly fine for me actually.

You may also need this:

sudo apt-install libcrypt-ssleay-perl 

primp@ubuntu-test-32bit:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 9.04
Release:        9.04
Codename:       jaunty

primp@ubuntu-test-32bit:~$ esxcfg-nas -l --server himalaya.primp-industries.com --username root
Enter password:

dlgCore-NFS-bigboi.VM-Backups is /exports/XXXXXX from A.B.C.D mounted

I would recommend trying the exact packages I have and don't do any additional.

Good Luck

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
manse
Contributor
Contributor

Hi, just wanted to add - I had the exact same problem and

sudo apt-install libcrypt-ssleay-perl

fixed my issues with Ubuntu 9.10 64bit

Many thanks...

0 Kudos