Instalar vSphere SDK for Perl en Debian

vSphere Commnand-line Interface (vSphere CLI) es un conjunto de comandos que permiten ejecutar comandos de administracion del sistema contra sistemas ESX/ESXi desde cualquier maquina con acceso a la red. Tambien podemos ejecutar la mayoria de los comandos contra un vCenter Server y establecer como objetivo cualquier ESX/ESXi que gestione el vCenter Server. Los comando de vSphere CLI son especialmente utiles para los Hosts ESXi por que los ESXis no disponen de “service console”.

Los comandos de vSphere CLI se ejecutan en el SDK vSphere para Perl.

 

Instalamos dependencias.

 

32 bit.

sudo apt-get install build-essential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxml-perl libcrypt-ssleay-perl


64 bit.

sudo apt-get install ia32-libs build-essential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxml-perl libcrypt-ssleay-perl

Descargamos vSphere SDK for Perl

http://communities.vmware.com/community/vmtn/developer/forums/vsphere_sdk_perl

Descomprimimos y accedemos al directorio

tar xvf VMware-vSphere-Perl-SDK-5.1.0-780721.i386.tar.gz

cd vmware-vsphere-cli-distrib

Editamos el archivo vmware-install.pl

vi vmware-install.pl

Buscamos la siguientes lineas:

# check for e2fsprogs-devel installed
if ( direct_command("cat /etc/*release | grep -i ubuntu") || direct_command("cat /proc/version | grep -i ubuntu") ) {
my $libssl_dev = direct_command("dpkg-query -W -f='\${Version}\n' '*ssl-dev*' ");
if ( $libssl_dev ) {
$OpenSSL_dev_installed = 1;
}   else {
print wrap("libssl-dev $minimum_ssl_version is required for encrypted connections.\n" .
"Please install libssl-dev version $minimum_ssl_version or greater.\n\n", 0);
}
Lo cambiamos por lo siguiente:

# check for e2fsprogs-devel installed
if ( direct_command("cat /etc/issue | grep -i debian") || direct_command("cat /proc/version | grep -i debian") ) {
my $libssl_dev = direct_command("dpkg-query -W -f='\${Version}\n' '*ssl-dev*' ");
if ( $libssl_dev ) {
$OpenSSL_dev_installed = 1;
}   else {
print wrap("libssl-dev $minimum_ssl_version is required for encrypted connections.\n" .
"Please install libssl-dev version $minimum_ssl_version or greater.\n\n", 0);
}

Exportamos las variables de entorno de proxy…ya que si no nos va a dar error.

export http_proxy=
export ftp_proxy=

Instalamos!!

[root@redorbita][/home/rokitoh/vmware-vsphere-cli-distrib]% ./vmware-install.pl
Creating a new vSphere CLI installer database using the tar4 format.

Installing vSphere CLI 5.1.0 build-780721 for Linux.

You must read and accept the vSphere CLI End User License Agreement to
continue. [ENTER]
Press enter to display it.

VMware(r) Software Development Kit (SDK) License Agreement

VMware, Inc. ("VMware") provides the vSphere Command Line Interface (vSphere
CLI) and/or the vSphere Software Development Kit for Perl (vSphere SDK for
Perl) (collectively the "Software") to you subject to the following terms
and conditions.  By downloading, installing, or using the Software, you (the
individual or legal entity) agree to be bound by the terms of this license
agreement (the "Agreement"). If you disagree with any of the following
terms, then do not use the Software.

1.  The Software contains a variety of materials, interface definitions,
documentation, sample utility applications and sample code regarding
programming interfaces to one or more VMware products that are referenced in
such materials (the referenced products, "VMware Products").  This Software
is intended to be used to execute supplied commands and utility applications
and to create scripts that interact with the VMware Products.

2.  Use Rights:  Subject to the restrictions below, you may download and
make a reasonable number of copies of the Software for your use solely for
the purpose of creating software that communicates with VMware Products
(your software, "Developer Software").  For vSphere SDK for Perl, some code
may be designated as "distributable code" and/or "modifiable code" at
http://www.vmware.com/go/vsdkperl-redistribution-info.  For vSphere CLI,
some code may be designated as "distributable code" and/ or "modifiable
code" at http://www.vmware.com/go/vcli-redistribution-info.  You may use and
merge all or portions of the "distributable code" with your Developer
Software.  Any merged portion of any "distributable code" is subject to this
Agreement.  Additionally, you may modify or create derivative works of all
or portions of the "modifiable code."  You are permitted to re-distribute
the "distributable code" and the modified or derivative works of the
"modifiable code" only as part of your Developer Software for non-commercial
or commercial use; provided that you shall only distribute such code subject
to a license agreement that protects VMware's and its licensors' interests
consistent with the terms contained in this Agreement.  Open source software
components provided with the Software are licensed to you under the terms of
the applicable license agreements included with such open source software
components.  The open source software licenses can be found in the
open_source_licenses.txt file, other materials accompanying the Software,
the documentation or corresponding source files available at
http://www.vmware.com/download/open_source.html.

3.  Restrictions:  You agree that you will not (1) use the Software to
create, design or develop anything other than Developer Software; (2) make
any more copies of the Software than are reasonably necessary for the
authorized use and backup and archival purposes; (3) modify, create
derivative works of, reverse engineer, reverse compile, or disassemble the
Software except as expressly permitted in Section 2; (4) distribute, sell,
lease, rent, lend, or sublicense any part of the Software to any third party
except as expressly permitted in Section 2; or (5) use the Software in any
manner to (a) circumvent any technical restrictions of VMware Products or
violate any additional licensing terms applicable to VMware Products that
VMware provides through product documentation, email notification on the
VMware website or in the terms of the End User License Agreements; (b)
disable, remove, over-ride or modify the display of any VMware Product End
User License Agreements that the VMware Products present to the end
customers; or (c) upload or otherwise transmit any material containing
software viruses or other computer code, files or programs designed to
interrupt, destroy, or limit the functionality of any software or hardware.

The restrictions in this Section 3 shall not apply if and to the extent they
contradict mandatory local law (including, but not limited to, law
implementing the EC Software Directive).

4.   VMware retains ownership of the Software and all intellectual property
rights embodied in the Software, including without limitation all
copyrights, trade secrets and patents. You may not remove, delete or modify
any of VMware copyright statements in the Software.  ALL RIGHTS NOT
EXPRESSLY GRANTED HEREUNDER ARE RESERVED TO VMWARE.

5.  You may not use VMware's name, trademarks or service marks in connection
with your Developer Software in a way that suggests your Developer Software
is certified or endorsed by VMware.

6.  You are not entitled under this Agreement to receive any VMware support
or subscription services for the Software or any other services from VMware
in connection with the Software.  If you have purchased support and/or
subscription services for a VMware product, such support and/or subscription
services shall not apply to the Software or your use of the Software.

7.  Term, Termination and Changes: This Agreement shall continue as long as
you are in compliance with the terms specified herein or until otherwise
terminated.  You or VMware each may terminate this Agreement for any reason
at any time.  You agree, upon termination, to destroy all copies of the
Software within your possession or control. The Confidential Information,
Limitations of Warranties and Liability, and Indemnification sections set
out in this Agreement shall survive any termination or expiration of this
Agreement.

8.  Confidential Information:  "Confidential Information" means any
information disclosed by VMware to you pursuant to this Agreement that is
marked "Confidential," "Proprietary," or in some similar manner and any
information which you knew or reasonably should have known to be
confidential.  You shall treat as confidential all Confidential Information
of VMware and shall not use such Confidential Information except to exercise
your rights or perform your obligations under this Agreement.  You will
protect Confidential Information from unauthorized use, access, or
disclosure in the same manner as you protect your own confidential or
proprietary information of a similar nature but with no less than reasonable
care.  You shall not disclose such Confidential Information to any third
party during or after the term of this Agreement.  This paragraph will not
apply to any Confidential Information that: (a) was rightfully in your
possession prior to receipt of such Confidential Information from VMware;
(b) is or becomes a matter of public knowledge through no fault of you; (c)
is rightfully received from a third party without a duty of confidentiality;
(d) is independently developed by you without breach of any confidentiality
obligations; (e) is disclosed by you with VMware's prior written approval;
or (f) you are required to disclose by applicable law or court order,
provided that you notify VMware of such required disclosure promptly in
writing and cooperate with VMware in any lawful action to contest or limit
the scope of such required disclosure.  You acknowledge that breach of this
Section 8 will cause irreparable damage to VMware for which monetary damages
will be an inadequate remedy.   Accordingly, VMware will be entitled to seek
and obtain injunctive and any other relief (legal or equitable) to restrain
any breach or anticipated breach of this Section 8.

9.  Limitations of Warranties and Liability:  THE SOFTWARE IS PROVIDED "AS
IS" WITHOUT ANY WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE LAW, VMWARE DISCLAIMS ANY IMPLIED WARRANTIES, INCLUDING, WITHOUT
LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL VMWARE
BE LIABLE FOR ANY LOST PROFITS OR BUSINESS OPPORTUNITIES, LOSS OF USE,
BUSINESS INTERRUPTION, LOSS OF DATA, OR ANY OTHER INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE SOFTWARE OR YOUR USE
OF THE SOFTWARE, UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT,
TORT, NEGLIGENCE, PRODUCT LIABILITY, OR OTHERWISE.  BECAUSE SOME
JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR
CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE PRECEDING LIMITATION MAY NOT APPLY
TO YOU.

VMWARE'S LIABILITY ARISING OUT OF THIS AGREEMENT AND THE SOFTWARE PROVIDED
HEREUNDER WILL NOT, IN ANY EVENT, EXCEED US$10,000.00.

THE FOREGOING LIMITATIONS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE LAW, REGARDLESS OF WHETHER VMWARE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF WHETHER ANY REMEDY FAILS OF
ITS ESSENTIAL PURPOSE.

10.  Indemnification: You agree to defend, indemnify and hold harmless
VMware, and any of its directors, officers, employees, affiliates and
agents, from and against any and all claims, losses, damages, liabilities
and other expenses (including reasonable attorneys' fees), arising from your
modification of the "modifiable code," the distribution or use of your
Developer Software by you or anyone else, and your breach of this Agreement.

11.  Export Control: You acknowledge that the Software is of United States
origin, is provided subject to the U.S. Export Administration Regulations,
may be subject to the export control laws of the applicable territory, and
that diversion contrary to applicable export control laws is prohibited. You
represent, warrant and covenant that (1) you are not, and are not acting on
behalf of, (a) any person who is a citizen, national, or resident of, or who
is controlled by the government of any country to which the United States
has prohibited export transactions; or (b) any person or entity listed on
the U.S. Treasury Department list of Specially Designated Nationals and
Blocked Persons, or the U.S. Commerce Department Denied Persons List or
Entity List; and (2) you will not permit the Software to be used for any
purposes prohibited by law, including, any prohibited development, design,
manufacture or production of missiles or nuclear, chemical or biological
weapons.

12.  Data Privacy: VMware's privacy policy (http://www.vmware.com/help/privacy.html)
shall apply.

13.  These terms are governed by the laws of the State of California and the
United States of America without regard to conflict of laws principles.  The
United Nations Convention for the International Sale of Goods shall not
apply.  You may not assign this Agreement.  Any attempted assignment by you
shall be void.  These terms constitute the entire agreement between you and
VMware with respect to the Software and supersede all prior written or oral
communications, understandings and agreements. Any waiver of these terms
must be in writing and signed by the waiving party to be effective. If any
provision of these terms is found to be invalid or unenforceable, the
remaining terms will continue to be valid and enforceable to the fullest
extent permitted by law.

Rev 32312

Do you accept? (yes/no) yes

Thank you.

Please wait while configuring CPAN ...

Please wait while configuring perl modules using CPAN ...

CPAN is downloading and installing pre-requisite Perl module "Archive::Zip" .

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 "Data::Dump" .

CPAN is downloading and installing pre-requisite Perl module "SOAP::Lite" .

In which directory do you want to install the executable files?
[/usr/bin]

Please wait while copying vSphere CLI files...

The installation of vSphere CLI 5.1.0 build-780721 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
"/usr/bin/vmware-uninstall-vSphere-CLI.pl".

This installer has successfully installed both vSphere CLI and the vSphere SDK
for Perl.

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

Compress::Zlib 2.037 or newer
Compress::Raw::Zlib 2.037 or newer
ExtUtils::Installed 1.54 or newer
version 0.78 or newer
IO::Compress::Base 2.037 or newer
IO::Compress::Zlib::Constants 2.037 or newer
HTML::Parser 3.60 or newer
URI 1.37 or newer
LWP::Protocol::https 5.805 or newer

Enjoy,

--the VMware team

[root@redorbita][/home/rokitoh/vmware-vsphere-cli-distrib]%

Un saludo, rokitoh

:wq!

3 comentarios en “Instalar vSphere SDK for Perl en Debian”

  1. Pingback: Red-Orbita

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *