6.5
Table Of Contents
- vSphere Command-Line Interface Concepts and Examples
- Contents
- About This Book
- vSphere CLI Command Overviews
- Introduction
- List of Available Host Management Commands
- Targets and Protocols for vCLI Host Management Commands
- Supported Platforms for vCLI Commands
- Commands with an esxcfg Prefix
- ESXCLI Commands Available on Different ESXi Hosts
- Trust Relationship Requirement for ESXCLI Commands
- Using ESXCLI Output
- Connection Options for vCLI Host Management Commands
- Connection Options for DCLI Commands
- vCLI Host Management Commands and Lockdown Mode
- Managing Hosts
- Managing Files
- Managing Storage
- Introduction to Storage
- Examining LUNs
- Detach a Device and Remove a LUN
- Reattach a Device
- Working with Permanent Device Loss
- Managing Paths
- Managing Path Policies
- Scheduling Queues for Virtual Machine I/O
- Managing NFS/NAS Datastores
- Monitor and Manage FibreChannel SAN Storage
- Monitoring and Managing Virtual SAN Storage
- Monitoring vSphere Flash Read Cache
- Monitoring and Managing Virtual Volumes
- Migrating Virtual Machines with svmotion
- Configuring FCoE Adapters
- Scanning Storage Adapters
- Retrieving SMART Information
- Managing iSCSI Storage
- iSCSI Storage Overview
- Protecting an iSCSI SAN
- Command Syntax for esxcli iscsi and vicfg-iscsi
- iSCSI Storage Setup with ESXCLI
- iSCSI Storage Setup with vicfg-iscsi
- Listing and Setting iSCSI Options
- Listing and Setting iSCSI Parameters
- Enabling iSCSI Authentication
- Set Up Ports for iSCSI Multipathing
- Managing iSCSI Sessions
- Managing Third-Party Storage Arrays
- Managing Users
- Managing Virtual Machines
- Managing vSphere Networking
- Introduction to vSphere Networking
- Retrieving Basic Networking Information
- Troubleshoot a Networking Setup
- Setting Up vSphere Networking with vSphere Standard Switches
- Setting Up Virtual Switches and Associating a Switch with a Network Interface
- Retrieving Information About Virtual Switches
- Adding and Deleting Virtual Switches
- Checking, Adding, and Removing Port Groups
- Managing Uplinks and Port Groups
- Setting the Port Group VLAN ID
- Managing Uplink Adapters
- Adding and Modifying VMkernel Network Interfaces
- Managing VMkernel Network Interfaces with ESXCLI
- Add and Configure an IPv4 VMkernel Network Interface with ESXCLI
- Add and Configure an IPv6 VMkernel Network Interface with ESXCLI
- Managing VMkernel Network Interfaces with vicfg-vmknic
- Add and Configure an IPv4 VMkernel Network Interface with vicfg-vmknic
- Add and Configure an IPv6 VMkernel Network Interface with vicfg-vmknic
- Setting Up vSphere Networking with vSphere Distributed Switch
- Managing Standard Networking Services in the vSphere Environment
- Setting the DNS Configuration
- Manage an NTP Server
- Manage the IP Gateway
- Setting Up IPsec
- Manage the ESXi Firewall
- Monitor VXLAN
- Monitoring ESXi Hosts
- Index
Connection Options for vmware-cmd
The vmware-cmd vCLI command supports only a specic set of connection options. Other vCLI connection
options are not supported, for example, you cannot use variables because the corresponding option is not
supported.
The following connection options are supported.
Option Description
--server <host>
-H <host>
Target ESXi or vCenter Server system.
--vihost <target>
-h <target>
When you run vmware-cmd with the -H option pointing to a vCenter Server system, use --
vihost to specify the ESXi host to run the command against.
-O <port>
Alternative connection port. The default port number is 902.
--username <username>
-U <username>
User who is authorized to log in to the host specied by --server or --vihost.
--password <password>
-P <password>
Password for the user specied by -U.
-Q <protocol> Protocol to use, either http or https. Default is https.
General Options for vmware-cmd
The vmware-cmd vCLI command supports a set of general options.
The following general options are supported.
Option Description
--help
Prints a help message that lists the options for this command.
-q
Runs in quiet mode with minimal output. The output does not display the specied operation and arguments.
-v
Runs in verbose mode.
Format for Specifying Virtual Machines
When you run vmware-cmd, the virtual machine path is usually required.
You can specify the virtual machine by using one of the following formats.
Type Syntax Examples
Datastore
prex style
'[ds_name]
relative_path'
n
'[myStorage1] testvms/VM1/VM1.vmx' (Linux)
n
"[myStorage1] testvms/VM1/VM1.vmx" (Windows)
UUID-based
path
folder/subfolder/file
n
'/vmfs/volumes/mystorage/testvms/VM1/VM1.vmx' (Linux)
n
"/vmfs/volumes/mystorage/testvms/VM1/VM1.vmx"
(Windows)
vSphere Command-Line Interface Concepts and Examples
124 VMware, Inc.