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
--lun <lun_number>
-L <lun_number>
If --type is location, species the SCSI LUN for the paths to unclaim. If you do not
specify --lun, unclaiming runs on paths with any LUN number.
--model <model>
-m <model>
If --type is vendor, aempts to unclaim all paths to devices with specic model
information (for multipathing plug-ins) or unclaim the device itself (for lter plug-ins). If
there are active I/O operations on this device, at least one path fails to unclaim.
--path <path>
-p <path>
If --type is path, unclaims a path specied by its path UID or runtime name.
--plugin <plugin>
-P
If --type is plugin, unclaims all paths for a specied multipath plug-in.
<plugin> can be any valid PSA plug-in on the system. By default, only NMP and MASK_PATH
are available, but additional plugi-ns might be installed.
--target <target>
-T <target>
If --type is location, unclaims the paths with the SCSI target number specied by target.
If you do not specify --target, unclaiming runs on paths from all targets.
--type <type>
-t <type>
Type of unclaim operation to perform. Valid values are location, path, driver, device,
plugin, and vendor.
--vendor <vendor>
-v <vendor>
If --type is vendor, aempts to unclaim all paths to devices with specic vendor info for
multipathing plug-ins or unclaim the device itself for lter plug-ins. If there are any active
I/O operations on this device, at least one path fails to unclaim
The following troubleshooting command tries to unclaim all paths on vmhba1.
esxcli <conn_options> storage core claiming unclaim --type location -A vmhba1
Run vicfg-mpath <conn_options> -l to verify that the command succeeded.
If a path is the last path to a device that was in use, or a if a path was very recently in use, the unclaim
operation might fail. An error is logged that not all paths could be unclaimed. You can stop processes that
might use the device and wait 15 seconds to let the device be quiesced, then retry the command.
Managing Claim Rules
The PSA uses claim rules to determine which multipathing module should claim the paths to a particular
device and to manage the device. esxcli storage core claimrule manages claim rules.
Change the Current Claim Rules in the VMkernel
Claim rule modication commands do not operate on the VMkernel directly. Instead, they operate on the
conguration le by adding and removing rules.
Specify one of the options listed in “Connection Options for vCLI Host Management Commands,” on
page 19 in place of <conn_options>.
Procedure
1 Run one or more of the esxcli storage core claimrule modication commands.
For example, add, remove, or move.
2 Run esxcli storage core claimrule load to replace the current rules in the VMkernel with the
modied rules from the conguration le.
What to do next
You can also run esxcli storage core plugin list to list all loaded plug-ins.
vSphere Command-Line Interface Concepts and Examples
110 VMware, Inc.