You can set up iSCSI authentication by using the vSphere Web Client, as discussed in the vSphere Storage documentation or by using the esxcli command, discussed in Enabling iSCSI Authentication. To use CHAP authentication, you must enable CHAP on both the initiator side and the storage system side. After authentication is enabled, it applies for targets to which no connection has been established, but does not apply to targets to which a connection is established. After the discovery address is set, the new volumes to which you add a connection are exposed and can be used.To set CHAP levels with esxcli iscsi adapter setauth or vicfg-iscsi, specify one of the values in Supported Levels for CHAP for <level>. Only two levels are supported for independent hardware iSCSI.
Important Ensure that CHAP is set to chapRequired before you set mutual CHAP, and use compatible levels for CHAP and mutual CHAP. Use different passwords for CHAP and mutual CHAP to avoid security risks.
Host does not use CHAP authentication. If authentication is enabled, specify chapProhibited to disable it.
■ If you use the vSphere Web Client to modify authentication settings, you must deselect the Inherit from Parent check box before you can make a change to the discovery address or discovery target.
■ If you use vicfg-iscsi, the value you set overrides the inherited value.
■ If you use esxcli iscsi commands, the value you set overrides the inherited value. You can set CHAP at these levels:
■ Dynamic discovery: esxcli iscsi adapter discovery sendtarget auth chap set --inherit
■ Static discovery: esxcli iscsi adapter target portal auth chap set --inherit.