After you have configured the VMkernel to support software iSCSI, you can configure the storage initiators for iSCSI.
1 | Access the list of available HBAs on the host system. You can do this by creating a property collector with HostSystem as the starting point. See GUID-7A3F1FB4-4EF7-41AD-B6BF-0AED5A321585.html#GUID-7A3F1FB4-4EF7-41AD-B6BF-0AED5A321585. From the HostSystem.config property, you can obtain the list (array) of host bus adapters by specifying this property path: config.storageDevice.hostBusAdapter The property path returns an array of host bus adapters. For example: hostBusAdapter["key-vim.host.BlockHba-vmhba32"] hostBusAdapter["key-vim.host.BlockHba-vmhba33"] hostBusAdapter["key-vim.host.BlockHba-vmhba34"] hostBusAdapter["key-vim.host.BlockHba-vmhba35"] hostBusAdapter["key-vim.host.BlockHba-vmhba1"] ... | ||||
2 | From the array, select the host bus adapter (instance of HostHostBusAdapter) that you want to configure and obtain its key property, which is the device name of the host bus adapter as a string. | ||||
3 | Determine the capabilities of the adapter by retrieving the properties of the HostHostBusAdapter object. | ||||
4 |
| ||||
5 | Configure the iSCSI name by calling HostStorageSystem.UpdateInternetScisiName and the alias by running HostStorageSystem.UpdateInternetScisiAlias. | ||||
6 | Configure target discovery by calling HostStorageSystem.UpdateInternetScisiHbaDiscoveryProperties. The method takes a HostInternetScisiHbaDiscoveryProperties data object that you can configure. | ||||
7 | (Optional) Set the authentication information by calling HostStorageSystem.UpdateInternetScisiAuthenticationProperties. The HostInternetScsiHbaAuthenticationProperties object you pass into that method includes properties for configuring CHAP and Mutual CHAP. See the vSphere Storage documentation for information about securing your iSCSI storage array. | ||||
8 | |||||
9 |
Rescan enables the HBAs to discover the new storage devices. You can either rescan a single HBA with HostStorageSystem.RescanHba, specifying the HBA ID as a parameter, or rescan all HBAs using HostStorageSystem.RescanAllHba. |