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
3 Set up port binding.
a Identify the VMkernel port of the dependent hardware iSCSI adapter.
esxcli <conn_options> swiscsi vmknic list -d <vmhba>
b Connect the dependent hardware iSCSI initiator to the iSCSI VMkernel ports by running the
following command for each port.
esxcli <conn_options> swiscsi nic add -n <port_name> -d <vmhba>
c Verify that the ports were added to the dependent hardware iSCSI initiator.
esxcli <conn_options> swiscsi nic list -d <vmhba>
d Rescan the dependent hardware SCSI initiator.
vicfg-rescan <conn_options> <vmhba>
4 Add a dynamic discovery address or a static discovery address.
n
With dynamic discovery, all storage targets associated with a host name or IP address are
discovered. You can run the following command.
vicfg-iscsi <conn_options> --discovery --add --ip <ip_addr | domain_name> <adapter_name>
n
With static discovery, you must specify the host name or IP address and the iSCSI name of the
storage target. You can run the following command.
vicfg-iscsi <conn_options> --static --add --ip <ip_addr | domain_name> --name
<iscsi_name> <adapter_name>
When you later remove a discovery address, it might still be displayed as the parent of a static target.
You can add the discovery address and rescan to display the correct parent for the static targets.
5 Set the authentication information for CHAP.
vicfg-iscsi <conn_options> -A -c <level> -m <auth_method> -u <auth_u_name> -w <chap_password>
[-i <stor_ip_addr|stor_hostname> [:<portnum>] [-n <iscsi_name]] <adapter_name>
vicfg-iscsi <conn_options> - -authentication - -level <level> - -method <auth_method>
--chap_username <auth_u_name> --chap_password <chap_password>
[--ip <stor_ip_addr|stor_hostname> [:<portnum>] [-name <iscsi_name]]
<adapter_name>
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.
6 (Optional) Set iSCSI parameters by running vicfg-iscsi -W.
7 After setup is complete, run vicfg-rescan to rescan all storage devices.
Set Up Independent Hardware iSCSI with vicfg-iscsi
With independent hardware-based iSCSI storage, you use a specialized third-party adapter capable of
accessing iSCSI storage over TCP/IP. This iSCSI initiator handles all iSCSI and network processing and
management for your ESXi system.
You must install and conīgure the independent hardware iSCSI adapter for your host before you can access
the iSCSI storage device. For installation information, see vendor documentation.
Chapter 5 Managing iSCSI Storage
VMware, Inc. 87