2017-10-11 16:02:55 +00:00
|
|
|
------------------------------
|
|
|
|
iSCSI Initiator for VMware ESX
|
|
|
|
------------------------------
|
2017-07-06 17:31:39 +00:00
|
|
|
|
|
|
|
**Prerequisite:**
|
|
|
|
|
2017-10-24 19:49:42 +00:00
|
|
|
- VMware ESX 6.5 or later using Virtual Machine compatibility 6.5 with VMFS 6.
|
|
|
|
|
2017-07-06 17:31:39 +00:00
|
|
|
**iSCSI Discovery and Multipath Device Setup:**
|
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
The following instructions will use the default vSphere web client and esxcli.
|
|
|
|
|
|
|
|
#. Enable Software iSCSI
|
|
|
|
|
|
|
|
.. image:: ../images/esx_web_client_storage_main.png
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
Click on "Storage" from "Navigator", and select the "Adapters" tab.
|
2020-12-02 06:07:34 +00:00
|
|
|
From there right click "Configure iSCSI".
|
2018-01-11 04:14:18 +00:00
|
|
|
|
|
|
|
#. Set Initiator Name
|
|
|
|
|
|
|
|
.. image:: ../images/esx_config_iscsi_main.png
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
If the initiator name in the "Name & alias" section is not the same name
|
|
|
|
used when creating the client during gwcli setup or the initiator name used
|
|
|
|
in the ansible client_connections client variable, then ssh to the ESX
|
|
|
|
host and run the following esxcli commands to change the name.
|
|
|
|
|
|
|
|
Get the adapter name for Software iSCSI:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
> esxcli iscsi adapter list
|
|
|
|
> Adapter Driver State UID Description
|
|
|
|
> ------- --------- ------ ------------- ----------------------
|
|
|
|
> vmhba64 iscsi_vmk online iscsi.vmhba64 iSCSI Software Adapter
|
|
|
|
|
|
|
|
In this example the software iSCSI adapter is vmhba64 and the initiator
|
|
|
|
name is iqn.1994-05.com.redhat:rh7-client:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
> esxcli iscsi adapter set -A vmhba64 -n iqn.1994-05.com.redhat:rh7-client
|
|
|
|
|
|
|
|
#. Setup CHAP
|
|
|
|
|
|
|
|
.. image:: ../images/esx_chap.png
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
Expand the CHAP authentication section, select "Do not use CHAP unless
|
|
|
|
required by target" and enter the CHAP credentials used in the gwcli
|
|
|
|
auth command or ansible client_connections credentials variable.
|
|
|
|
|
|
|
|
The Mutual CHAP authentication section should have "Do not use CHAP"
|
|
|
|
selected.
|
|
|
|
|
|
|
|
Warning: There is a bug in the web client where the requested CHAP
|
|
|
|
settings are not always used initially. On the iSCSI gateway kernel
|
|
|
|
logs you will see the error:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
> kernel: CHAP user or password not set for Initiator ACL
|
|
|
|
> kernel: Security negotiation failed.
|
|
|
|
> kernel: iSCSI Login negotiation failed.
|
|
|
|
|
|
|
|
To workaround this set the CHAP settings with the esxcli command. Here
|
|
|
|
authname is the username and secret is the password used in previous
|
|
|
|
examples:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
> esxcli iscsi adapter auth chap set --direction=uni --authname=myiscsiusername --secret=myiscsipassword --level=discouraged -A vmhba64
|
|
|
|
|
|
|
|
#. Configure iSCSI Settings
|
|
|
|
|
|
|
|
.. image:: ../images/esx_iscsi_recov_timeout.png
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
Expand Advanced settings and set the "RecoveryTimeout" to 25.
|
2017-07-06 17:31:39 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
#. Set the discovery address
|
2017-08-08 23:14:57 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
.. image:: ../images/esx_config_iscsi_main.png
|
|
|
|
:align: center
|
2017-07-06 17:31:39 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
In the Dynamic targets section, click "Add dynamic target" and under
|
|
|
|
Addresses add one of the gateway IP addresses added during the iSCSI
|
|
|
|
gateway setup stage in the gwcli section or an IP set in the ansible
|
|
|
|
gateway_ip_list variable. Only one address needs to be added as the gateways
|
|
|
|
have been setup so all the iSCSI portals are returned during discovery.
|
2017-07-06 17:31:39 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
Finally, click the "Save configuration" button. In the Devices tab, you
|
|
|
|
should see the RBD image.
|
2017-07-06 17:31:39 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
The LUN should be automatically configured and using the ALUA SATP and
|
|
|
|
MRU PSP. Other SATPs and PSPs must not be used. This can be verified with
|
|
|
|
the esxcli command:
|
2017-07-06 17:31:39 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
::
|
2017-07-06 17:31:39 +00:00
|
|
|
|
2018-01-11 04:14:18 +00:00
|
|
|
> esxcli storage nmp path list -d eui.your_devices_id
|
2017-07-06 17:31:39 +00:00
|
|
|
|