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 Setting iSCSI Parameters.
Listing iSCSI Options with ESXCLI
Use esxcli iscsi information retrieval commands to list external HBA properties, information about targets, and LUNs. Specify one of the options listed in Connection Options in place of <conn_options>.
Run esxcli iscsi adapter firmware to list or upload the firmware 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.
Run commands in the esxcli iscsi adapter target name space.
esxcli iscsi adapter target portal lists and sets authentication and portal parameters.
esxcli iscsi adapter target list lists LUN information.
Setting MTU with ESXCLI
If you want to change the MTU used for your iSCSI storage, you must make the change in two places.
Run esxcli network vswitch standard set to change the MTU of the virtual switch.
Run esxcli network ip interface set to change the MTU of the network interface.
Listing and Setting iSCSI Options with vicfg-iscsi
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 in place of <conn_options>.
Run vicfg-iscsi -P|--phba to list external (vendor-specific) properties of an iSCSI adapter.
vicfg-iscsi <conn_options> -P -l <adapter_name>
vicfg-iscsi <conn_options> - -phba - -list <adapter_name>
The system returns information about the vendor, model, description, and serial number of the HBA.
Run vicfg-iscsi -T | --target to list target information.
vicfg-iscsi <conn_options> -T -l <adapter_name>
vicfg-iscsi <conn_options> - -target - -list <adapter_name>
The system returns information about targets for the specified adapter, including the iSCSI name (IQN or EUI format) and alias. See Discovery Target Names.
Run vicfg-iscsi -L|--lun to list LUN information.
vicfg-iscsi <conn_options> -L -l <adapter_name>
vicfg-iscsi <conn_options> - -lun - -list <adapter_name>
The command returns the operating system device name, bus number, target ID, LUN ID, and LUN size for the LUN.
Run vicfg-iscsi -L with -t to list only LUNs on a specified target.
vicfg-iscsi <conn_options> -L -l -t <target_ID> <adapter_name>
vicfg-iscsi <conn_options> - -lun - -list - -target_id <target_id> <adapter_name>
The system returns the LUNs on the specified target and the corresponding device name, device number, LUN ID, and LUN size.
Run vicfg-iscsi -p|--pnp to list physical network portal information for independent hardware iSCSI devices. You also use this option with --mtu.
vicfg-iscsi <conn_options> -p -l <adapter_name>
vicfg-iscsi <conn_options> - -pnp - -list <adapter_name>
The system returns information about the MAC address, MTU, and current transfer rate.
Run vicfg-iscsi -I -l to list information about the iSCSI initiator. ESXi systems use a software-based iSCSI initiator in the VMkernel to connect to storage. The command returns the iSCSI name, alias name, and alias settable bit for the initiator.
vicfg-iscsi <conn_options> -I -l vmhba42
Run vicfg-iscsi -p -M to set the MTU for the adapter. You specify the size and adapter name.
vicfg-iscsi <conn_options> -p -M <mtu_size> <adapter_name>
vicfg-iscsi <conn_options> - -pnp - -mtu <mtu-size> <adapter_name>