Configure iSCSI
Initiators
After you have configured the VMkernel to
support software iSCSI, you can configure the storage initiators for iSCSI.
To configure iSCSI initiators, use the following
steps.
- Access the list of available HBAs on the host system.You can do this by creating a property collector withHostSystemas the starting point. See property-collector.ditamap#GUID-7A3F1FB4-4EF7-41AD-B6BF-0AED5A321585-en. From theHostSystem.configproperty, you can obtain the list (array) of host bus adapters by specifying this property path:config.storageDevice.hostBusAdapterThe 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"] ...
- From the array, select the host bus adapter (instance ofHostHostBusAdapter) that you want to configure and obtain itskeyproperty, which is the device name of the host bus adapter as a string.
- Determine the capabilities of the adapter by retrieving the properties of theHostHostBusAdapterobject.
- Configure the initiator.
- For an independent hardware initiator, configure the IP address.
- For a software initiator, enable the software initiator in the VMkernel.
- Configure the iSCSI name by callingHostStorageSystem.UpdateInternetScisiNameand the alias by runningHostStorageSystem.UpdateInternetScisiAlias.
- Configure target discovery by callingHostStorageSystem.UpdateInternetScisiHbaDiscoveryProperties.The method takes aHostInternetScisiHbaDiscoveryPropertiesdata object that you can configure.
- (Optional) Set the authentication information by callingHostStorageSystem.UpdateInternetScisiAuthenticationProperties.TheHostInternetScsiHbaAuthenticationPropertiesobject you pass into that method includes properties for configuring CHAP and Mutual CHAP. See thevSphere Storagedocumentation for information about securing your iSCSI storage array.
- Configure access to the targets.
- Rescan the HBAs.Rescan enables the HBAs to discover the new storage devices. You can either rescan a single HBA withHostStorageSystem.RescanHba, specifying the HBA ID as a parameter, or rescan all HBAs usingHostStorageSystem.RescanAllHba.