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
The target (-i) and name (-n) option determine what the command applies to.
Option Result
-i and -n
Command applies to per-target CHAP for static targets.
Only -i
Command applies to the discovery address.
Neither -i nor -n
Command applies to per-adapter CHAP.
N Mutual CHAP is not supported for independent hardware iSCSI storage.
6 (Optional) Set iSCSI parameters by running vicfg-iscsi -W.
7 After setup is complete, run vicfg-rescan to rescan all storage devices.
Listing and Setting iSCSI Options
You can list and set iSCSI options with ESXCLI or with vicfg-iscsi.
You can also manage parameters. See “Listing and Seing iSCSI Parameters,” on page 90.
Listing iSCSI Options with ESXCLI
You can use esxcli iscsi information retrieval commands to list external HBA properties, information
about targets, and LUNs.
You can use the following esxcli iscsi options to list iSCSI parameters. Specify one of the options listed in
“Connection Options for vCLI Host Management Commands,” on page 19 in place of <conn_options>.
n
Run esxcli iscsi adapter firmware to list or upload the rmware for the iSCSI adapter.
esxcli <conn_options> iscsi adapter firmware get --adapter=<adapter_name>
esxcli <conn_options> iscsi adapter firmware set --file=<firmware_file_path>
The system returns information about the vendor, model, description, and serial number of the HBA.
n
Run commands in the esxcli iscsi adapter target name space.
n
esxcli iscsi adapter target portal lists and sets authentication and portal parameters.
n
esxcli iscsi adapter target list lists LUN information.
Setting MTU with ESXCLI
You can change MTU seings by using ESXCLI.
If you want to change the MTU used for your iSCSI storage, you must make the change in two places.
n
Run esxcli network vswitch standard set to change the MTU of the virtual switch.
n
Run esxcli network ip interface set to change the MTU of the network interface.
Listing and Setting iSCSI Options with vicfg-iscsi
You can use vicfg-iscsi information retrieval options to list external HBA properties, information about
targets, and LUNs.
You can use the following vicfg-iscsi options to list iSCSI parameters. Specify one of the options listed in
“Connection Options for vCLI Host Management Commands,” on page 19 in place of <conn_options>.
n
Run vicfg-iscsi -P|--phba to list external (vendor-specic) properties of an iSCSI adapter.
vicfg-iscsi <conn_options> -P -l <adapter_name>
vicfg-iscsi <conn_options> --phba --list <adapter_name>
Chapter 5 Managing iSCSI Storage
VMware, Inc. 89