VMware ESXI - 6.5 User Manual

5 (1)

Getting Started with vSphere Command-Line Interfaces

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-002351-00

Getting Started with vSphere Command-Line Interfaces

You can find the most up-to-date technical documentation on the VMware Web site at: h p 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: docfeedback@vmware.com

Copyright © 2007–2017 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 Managing vSphere with Command-Line Interfaces

7

Overview of vSphere Command-Line Interfaces 7

 

Using ESXCLI for Host Management 10

 

ESXCLI Syntax 10

 

Running ESXCLI Commands Installed as Part of vCLI

11

ESXCLI Command Support When Host and vCLI Versions Do Not Match 11

Using PowerCLI to Manage Hosts and Virtual Machines

12

Using DCLI to Manage vCenter Services 12

 

DCLI Syntax

13

 

vCLI Package Contents 13

 

2 Installing vCLI

15

 

 

 

Installation Overview 15

 

 

 

Overview of Linux Installation Process

16

 

 

Installing the vCLI Package on Red Hat Enterprise Linux 18

 

Installing Required Prerequisite Software for Red Hat Enterprise Linux

19

Installing the vCLI Package on RHEL with No Internet Access 19

 

Installing vCLI on Linux Systems with Internet Access 20

 

Installing Prerequisite Software for Linux Systems with Internet Access

20

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

 

Uninstall the vCLI Package on Linux

23

 

 

Installing and Uninstalling vCLI on Windows

23

 

Install the vCLI Package on Windows 23

 

 

Uninstall the vCLI Package on Windows

24

 

Enabling Certificate Verification 24

 

 

 

Deploying vMA

24

 

 

 

3 Running Host Management Commands in the ESXi Shell 25

ESXi Shell Access with the Direct Console 25

Enabling Local ESXi Shell Access

26

 

ESXi Shell Timeout 26

 

 

Use the Local ESXi Shell 27

 

 

Remote ESXi Shell Access with SSH

27

 

Enable SSH Access in the Direct Console

27

Enable SSH from the vSphere Web Client

27

Access the Remote ESXi Shell with SSH

28

Lockdown Mode 28

 

 

Run an ESXCLI Command in the ESXi Shell

28

VMware, Inc.

3

Getting Started with vSphere Command-Line Interfaces

4 Running vCLI Host Management Commands 31

 

 

 

 

Overview of Running vCLI Host Management Commands

32

 

 

Targeting the Host Directly

32

 

 

 

 

Targeting a Host That is Managed by a vCenter Server System

32

 

Protecting Passwords 32

 

 

 

 

 

 

Order of Precedence for vCLI Host Management Commands

33

 

Authenticating Through vCenter Server and vCenter Single Sign-On

34

Authenticating Directly to the Host 34

 

 

 

 

Create and Use a Session File

34

 

 

 

 

Using Environment Variables

35

 

 

 

 

Using a Configuration File

36

 

 

 

 

 

Using Command-Line Options

36

 

 

 

 

Using the Microsoft Windows Security Support Provider Interface

37

vCLI and Lockdown Mode

38

 

 

 

 

Trust Relationship Requirement for ESXCLI Commands

38

 

 

 

Download and Install the vCenter Server Certificate

38

 

 

 

Using the cacertsfile Option

39

 

 

 

 

Using the --thumbprint Option

39

 

 

 

 

Use the Credential Store 39

 

 

 

 

 

Common Options for vCLI Host Management Command Execution

40

Using vCLI Commands in Scripts

42

 

 

 

 

Run Host Management Commands from a Windows System

43

 

 

Run Host Management Commands from a Linux System

43

 

 

5 Running DCLI Commands

45

Overview of Running DCLI Commands 45

DCLI Syntax

46

 

DCLI Options

46

 

Using DCLI Commands 48

 

Displaying Help Information for DCLI Commands 48

Running DCLI Commands Included in the vCLI Package 48

Running DCLI Commands on the vCenter Server Appliance 49

Using DCLI with a Credential Store File 49

Order of Precedence for DCLI Authentication 49

Input, Output, and Return Codes 50

Using DCLI with Variables 50

 

Using DCLI Interactive Mode

50

DCLI SSL Connection 51

 

DCLI History File

51

 

Index 53

4

VMware, Inc.

About This Book

n Started with vSphere Command Line Interfaces gives an overview of command-line interfaces in vSphere and gets you started with ESXi Shell commands and vCLI (VMware® vSphere Command-Line Interface) commands. This book also includes instructions for installing vCLI and a reference to connection parameters.

Intended Audience

This book is for experienced Windows or Linux system administrators who are familiar with vSphere administration tasks and data center operations.

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

h p www vmware com support pubs.

Related Documentation

The documentation for vCLI is available in the vSphere Documentation Center and on the vCLI documentation page. Go to h p www vmware com support developer vcli.

nvSphere Command Line Interface Concepts and Examples presents usage examples for many host management commands, and explains how to set up software and hardware iSCSI, add virtual switches, place hosts in maintenance mode, and so on. The document includes the same example with the ESXCLI command and with the vicfg- command.

nvSphere Command Line Interface Reference is a reference to both ESXCLI commands and vicfg- commands. The vicfg- command help is generated from the POD available for each command, run pod2html for any vicfg- command to generate individual HTML files interactively. The ESXCLI reference information is generated from the ESXCLI help.

nDCLI Reference is a reference to DCLI commands for managing vCenter services.

The documentation for PowerCLI is available in the vSphere Documentation Center and on the PowerCLI documentation page.

The vSphere SDK for Perl documentation explains how you can use the vSphere SDK for Perl and related utility applications to manage your vSphere environment.

The vSphere Management Assistant Guide explains how to install and use the vSphere Management Assistant (vMA). vMA is a virtual machine that includes vCLI and other prepackaged software. See “Deploying vMA,” on page 24.

VMware, Inc.

5

Getting Started with vSphere Command-Line Interfaces

Background information for the tasks discussed in this book is available in the vSphere documentation set. The vSphere documentation consists of the combined VMware vCenter Server and ESXi documentation.

6

VMware, Inc.

Managing vSphere with Command-

1

Line Interfaces

vSphere supports several command-line interfaces for managing your virtual infrastructure including a set of ESXi Shell commands, PowerCLI commands, and DCLI (Datacenter CLI) commands for management of vCenter services. You can run commands locally, from an administration server, or from scripts.

You can choose the CLI best suited for your needs, and write scripts to automate your management tasks. This chapter includes the following topics:

n“Overview of vSphere Command-Line Interfaces,” on page 7

n“Using ESXCLI for Host Management,” on page 10

n“Using PowerCLI to Manage Hosts and Virtual Machines,” on page 12

n“Using DCLI to Manage vCenter Services,” on page 12

n“vCLI Package Contents,” on page 13

Overview of vSphere Command-Line Interfaces

vSphere includes commands for managing different aspects of your environment.

The following CLIs are available for managing hosts, either directly or through the vCenter Server system that manages the host. You can also manage vCenter services by using DCLI.

VMware, Inc.

7

VMware ESXI - 6.5 User Manual

Getting Started with vSphere Command-Line Interfaces

Figure 1 1. vSphere CLIs for Host and vCenter Services Management

Linux

vSphere

Windows

 

Management

 

 

Assistant

 

 

 

 

 

 

 

vCLI

 

 

vicfg-*

 

 

ESXCLI

 

 

DCLI

 

 

Others (esxtop, vimcmd, vsish, rvc...

)

 

 

 

 

 

 

 

 

 

PowerCLI

 

 

 

 

 

 

 

 

 

API

vCenter Server

DCLI

API

API

ESXi

ESXi

ESXCLI

ESXCLI

esxcfg-*

esxcfg-*

The following command sets are available. For more information about each command set, see the referenced documentation.

8

VMware, Inc.

Chapter 1 Managing vSphere with Command-Line Interfaces

Command Set

Description

See

ESXCLI

Manage many aspects of an ESXi host. You can run ESXCLI commands

commands

remotely or in the ESXi Shell.

 

n vCLI package - Install the vCLI package on the server of your choice,

 

or deploy a vSphere Management Assistant (vMA) virtual machine

 

and target the ESXi system that you want to manipulate. You can run

 

ESXCLI commands against a vCenter Server system and target the

 

host indirectly. Running against vCenter Server systems by using the

 

-vihost parameter is required if the host is in lockdown mode.

 

n ESXi Shell - Run ESXCLI commands in the local ESXi Shell to manage

 

that host.

 

You can also run ESXCLI commands from the VMware PowerCLI prompt

 

by using the Get-EsxCli cmdlet.

“Using ESXCLI for Host Management,” on

page 10

Chapter 2, “Installing vCLI,” on page 15

vSphere Command Line Concepts and Examples

vSphere Management Assistant Guide

vSphere Command Line Interface Reference

vicfgand

Users can manage hosts remotely. Install the vCLI package on a Windows

Chapter 2, “Installing

other vCLI

or Linux system or deploy a vMA virtual machine, and target the ESXi

vCLI,” on page 15

commands

system that you want to manipulate.

vSphere Command Line

 

vicfgcommands are included in this release but are deprecated.

Concepts and Examples

 

Migrate to ESXCLI where possible.

vSphere Command Line

 

You can run the commands against ESXi systems or against a

Interface Reference

 

vCenter Server system. If you target a vCenter Server system, use the --

 

 

vihost option to specify the target ESXi system.

 

 

Not If the ESXi system is in strict lockdown mode, you must run

 

 

commands against the vCenter Server system that manages your ESXi

 

 

system.

 

 

 

 

esxcfg-

Available in the ESXi Shell. esxcfgcommands are included in this

Command Line

commands

release but are deprecated. Migrate to ESXCLI where possible.

Management of vSphere 5

 

 

and vSphere 6 for Service

 

 

Console Users

DCLI commands Manage VMware SDDC services.

DCLI is a CLI client to the vSphere Automation SDK interface for managing VMware SDDC services. A DCLI command talks to a vSphere Automation API endpoint to locate relevant information, and then runs the command and displays the result to the user.

You can run DCLI commands as follows.

nvCenter Server Appliance - Run DCLI commands from the vCenter Server Appliance shell. See “Running DCLI Commands on the vCenter Server Appliance,” on page 49.

nvCenter Server Windows command prompt - Install vCenter Server on a supported Windows system and run DCLI commands from the command prompt.

nvCLI package

Chapter 5, “Running DCLI Commands,” on page 45

See the vSphere

Automation SDK documentation for information about supported services and how they interact.

nOpen a command prompt on a Linux or Windows system on which you installed vCLI. Enter commands into that command prompt, specifying connection options. See Chapter 5, “Running DCLI Commands,” on page 45.

nAccess the vMA Linux console. DCLI does not support the vifastpass connections.

nPrepare scripts that include DCLI commands and run the scripts as vCLI scripts from the vCenter Server Windows command prompt or from the vCenter Server Appliance shell.

VMware

VMware PowerCLI provides a Windows PowerShell interface to the

VMware PowerCLI

PowerCLI

vSphere API. PowerCLI includes PowerShell cmdlets for administering

documentation

cmdlets

vSphere components.

 

 

PowerCLI includes more than 500 cmdlets, a set of sample scripts, and a

 

 

function library for management and automation. The vSphere Image

 

 

Builder PowerCLI and vSphere Auto Deploy PowerCLI modules are

 

 

included when you install PowerCLI.

 

 

 

 

VMware, Inc.

9

Getting Started with vSphere Command-Line Interfaces

Command Set

Description

See

 

 

 

localcli

Set of commands for use with VMware Technical Support. localcli

 

commands

commands are equivalent to ESXCLI commands, but bypass the host

 

 

daemon (hostd) . The localcli commands are only for situations when

 

 

hostd is unavailable and cannot be restarted. After you run a localcli

 

 

command, you must restart hostd. Run ESXCLI commands after the

 

 

restart.

 

 

If you use a localcli command, an inconsistent system state and

 

 

potential failure might result.

 

 

 

 

pktcap-uw

Enables you to monitor the traffic that flows through the physical

vSphere Networking

utility

network adapters, the VMkernel adapters, and the virtual machine

documentation

 

adapters, and to analyze the packet information by using conventional

 

 

network analysis tools such as Wireshark.

 

 

 

 

dir-cli

Commands for managing the vCenter Single Sign-On and certificate

vSphere Security

vecs-cli

infrastructure.

documentation

certool

 

 

 

 

 

appliancesh

Enables you to configure and troubleshoot the vCenter Server Appliance

vCenter Server Appliance

 

and to monitor the processes and services running in the appliance.

on u t on

 

 

documentation

 

 

 

Using ESXCLI for Host Management

You can manage many aspects of an ESXi host by using commands from the ESXCLI command set. You can run ESXCLI commands as vCLI commands, or run them in the ESXi Shell in troubleshooting situations.

You can also run ESXCLI commands from the PowerCLI shell by using the Get-EsxCli cmdlet. See the

PowerCLI User's Guide and the PowerCLI Cmdlet Reference.

The set of ESXCLI commands that are available on a host depends on the host configuration The vSphere Command Line Interface Reference lists help information for all ESXCLI commands. You can run esxcli -- server <MyESXi> --help before you run a command on a host to make sure that the command is defined on the host that you are targeting.

ESXCLI Syntax

Each ESXCLI command uses the same syntax.

The following is the standard syntax structure of an ESXCLI command.

esxcli [dispatcher options] <namespace> [<namespace> ...

] <cmd> [cmd options]

Syntax

Element Description

dispatcher redefined options for connection information such as target host, user name, and so on. See Chapter 4, options “Running vCLI Host Management Commands,” on page 31. Not required when you run the

command in the ESXi Shell. If the target server is a vCenter Server system, specify the target ESXi host before any ESXCLI namespaces, commands, and supported options.

Many ESXCLI commands generate output that you might want to use in your application. You can run esxcli with the --formatter dispatcher option and send the resulting output as input to a parser.

Impo t nt Starting with vSphere 6.0, ESXCLI expects a trust relationship between the target host and the system on which you run the command. You can establish this relationship in one of these ways:

nUse the --cacertsfile option or VI_CACERTFILE variable.

nStore the thumbprint in the session file

nSpecify the thumbprint with the --thumbprint option or VI_THUMBPRINT variable.

You can pass in the thumbprint that is returned in the error if you trust the host that you are targeting. See “Trust Relationship Requirement for ESXCLI Commands,” on page 38 for an example.

namespace Groups ESXCLI commands. vSphere 5.0 and later support nested namespaces.

10

VMware, Inc.

Chapter 1 Managing vSphere with Command-Line Interfaces

Syntax

 

Element

Description

 

 

command

Reports on or modifies the state of the system.

 

The following examples show how you can use this element.

 

esxcli --server myESXi --username user1 --password 'my_password' storage nfs list

 

esxcli --server myVCServer --username user1 --password 'my_pwd' --vihost

 

myESXi.mycompany.com storage nfs list

 

 

options

Many commands support one or more of the options displayed in the help or the vCLI reference. For

 

some commands, multiple option values, separated by spaces, are possible.

 

The following example shows how you can use this element.

 

esxcli system module parameters set -m <module> -p "a=1 b=1 c=1"

 

 

Running ESXCLI Commands Installed as Part of vCLI

You can run an ESXCLI command, installed as part of vCLI, in the ESXi Shell for troubleshooting purposes and remotely against a specific host or against a vCenter Server system.

When running an ESXCLI command, installed as part of vCLI, you have the following options.

nDeploy the vMA appliance, which includes vCLI and ESXCLI, on an ESXi system and authenticate against a set of target servers. You can then run ESXCLI commands against any target server by specifying the --host dispatcher option. No additional authentication is required. See the vSphere Management Assistant Guide.

nInstall the vCLI package on one of the supported Windows or Linux systems. The ESXCLI command set is included. Specify connection options to run commands against an ESXi host directly, or target a vCenter Server system and specify the ESXi host to run the command against. See Chapter 2, “Installing vCLI,” on page 15.

Not Starting with vSphere 6.0, a trust relationship must exist between the host from which you run ESXCLI commands and the target ESXi host or vCenter Server system. See “Trust Relationship Requirement for ESXCLI Commands,” on page 38.

See Chapter 4, “Running vCLI Host Management Commands,” on page 31.

ESXCLI Command Support When Host and vCLI Versions Do Not Match

When you run an ESXCLI vCLI command, you must know the commands that are supported on the target host specified with --server or as a vMA target.

The following examples demonstrate command support when versions do not match.

nIf you run commands against ESXi 4.x hosts, ESXCLI 4.x commands are supported.

nIf you run commands against ESXi 5.0 hosts, ESXCLI 5.0 commands are supported. ESXCLI 5.1 commands that were included in ESXCLI 5.0 are also supported.

nIf you run commands against ESXi 5.1 hosts, ESXCLI 5.1 and ESXCLI 5.0 commands are supported.

VMware partners might develop custom ESXCLI commands that you can run on hosts where the partner VIB is installed.

Run esxcli --server <target> --help for a list of namespaces supported on the target. You can explore the namespaces for additional help.

VMware, Inc.

11

Getting Started with vSphere Command-Line Interfaces

Using PowerCLI to Manage Hosts and Virtual Machines

VMware PowerCLI contains snap-ins and modules based on Microsoft PowerShell for automating vSphere and vCloud Director administration. PowerCLI provides C# and PowerShell interfaces for vSphere and other VMware product administration.

PowerCLI is based on Microsoft PowerShell and uses the PowerShell basic syntax and concepts. Microsoft PowerShell is both a command-line and scripting environment, designed for Windows. It uses the .NET object model and provides administrators with system administration and automation capabilities. To work with PowerShell, you run commands, which are called cmdlets.

PowerShell supports features such as pipelines, wildcards, and easy access to command-line help. You can use ESXCLI commands from the PowerCLI console, by using the following options.

nThrough the cmdlet that provides direct access to the ESXCLI namespaces, applications, and commands.

nThrough .NET methods, which you use to create managed objects that correspond to specific ESXCLI applications. To access the ESXCLI, you can call methods on these managed objects.

See the PowerCLI User’s Guide in the vSphere documentation center.

Using DCLI to Manage vCenter Services

With the DCLI command set, you can run virtual machine management, appliance management, content library, and tagging commands.

You cannot manage services that are part of vSphere 5.5 or earlier from DCLI. DCLI is not a host management CLI.

DCLI is a CLI client of the vSphere Automation SDK. The following workflow explains how DCLI works.

1You run a DCLI command.

2If you are not authenticated, DCLI prompts for a user name and password.

3The command connects you to the vCenter Single Sign-On service and checks whether the user account specified on the command-line or in a credential store file can authenticate.

4If you can authenticate, DCLI communicates with the vCenter Server and runs the vSphere Automation API that corresponds to the DCLI command. Different vCenter Server systems support different services.

Not If the authenticated user account does not have permissions to run the DCLI command, you receive an Unauthorized error message, even if the user credentials are correct.

5 DCLI displays the result or an error message. You can run DCLI commands as follows.

nvCLI package - Install the vCLI package on the server of your choice, or deploy a vMA virtual machine. You can then run DCLI commands against an endpoint. See “Using DCLI Commands,” on page 48.

nvCenter Server Appliance - Run DCLI commands from the vCenter Server Appliance shell. See “Running DCLI Commands on the vCenter Server Appliance,” on page 49.

nvCenter Server Windows command prompt - Install vCenter Server on a supported Windows system and run DCLI commands from the command prompt.

12

VMware, Inc.

Chapter 1 Managing vSphere with Command-Line Interfaces

DCLI Syntax

Each DCLI command uses the same syntax.

The command name can be followed by DCLI connection and forma ing options, each preceded by a plus (+) sign. You also specify the namespace, the command, and the command options. Namespaces are nested.

Not The order in which DCLI options are provided on the command line is not important. However, you must specify DCLI options with a plus (+) and command specific options with a minus (-).

The syntax of a DCLI command is the following.

dcli +[DCLI options] <namespace> [<namespace> ...] <cmd> --[cmd option] [option value]

The following table describes the DCLI syntax elements.

Syntax Element

Description

 

 

DCLI options

redefined options for connection information including the vSphere Automation SDK endpoint

 

and forma ing options. Always preceded by a plus (+) sign.

 

Not required when you run the command in the vCenter Server Appliance shell or from the

 

command prompt of a vCenter Server Windows installation.

 

 

namespace

Groups DCLI commands. Namespaces correspond to the vSphere Automation SDK namespaces

 

and are nested.

 

 

command

Reports on or modifies the state of the system.

 

 

option and value

Command option and value pairs preceded by two minus signs (--).

 

 

Example

$dcli +server my_remote_vc +username user42 com vmware cis tagging tag list

vCLI Package Contents

vCLI is not a command set but a package of several command sets.

You usually install vCLI on an administration server and run scripts from there against other hosts or, for DCLI, against vCenter Server systems. Some vCLI commands can also be run locally on the ESXi host or the vCenter Server system.

When you install the vCLI package, the following command sets become available.

nDCLI commands - These commands are available as part of vCLI, from the vCenter Server Appliance, and from the command-prompt of a vCenter Server Windows installation.

nHost Management commands - Includes the following command sets.

n ESXCLI commands - The ESXCLI commands included in the vCLI package are equivalent to the ESXCLI commands available in the ESXi Shell.

n vicfg- commands - The vicfg- command set is similar to the deprecated esxcfg- command set in the ESXi Shell. vicfg- commands are still included in this release but are deprecated. Migrate to ESXCLI where possible.

n Miscellaneous commands - A small set of commands for managing and monitoring ESXi hosts, including vmkfstools and resxtop . In many cases, equivalent but slightly different commands are available in the ESXi Shell.

Impo t nt ESXi Shell is intended for experienced users only. Minor errors in the shell can result in serious problems. Instead of running commands directly in the ESXi Shell, use vCLI or PowerCLI.

VMware, Inc.

13

Getting Started with vSphere Command-Line Interfaces

You can run vCLI commands from a Windows or Linux system, or use vMA.

nInstall the vCLI command set on the Windows or Linux system from which you want to administer your ESXi systems and run vCLI commands. See Chapter 2, “Installing vCLI,” on page 15.

nDeploy a vMA virtual machine to an ESXi system and run vCLI commands from there.

After you have installed the vCLI package, you can run the host management commands in the set against ESXi hosts. You can run the DCLI commands against a server by specifying the IP address or host name and can manage the services associated with that server.

You must specify connection parameters when you run a vCLI command. The connection parameters differ for DCLI commands and for other commands. See Chapter 4, “Running vCLI Host Management Commands,” on page 31 and “Using DCLI Commands,” on page 48.

14

VMware, Inc.

Installing vCLI

2

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.

This chapter includes the following topics:

n“Installation Overview,” on page 15

n“Overview of Linux Installation Process,” on page 16

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

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

n“Uninstall the vCLI Package on Linux,” on page 23

n“Installing and Uninstalling vCLI on Windows,” on page 23

n “Enabling Certificate Verification on page 24

n“Deploying vMA,” on page 24

Installation Overview

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

nInstallable Package - Install a vCLI package on a physical or virtual machine. See “Installing the vCLI Package on Red Hat Enterprise Linux,” on page 18, “Installing vCLI on Linux Systems with Internet Access,” on page 20, and “Installing and Uninstalling vCLI on Windows,” on page 23.

VMware, Inc.

15

Getting Started with vSphere Command-Line Interfaces

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.

Platform

Installation Process

 

 

Windows

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

 

Perl.

 

 

Red Hat

You must install required software. See “Installing Required Prerequisite Software for Red Hat

Enterprise Linux

Enterprise Linux,” on page 19.

 

The installer for RHEL prompts you to choose whether you want to install additional modules

 

from the Internet or from the package.

 

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

 

CPAN.

 

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

 

installer package.

 

 

SLES and

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

Ubuntu

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

 

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.

nvSphere 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 24.

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.

1The 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 19 and “Installing

 

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

 

 

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 19 and “Installing Prerequisite Software

 

for Linux Systems with Internet Access,” on page 20.

 

 

uuid

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

 

the UUID Perl module.

 

 

16

VMware, Inc.

Chapter 2 Installing vCLI

2If 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 19 and “Installing Prerequisite Software for Linux Systems with Internet Access,” on page 20 for instructions.

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

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

nIO-Compress-Base-2.037

nCompress-Zlib-2.037

nIO-Compress-Zlib-2.037

nCompress-Raw-Zlib-2.037

nArchive-Zip-1.28

nData-Dumper-2.121

nXML-LibXML-1.63

nlibwww-perl-5.805

nW rotocol h ps

nXML-LibXML-Common-0.13

nXML-NamespaceSupport-1.09

nXML-SAX-0.16

nData-Dump-1.15

nURI-1.37

nUUID-0.03

nSOAP-Lite-0.710.08

nHTML-Parser-3.60

nversion-0.78

nClass-MethodMaker-2.10

nJSON-PP-2.27203

nDevel-StackTrace-131

nClass-Data-Inheritable-0.08

nConvert-ASN1-0.26

nCyrpt-OpenSSL-RSA-0.28

nCrypt-X509-0.51

nException-Class-1.37

nMIME-Base64-3.14

nUUID-Random-0.04

nSocket6-023

nIO-Socket-INET6-2.71

nNet-INET6Glue-0.600_1

VMware, Inc.

17

Loading...
+ 37 hidden pages