VMware vCenter Server 6.5 Installation Guide

Add to My manuals
18 Pages

advertisement

VMware vCenter Server 6.5 Installation Guide | Manualzz

vSphere SDK for Perl Installation Guide

ESXi 6.5

vCenter Server 6.5

This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs .

EN-002348-00

vSphere SDK for Perl Installation Guide

You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/

The VMware Web site also provides the latest product updates.

If you have comments about this documentation, submit your feedback to: [email protected]

Copyright

©

2007–2016 VMware, Inc. All rights reserved. Copyright and trademark information .

VMware, Inc.

3401 Hillview Ave.

Palo Alto, CA 94304 www.vmware.com

2 VMware, Inc.

Contents

About This Book 5

1

Installing vSphere SDK for Perl 7

Installation Overview 7

Overview of Linux Installation Process 8

Installing the vCLI Package on Red Hat Enterprise Linux 10

Installing Required Prerequisite Software for Red Hat Enterprise Linux 11

Installing the vCLI Package on RHEL with No Internet Access 11

Installing vCLI on Linux Systems with Internet Access 12

Installing Prerequisite Software for Linux Systems with Internet Access 12

Install the vCLI Package on a Linux System with Internet Access 14

Uninstall the vCLI Package on Linux 15

Installing and Uninstalling vCLI on Windows 15

Install the vCLI Package on Windows 15

Uninstall the vCLI Package on Windows 16

Enabling Certificate Verification 16

Deploying vMA 16

Index 17

VMware, Inc. 3

vSphere SDK for Perl Installation Guide

4 VMware, Inc.

About This Book

vSphere SDK for Perl Installation Guide provides information about installing the vSphere SDK for Perl.

VMware

®

provides several SDK products, each of which targets different developer communities and platforms. This guide is for administrators who want to run vSphere SDK for Perl scripts on vSphere systems and for developers who want to develop vSphere SDK for Perl scripts for vSphere systems.

Intended Audience

This book is intended for anyone who installs the vSphere SDK for Perl. All users must understand how to modify and run Perl scripts on the platform of their choice.

VMware Technical Publications Glossary

VMware Technical Publications provides a glossary of terms that might be unfamiliar to you. For definitions of terms as they are used in VMware technical documentation, go to http://www.vmware.com/support/pubs .

VMware, Inc. 5

vSphere SDK for Perl Installation Guide

6 VMware, Inc.

Installing vSphere SDK for Perl

You can install a vCLI package on a Linux or a Microsoft Windows system, or use vCLI as part of the vSphere Management Assistant that can be deployed on an ESXi host. The vCLI installer installs both vSphere SDK for Perl and vCLI.

This chapter includes the following topics: n

“Installation Overview,” on page 7

n n n n

“Overview of Linux Installation Process,” on page 8

“Installing the vCLI Package on Red Hat Enterprise Linux,” on page 10

“Installing vCLI on Linux Systems with Internet Access,” on page 12

“Uninstall the vCLI Package on Linux,” on page 15

n n n

“Installing and Uninstalling vCLI on Windows,” on page 15

“Enabling Certificate Verification,” on page 16

“Deploying vMA,” on page 16

Installation Overview

You can install a vCLI package on a supported platform or deploy the vMA virtual machine on an ESXi host.

n

Installable Package - Install a vCLI package on a physical or virtual machine. See “Installing the vCLI

Package on Red Hat Enterprise Linux,” on page 10,

“Installing vCLI on Linux Systems with Internet

Access,” on page 12, and

“Installing and Uninstalling vCLI on Windows,” on page 15.

1

VMware, Inc. 7

vSphere SDK for Perl Installation Guide

The vCLI installer installs both vSphere SDK for Perl and vCLI because many vCLI commands run on top of the vSphere SDK for Perl. The content of the installer package differs for different platforms.

n

Platform

Windows

Red Hat

Enterprise Linux

SLES and

Ubuntu

Installation Process

You must install required software. The installation package includes vCLI and vSphere SDK for

Perl.

You must install required software. See

“Installing Required Prerequisite Software for Red Hat

Enterprise Linux,” on page 11.

The installer for RHEL prompts you to choose whether you want to install additional modules from the Internet or from the package.

n n

If you have Internet access, you can configure the installer to download Perl modules from

CPAN.

The installer can instead install Perl modules that it does not find on your system from the installer package.

You must install required software and you must have Internet access. See “Installing

Prerequisite Software for Linux Systems with Internet Access,” on page 12.

The installer downloads other Perl modules from CPAN.

After installation, you can run vCLI commands and vSphere SDK for Perl utility applications from the operating system command line. Each time you run a command, you can specify the target server connection options directly or indirectly. You can also write scripts and manage your vSphere environment using those scripts.

vSphere Management Assistant (vMA) - Deploy vMA, a virtual machine that administrators can use to run scripts that manage vSphere, on an ESXi host. vMA includes vCLI, vSphere SDK for Perl, and other prepackaged software in a Linux environment.

vMA supports noninteractive login. If you establish an ESXi host as a target server, you can run vCLI host management commands and vSphere SDK for Perl commands against that server without additional authentication. If you establish a vCenter Server system as a target server, you can run most vCLI commands against all ESXi systems that server manages without additional authentication. See

“Deploying vMA,” on page 16.

Overview of Linux Installation Process

The installation script for vCLI is supported on the Linux distributions that are listed in the Release Notes.

The vCLI package installer installs the vCLI scripts and the vSphere SDK for Perl. The installation proceeds as follows.

1 The installer checks whether the following required prerequisite software are installed on the system.

Perl Perl version 5.8.8 or version 5.10 must be installed on your system

OpenSSL The vCLI requires SSL because most connections between the system on which you run the command and the target vSphere system are encrypted with SSL.

The OpenSSL library ( libssl-devel package) is not included in the default Linux distribution. See

“Installing Required Prerequisite Software for Red Hat Enterprise Linux,” on page 11 and

“Installing

Prerequisite Software for Linux Systems with Internet Access,” on page 12.

LibXML2 Used for XML parsing. The vCLI client requires 2.6.26 or later. If you have an older version installed, you must upgrade to 2.6.26 or later.

The libxml2 package is not included in the default Linux distribution. See

“Installing Required

Prerequisite Software for Red Hat Enterprise Linux,” on page 11 and

“Installing Prerequisite Software for Linux Systems with Internet Access,” on page 12.

uuid Included in uuid-devel for SLES 11 and in e2fsprogs-devel for other Linux platforms. Required by the UUID Perl module.

8 VMware, Inc.

Chapter 1 Installing vSphere SDK for Perl

2 If the required software is found, the installer proceeds. Otherwise, the installer stops and informs you that you must install the software. See

“Installing Required Prerequisite Software for Red Hat

Enterprise Linux,” on page 11 and

“Installing Prerequisite Software for Linux Systems with Internet

Access,” on page 12 for instructions.

3 The installer checks whether the following Perl modules are found, and whether the correct version is installed.

n n n n

Crypt-SSLeay-0.55 (0.55-0.9.7 or 0.55-0.9.8)

IO-Compress-Base-2.037

Compress-Zlib-2.037

IO-Compress-Zlib-2.037

n n n n n n n n

Compress-Raw-Zlib-2.037

Archive-Zip-1.28

Data-Dumper-2.121

XML-LibXML-1.63

libwww-perl-5.805

LWP-Protocol-https-6.02

XML-LibXML-Common-0.13

XML-NamespaceSupport-1.09

n n n n n n n n n n n n n n n n n n n n

XML-SAX-0.16

Data-Dump-1.15

URI-1.37

UUID-0.03

SOAP-Lite-0.710.08

HTML-Parser-3.60

version-0.78

Class-MethodMaker-2.10

JSON-PP-2.27203

Devel-StackTrace-131

Class-Data-Inheritable-0.08

Convert-ASN1-0.26

Cyrpt-OpenSSL-RSA-0.28

Crypt-X509-0.51

Exception-Class-1.37

MIME-Base64-3.14

UUID-Random-0.04

Socket6-023

IO-Socket-INET6-2.71

Net-INET6Glue-0.600_1

VMware, Inc. 9

vSphere SDK for Perl Installation Guide

Earlier versions of libwww-perl include the LWP-Protocol-https module. More recent versions of libwww-perl do not include the LWP-Protocol-https module and you must install that module.

Note If you intend to run vCLI commands with SSL certification, verify that LWP::UserAgent 6.00 or later is installed. The installer does not check this module, and earlier versions do not work with SSL.

4 The installer proceeds depending on the Linux distribution.

Linux

Distribution

RHEL (No

Internet access)

All Linux distributions

(Internet access)

Installer Behavior

If no Internet access is available, and a module is not currently on your system, the installer installs the module. If a different version of a module is found, the installer does not install it and proceeds with the installation. At the end of the installation process, the installer informs you if the version on the system does not match the recommended version, and recommends that you install the version that vCLI was tested with. You can install the modules by using the package installer for your platform, the installation CD, or CPAN.

Note The installer does not overwrite existing versions of recommended Perl modules. You must update those modules manually.

The installer proceeds depending on whether the Perl modules are found.

n

If a recommended Perl module is not found at all, the installer installs it using CPAN. You must meet the installation prerequisites or the installer cannot install the Perl modules and

stops. See “Installing vCLI on Linux Systems with Internet Access,” on page 12.

n

If an earlier version of a recommended module is found, the installer does not install a different version from CPAN and proceeds with the installation. After completing the installation, the installer displays a message that the version on the system does not match the recommended version, and recommends that you install the version vCLI was tested with. You can install the modules by using the package installer for your platform, the installation CD, or CPAN.

n

If a later version of a recommended module is found, the installer proceeds with the installation and does not display a message after the installation.

Note The installer does not overwrite existing versions of recommended Perl modules. You must update those modules manually.

5 After all required software and all prerequisite Perl modules are installed, you can install vCLI. See

“Installing Required Prerequisite Software for Red Hat Enterprise Linux,” on page 11 and

“Installing

Prerequisite Software for Linux Systems with Internet Access,” on page 12.

If a previous version of vCLI, Remote CLI, or vSphere SDK for Perl is installed on your system, and you install vCLI in a different directory, you must reset the PATH environment variable. You can reset the variable, before or after the installation, by using the command appropriate for your distribution and shell, for example setenv or export . If you do not reset the path, the system might still look for executable files in the old location.

Installing the vCLI Package on Red Hat Enterprise Linux

vCLI is supported on Red Hat Enterprise Linux (RHEL) versions that are listed in the Release Notes. On

RHEL, the vSphere SDK for Perl installer prompts you to choose whether you want to install required Perl modules from the installation package or from CPAN.

Follow these steps to install the software.

1 Install prerequisite software. See

“Installing Required Prerequisite Software for Red Hat Enterprise

Linux,” on page 11.

2 When prompted, choose one of the following options.

n n

Install additional prerequisite software from the installation package. See

“Installing the vCLI

Package on RHEL with No Internet Access,” on page 11.

Install additional prerequisite software from CPAN. See “Install the vCLI Package on a Linux

System with Internet Access,” on page 14.

10 VMware, Inc.

Chapter 1 Installing vSphere SDK for Perl

Installing Required Prerequisite Software for Red Hat Enterprise Linux

Prerequisite software on RHEL includes required software and recommended Perl modules.

Required Software

If required software is not installed, the vCLI installer stops. You can install the prerequisite software by using yum , the RHEL package installer, or from the installation DVD, as follows.

Platform Installation

RHEL 6.6 64-bit yum install e2fsprogs-devel libuuid-devel yum install glibc.i686

yum install perl-XML-LibXML

RHEL 7.1 64-bit yum install e2fsprogs-devel libuuid-devel openssl-devel perl-devel yum install glibc.i686 zlib.i686

yum install perl-XML-LibXML libncurses.so.5 perl-Crypt-SSLeay

Recommended Perl Modules

When the installer finishes, it might display a warning that the version of a module installed on your system does not match the version with which vCLI was tested. Install the recommended version by using yum or

CPAN to resolve the issue. See

“Overview of Linux Installation Process,” on page 8 for a complete list of

modules.

Note The installer does not overwrite existing Perl modules.

Installing the vCLI Package on RHEL with No Internet Access

Before you install vCLI, you must remove all previous versions of the software. The process differs from simply uninstalling vCLI.

Remove Previous Versions of vCLI on RHEL

If you have earlier versions of vCLI installed on RHEL, you must remove those installations before installing the latest version.

Procedure

1 Run the uninstall script, for example, if you installed vCLI in the default location, run the following command.

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

2 Delete existing versions of vSphere-CLI.xxxx.tar.gz

and delete the vmware-vsphere-cli-distrib directory.

What to do next

Install vCLI on RHEL.

Install vCLI on RHEL with No Internet Access

You can install vCLI on a Red Hat Enterprise Linux system that has no previous vCLI versions installed.

Prerequisites n

Remove previous vCLI installations.

n

Download the installation package.

VMware, Inc. 11

vSphere SDK for Perl Installation Guide

Procedure

1 Untar the vCLI binary that you downloaded.

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

A vmware-vsphere-vcli-distrib

directory is created.

2 Log in as superuser and run the installer.

/<location>/sudo vmware-vsphere-cli-distrib/vmware-install.pl

3 To accept the license terms, enter yes and press Enter.

4 To install Perl modules locally, enter yes and press Enter.

5 Specify an installation directory, or press Enter to accept the default, which is

/usr/bin

.

A complete installation process has the following result.

n

A success message appears.

n n

The installer lists different version numbers for required modules, if any.

The prompt returns to the shell prompt.

If you accepted the defaults during installation, you can find the installed software in the following locations.

n n n vCLI scripts –

/usr/bin vSphere SDK for Perl utility applications –

/usr/lib/vmware-vcli/apps vSphere SDK for Perl sample scripts –

/usr/share/doc/vmware-vcli/samples

What to do next

See the vSphere SDK for Perl documentation for a reference to all utility applications. After you install vCLI, you can test the installation by running a vCLI command or vSphere SDK for Perl utility application from the command prompt.

Installing vCLI on Linux Systems with Internet Access

Before you can install the vCLI package on a Linux system with Internet access, that system must meet specific prerequisites.

n

Internet access - You must have Internet access when you run the installer because the installer uses

CPAN to install prerequisite Perl modules.

n n

Development Tools and Libraries - You must install the Development Tools and Libraries for the Linux platform that you are working with before you install vCLI and prerequisite Perl modules.

Proxy settings - If your system is using a proxy for Internet access, you must set the http:// and ftp:// proxies, as follows: export http_proxy=<proxy_server>:port export ftp_proxy=<proxy_server>:port

Installing Prerequisite Software for Linux Systems with Internet Access

If the prerequisite software is not installed, the installer stops and requests that you install it.

Installation of prerequisite software depends on the platform that you are using. See the Release Notes for the supported versions of each Linux platform.

12 VMware, Inc.

Chapter 1 Installing vSphere SDK for Perl

Platform Installation

RHEL 6.6 64-bit Find the required modules on the installation DVD, or use yum to install them.

yum install e2fsprogs-devel libuuid-devel yum install glibc.i686

yum install perl-XML-LibXML

RHEL 7.1 64-bit Find the required modules on the installation DVD, or use yum to install them.

yum install e2fsprogs-devel libuuid-devel openssl-devel perl-devel yum install glibc.i686 zlib.i686

yum install perl-XML-LibXML libncurses.so.5 perl-Crypt-SSLeay

SUSE

Enterprise

Install the prerequisite packages from the SLES SDK DVD. When you insert the DVD, it offers to autorun. Cancel the autorun and use the yast package installer to install OpenSSL or other missing required packages.

n

SLES 11 SP3 64-bit

Ubuntu 12.04

64-bit n yast -i openssl-devel libuuid-devel libuuid-devel-32bit

SLES 12 64-bit yast -i openssl-devel libuuid-devel libuuid-devel-32bit e2fsprogs-devel

Some users might be authorized to use the Novell Customer Center and use yast to retrieve missing packages from there.

1 Connect to the Internet.

2 Update the local repository of libraries from a terminal window.

sudo apt-get update

3 Install the required libraries from a terminal window.

Ubuntu 14.04

64-bit

Ubuntu 15.10

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

For Ubuntu 12.04 64-bit, the resxtop and ESXCLI commands do not work if you do not install the 32bit compatibility libraries.

1 Connect to the Internet.

2 Update the local repository of libraries from a terminal window.

sudo apt-get update

3 Install the required libraries from a terminal window.

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 gcc-multilib buildessential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxmlperl libcrypt-ssleay-perl

For Ubuntu 14.04 64-bit, the resxtop and ESXCLI commands do not work if you do not install the 32bit compatibility libraries.

1 Connect to the Internet.

2 Update the local repository of libraries from a terminal window.

Ubuntu 16.04

64-bit sudo apt-get update

3 Install the required libraries from a terminal window.

sudo apt-get install lib32z1 lib32ncurses5 uuid uuid-dev perl libssl-dev perldoc libxml-libxml-perl libcrypt-ssleay-perl libsoap-lite-perl

For Ubuntu 15.10 64-bit, the resxtop and ESXCLI commands do not work if you do not install the 32bit compatibility libraries.

1 Connect to the Internet.

2 Update the local repository of libraries from a terminal window.

sudo apt-get update

3 Install the required libraries from a terminal window.

sudo apt-get install lib32z1 lib32ncurses5 uuid uuid-dev libssl-dev perl-doc libxml-libxml-perl libcrypt-ssleay-perl libsoap-lite-perl libmodule-build-perl

For Ubuntu 16.04 64-bit, the resxtop and ESXCLI commands do not work if you do not install the 32bit compatibility libraries.

VMware, Inc. 13

vSphere SDK for Perl Installation Guide

Install the vCLI Package on a Linux System with Internet Access

You can install the vCLI package and run a command to verify that installation was successful.

Prerequisites

Verify that you have installed the required prerequisite software.

Procedure

1 Log in as root.

2 Untar the vCLI binary that you downloaded.

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

A vmware-vsphere-vcli-distrib

directory is created.

3 (Optional) If your server uses a proxy to access the Internet, and if your http:// and ftp:// proxy were not set when you installed prerequisite software, set them now.

export http_proxy=<proxy_server>:port export ftp_proxy=<proxy_server>:port

4 Run the installer.

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

5 To accept the license terms, enter yes and press Enter.

The installer connects to CPAN and installs prerequisite software. Establishing a connection might take a long time.

6 On RHEL, when prompted to install precompiled Perl modules, enter no and press Enter to use CPAN.

The installer connects to CPAN and installs prerequisite software. Establishing a connection might take a long time.

7 Specify an installation directory, or press Enter to accept the default, which is

/usr/bin

.

A complete installation process has the following result.

n n n

A success message appears.

The installer lists different version numbers for required modules, if any.

The prompt returns to the shell prompt.

If you accepted the defaults during installation, you can find the installed software in the following locations.

n n n vCLI scripts –

/usr/bin vSphere SDK for Perl utility applications –

/usr/lib/vmware-vcli/apps vSphere SDK for Perl sample scripts –

/usr/share/doc/vmware-vcli/samples

What to do next

See the vSphere SDK for Perl documentation for a reference to all utility applications. After you install vCLI, you can test the installation by running a vCLI command or vSphere SDK for Perl utility application from the command prompt.

14 VMware, Inc.

Chapter 1 Installing vSphere SDK for Perl

Uninstall the vCLI Package on Linux

You can use a script included in the installation to uninstall the vCLI package.

Procedure

1 Navigate to the directory where you installed vCLI.

The default directory is /usr/bin .

2 Run the vmware-uninstall-vSphere-CLI.pl

script.

The command uninstalls vCLI and the vSphere SDK for Perl.

Installing and Uninstalling vCLI on Windows

Before you can run vCLI commands from your Windows system, you must install the vCLI package and test the installation by running a command.

Install the vCLI Package on Windows

The vCLI installation package for Windows installs vSphere SDK for Perl and vSphere CLI, but does not include the ActivePerl runtime from ActiveState Software.

The vCLI is supported on the Windows platforms that are listed in the Release Notes.

Important If you want to run ESXCLI commands included in vCLI from a Windows system, you must have the Visual C++ 2008 redistributable for 32-bit installed on that system. Find vcredist_x86.exe

for

Visual C++ 2008 and install it on your Windows system.

Prerequisites

Verify that you have ActivePerl or Strawberry Perl version 5.14 or later installed on your Windows system.

Procedure

1 Download the vCLI Windows installer package.

You can find the installer in the Automation Tools and SDKs section of the Drivers & Tools tab of the vSphere download page.

2 Start the installer.

3 (Optional) If prompted to remove older versions of vSphere SDK for Perl or vCLI, you can either accept or cancel the installation, and install the vCLI package on a different system.

Important The installer replaces both the vSphere SDK for Perl and vCLI. To keep an older version, install this package on a different system.

4 Click Next in the Welcome page.

5 To install the vCLI in a nondefault directory, click Change and select an alternative directory.

The default location is C:\Program Files\VMware\VMware vSphere CLI .

6 Click Next.

7 Click Install to proceed with the installation.

The installation might take several minutes to complete.

8 Reboot your system.

If you do not reboot, path settings might not be correct on your Windows platform.

VMware, Inc. 15

vSphere SDK for Perl Installation Guide

Uninstall the vCLI Package on Windows

You can uninstall the vCLI package by following the standard Windows procedure.

Procedure

1 Find the option for adding and removing programs on the Windows operating system that you are using.

2 In the panel that appears, select VMware vSphere CLI and click Remove.

3 Click Yes when prompted.

The system uninstalls vCLI and vSphere SDK for Perl.

Enabling Certificate Verification

You can enable certificate verification by using variables.

The vSphere SDK for Perl and vCLI use Crypt::SSLEay to support certificate verification. Crypt::SSLEay enables verification of certificates signed by a Certificate Authority (CA) if you set the following two variables.

n n

HTTPS_CA_FILE – The CA file.

HTTPS_CA_DIR – The CA directory.

See the Crypt::SSLEay documentation for details on setup.

Caution If the two environment variables HTTPS_CA_FILE and HTTPS_CA_DIR are set incorrectly or if a problem with the certificate exists, vCLI commands do not complete, and do not display error or warning messages. Use HTTPS_DEBUG for troubleshooting before running vCLI commands.

Deploying vMA

As an alternative to a package installation, you can deploy vMA on an ESXi host and run vCLI commands from there.

vMA is a virtual machine that you can use to run scripts to manage ESXi systems. vMA includes a Linux environment, vCLI, and other prepackaged software.

Setting up vMA consists of several tasks. For details about each task, see the vSphere Management Assistant

Guide.

1 Deploy vMA to an ESXi system that meets the hardware prerequisites.

See the vSphere Management Assistant Guide for prerequisites and deployment details.

2 Configure vMA.

When you boot vMA, you must specify the following required configuration information when prompted.

n n

Network information (the default is often acceptable)

Host name for vMA n

Password for the vi-admin user. The vi-admin user has superuser privileges on vMA. You cannot log in to vMA as the root user.

3 (Optional) Add a vCenter Server system or one or more ESXi systems as targets. You configure vMA for

Active Directory authentication and can then add ESXi and vCenter Server systems to vMA without having to store passwords in the vMA credential store. See the vSphere Management Assistant Guide.

16 VMware, Inc.

Index

E

enable certificate verification

16

G

glossary

5

I

installation

Linux process overview 8

overview 7

Red Hat Enterprise Linux

10

Red Hat Enterprise Linux prerequisites

11

Red Hat Enterprise Linux with no Internet

access 11

remove previous RHEL versions

11

vCLI prerequisite software on Linux with

Internet access

12

vCLI on Windows 15

vCLI on Linux with Internet access

12

vCLI on RHEL with no Internet access 11

installing vCLI on Linux with Internet access

14

vCLI package on Windows

15

intended audience

5

U

uninstalling

vCLI package on Linux 15

vCLI package on Windows

16

V

vMA, deployment

16

VMware, Inc. 17

vSphere SDK for Perl Installation Guide

18 VMware, Inc.

advertisement

Related manuals

advertisement