6.5
Table Of Contents
- Getting Started with vSphere Command-Line Interfaces
- Contents
- About This Book
- Managing vSphere with Command-Line Interfaces
- Installing vCLI
- Running Host Management Commands in the ESXi Shell
- Running vCLI Host Management Commands
- Overview of Running vCLI Host Management Commands
- Protecting Passwords
- Authenticating Through vCenter Server and vCenter Single Sign-On
- Authenticating Directly to the Host
- Trust Relationship Requirement for ESXCLI Commands
- Common Options for vCLI Host Management Command Execution
- Using vCLI Commands in Scripts
- Run Host Management Commands from a Windows System
- Run Host Management Commands from a Linux System
- Running DCLI Commands
- Index
Syntax
Element Description
command
Reports on or modies 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 specic host or against a vCenter Server system.
When running an ESXCLI command, installed as part of vCLI, you have the following options.
n
Deploy 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.
n
Install 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.
N 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 specied with --server or as a vMA target.
The following examples demonstrate command support when versions do not match.
n
If you run commands against ESXi 4.x hosts, ESXCLI 4.x commands are supported.
n
If 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.
n
If 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.
Chapter 1 Managing vSphere with Command-Line Interfaces
VMware, Inc. 11