In vSphere 5.0, you can manage iSCSI storage by using either esxcli iscsi commands or vicfg-iscsi options. See the vSphere Command-Line Interface Reference. esxcli iscsi Command Syntax and vicfg-iscsi Command Syntax provide an overview.The esxcli iscsi command includes a number of nested namespaces. The following table illustrates the namespace hierarchy. Commands at each level are included in bold. Many namespaces include both commands and namespaces.
adapter [get|list|set] chap [set|get] discovery [rediscover] sendtarget [add|list|remove] chap [get|set] param [get|set] statictarget [add|list|remove] status get target [list] portal [list] chap [get|set] param [get|set] capabilities get firmware [get|set] param [get|set] networkportal [add|list|remove] ipconfig [get|set] physicalnetworkportal [list] param [get|set] session [add|list|remove] connection list ibftboot [get|import] logicalnetworkportal list plugin list software [get|set] ESXCLI commands for iSCSI management consistently use the same short options. For several options, the associated full option depends on the command.
Short Options for iSCSI ESXCLI Command Options --authname, --name --isid, subnet, switch vicfg-iscsi supports a comprehensive set of options, listed in Options for vicfg-iscsi.
-A - -authentication [-i <stor_ip_addr|stor_hostname> [:<portnum>] [-n <iscsi_name>]]- -level <level>- -method <auth_method> - -mutual- -mchap_username <ma_username>- -mchap_password <ma_password>[- -ip <stor_ip_addr|stor_hostname> [:<portnum>][- -name <iscsi_name>]] <adapter_name> Enables mutual authentication. You must enable authentication before you can enable mutual authentication. -A - -authentication - -level <level>- -method <auth_method>- -chap_password <auth_u_name>- -chap_username <chap_password>[- -ip <stor_ip_addr|stor_hostname> [:<portnum>][- -name <iscsi_name>]] <adapter_name> Enables authentication using the specified options. -A - -authentication - -list <adapter_name> Lists supported authentication methods. -D - -discovery Adds a dynamic discovery address. -D - -discovery - -list <adapter_name> Lists dynamic discovery addresses. -D - -discovery Removes a dynamic discovery address. Lists all iSCSI adapters or a specified adapter. -L - -lun - -list <adapter_name> -L - -lun - -list - -target_id <target_id> <adapter_name> Lists LUN information for a specific target. Sets the HBA IPv4 address to ip_addr. Sets the HBA network mask to subnet_mask. Sets the HBA gateway to default_gateway. Sets the IP address, subnet mask, and default gateway in one command. -p - -pnp (Independent hardware iSCSI only) - -list <adapter_name> Lists physical network portal options. -p - -pnp (Independent hardware iSCSI only) - -mtu <mtu-size> <adapter_name> Sets physical network portal options. -I - -iscsiname - -alias <alias_name> <adapter_name> -I - -iscsiname - -name <iscsi_name> <adapter_name> -I - -iscsiname - -list <adapter_name> --pnp - -mtu <mtu-size> <adapter_name> Sets MTU size. Used with the --pnp option. -S - -static - -list <adapter_name> -S - -static -r -i <stor_ip_addr|stor_hostname> [:<portnum>] -n <target_name> <adapter_name> Removes a static discovery address. -S - -static -n <target_name> <adapter_name>-name <target_name> <adapter_name> -P - -phba - -list <adapter_name> Lists external, vendor-specific properties of an iSCSI adapter. -T - -target - -list <adapter_name> -W - -parameter -l [-i <stor_ip_addr|stor_hostname> [:<portnum>]- -list [- -ip <stor_ip_addr|stor_hostname> [:<portnum>] Lists iSCSI parameter information. -W - -parameter - -list - -detail -W - -parameter -i <stor_ip_addr|stor_hostname> [:port_num>] [-n <iscsi_name>]] <adapter_name>- -parameter - -set <name>=<value>- -ip <stor_ip_addr|stor_hostname> [:port_num>][- -name <iscsi_name>]] <adapter_name> -W - -parameter -W - o <param_name>-i <stor_ip_addr|stor_hostname> [:port_num>] [-n <iscsi_name>]] <adapter_name>-parameter - -reset <param_name>-ip <stor_ip_addr|stor_hostname> [:port_num>] [-name <iscsi_name>]] <adapter_name> Returns parameters in discovery target or send target to default inheritance behavior. [-i <stor_ip_addr|stor_hostname> [:<portnum>] [-n <iscsi_name>]]- -method <auth_method>[- -ip <stor_ip_addr|stor_hostname> [:<portnum>][- -name <iscsi_name>]] <adapter_name> Resets target level authentication properties to be inherited from adapter level. Used with the --authentication option.