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
Options Description
--type <type>
-t <type>
Type of matching to use for the operation. Valid values are vendor, location, driver,
and transport.
--vendor
-V
Vendor of the paths to use. Valid only if --type is vendor.
Valid values are values of the vendor string from the SCSI inquiry string. Run vicfg-
scsidevs <conn_options> -l on each device to see vendor string values.
--wwnn
World-Wide Node Number for the target to use in this operation.
--wwpn
World-Wide Port Number for the target to use in this operation.
--xcopy-max-transfer-
size
-m
Maximum data transfer size when using XCOPY. Valid only if --xcopy-use-array-
values is specied.
--xcopy-use-array-values
-a
Use the array reported values to construct the XCOPY command to be sent to the storage
array. This applies to VAAI claim rules only.
--xcopy-use-multi-segs
-s
Use multiple segments when issuing an XCOPY request. Valid only if --xcopy-use-
array-values is specied.
Claim rules are numbered as follows.
n
Rules 0–100 are reserved for internal use by VMware.
n
Rules 101–65435 are available for general use. Any third-party multipathing plug-ins installed on your
system use claim rules in this range. By default, the PSA claim rule 101 masks Dell array pseudo
devices. Do not remove this rule, unless you want to unmask these devices.
n
Rules 65436–65535 are reserved for internal use by VMware.
When claiming a path, the PSA runs through the rules starting from the lowest number and determines is a
path matches the claim rule specication. If the PSA nds a match, it gives the path to the corresponding
plug-in. This is worth noticing because a given path might match several claim rules.
The following examples illustrate adding claim rules. Specify one of the options listed in “Connection
Options for vCLI Host Management Commands,” on page 19 in place of <conn_options>.
n
Add rule 321, which claims the path on adapter vmhba0, channel 0, target 0, LUN 0 for the NMP.
esxcli <conn_options> storage core claimrule add -r 321 -t location -A vmhba0 -C 0 -T 0 -L 0
-P NMP
n
Add rule 429, which claims all paths provided by an adapter with the mptscsi driver for the MASK_PATH
plug-in.
esxcli <conn_options> storage core claimrule add -r 429 -t driver -D mptscsi -P MASK_PATH
n
Add rule 914, which claims all paths with vendor string VMWARE and model string Virtual for the NMP.
esxcli <conn_options> storage core claimrule add -r 914 -t vendor -V VMWARE -M Virtual -P NMP
n
Add rule 1015, which claims all paths provided by FC adapters for the NMP.
esxcli <conn_options> storage core claimrule add -r 1015 -t transport -R fc -P NMP
Removing Claim Rules
The esxcli storage core claimrule remove command removes a claim rule from the set of claim rules on
the system.
I By default, the PSA claim rule 101 masks Dell array pseudo devices. Do not remove this rule,
unless you want to unmask these devices.
vSphere Command-Line Interface Concepts and Examples
112 VMware, Inc.