]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
1 | ------------------------------ |
2 | iSCSI Initiator for VMware ESX | |
3 | ------------------------------ | |
181888fb FG |
4 | |
5 | **Prerequisite:** | |
6 | ||
b32b8144 | 7 | - VMware ESX 6.5 or later using Virtual Machine compatibility 6.5 with VMFS 6. |
181888fb FG |
8 | |
9 | **iSCSI Discovery and Multipath Device Setup:** | |
10 | ||
b32b8144 | 11 | The following instructions will use the default vSphere web client and esxcli. |
181888fb | 12 | |
b32b8144 | 13 | #. Enable Software iSCSI |
181888fb | 14 | |
b32b8144 FG |
15 | .. image:: ../images/esx_web_client_storage_main.png |
16 | :align: center | |
181888fb | 17 | |
b32b8144 FG |
18 | Click on "Storage" from "Navigator", and select the "Adapters" tab. |
19 | From there right click "Confgure iSCSI". | |
181888fb | 20 | |
b32b8144 | 21 | #. Set Initiator Name |
181888fb | 22 | |
b32b8144 FG |
23 | .. image:: ../images/esx_config_iscsi_main.png |
24 | :align: center | |
181888fb | 25 | |
b32b8144 FG |
26 | If the initiator name in the "Name & alias" section is not the same name |
27 | used when creating the client during gwcli setup or the initiator name used | |
28 | in the ansible client_connections client variable, then ssh to the ESX | |
29 | host and run the following esxcli commands to change the name. | |
181888fb | 30 | |
b32b8144 FG |
31 | Get the adapter name for Software iSCSI: |
32 | ||
33 | :: | |
34 | ||
35 | > esxcli iscsi adapter list | |
36 | > Adapter Driver State UID Description | |
37 | > ------- --------- ------ ------------- ---------------------- | |
38 | > vmhba64 iscsi_vmk online iscsi.vmhba64 iSCSI Software Adapter | |
39 | ||
40 | In this example the software iSCSI adapter is vmhba64 and the initiator | |
41 | name is iqn.1994-05.com.redhat:rh7-client: | |
42 | ||
43 | :: | |
44 | ||
45 | > esxcli iscsi adapter set -A vmhba64 -n iqn.1994-05.com.redhat:rh7-client | |
46 | ||
47 | #. Setup CHAP | |
48 | ||
49 | .. image:: ../images/esx_chap.png | |
50 | :align: center | |
51 | ||
52 | Expand the CHAP authentication section, select "Do not use CHAP unless | |
53 | required by target" and enter the CHAP credentials used in the gwcli | |
54 | auth command or ansible client_connections credentials variable. | |
55 | ||
56 | The Mutual CHAP authentication section should have "Do not use CHAP" | |
57 | selected. | |
58 | ||
59 | Warning: There is a bug in the web client where the requested CHAP | |
60 | settings are not always used initially. On the iSCSI gateway kernel | |
61 | logs you will see the error: | |
62 | ||
63 | :: | |
64 | ||
65 | > kernel: CHAP user or password not set for Initiator ACL | |
66 | > kernel: Security negotiation failed. | |
67 | > kernel: iSCSI Login negotiation failed. | |
68 | ||
69 | To workaround this set the CHAP settings with the esxcli command. Here | |
70 | authname is the username and secret is the password used in previous | |
71 | examples: | |
72 | ||
73 | :: | |
74 | ||
75 | > esxcli iscsi adapter auth chap set --direction=uni --authname=myiscsiusername --secret=myiscsipassword --level=discouraged -A vmhba64 | |
76 | ||
77 | #. Configure iSCSI Settings | |
78 | ||
79 | .. image:: ../images/esx_iscsi_recov_timeout.png | |
80 | :align: center | |
81 | ||
82 | Expand Advanced settings and set the "RecoveryTimeout" to 25. | |
83 | ||
84 | #. Set the discovery address | |
85 | ||
86 | .. image:: ../images/esx_config_iscsi_main.png | |
87 | :align: center | |
88 | ||
89 | In the Dynamic targets section, click "Add dynamic target" and under | |
90 | Addresses add one of the gateway IP addresses added during the iSCSI | |
91 | gateway setup stage in the gwcli section or an IP set in the ansible | |
92 | gateway_ip_list variable. Only one address needs to be added as the gateways | |
93 | have been setup so all the iSCSI portals are returned during discovery. | |
94 | ||
95 | Finally, click the "Save configuration" button. In the Devices tab, you | |
96 | should see the RBD image. | |
97 | ||
98 | The LUN should be automatically configured and using the ALUA SATP and | |
99 | MRU PSP. Other SATPs and PSPs must not be used. This can be verified with | |
100 | the esxcli command: | |
101 | ||
102 | :: | |
103 | ||
104 | > esxcli storage nmp path list -d eui.your_devices_id | |
181888fb | 105 |