storage_iscsi_add_target
Add an iSCSI send (dynamic discovery) target to an ESXi host's software iSCSI adapter, then rescan all HBAs and VMFS volumes to discover new LUNs.
Instructions
[WRITE] Add an iSCSI send (dynamic discovery) target to an ESXi host's software iSCSI adapter, then automatically rescan all HBAs and VMFS volumes to discover new LUNs.
Prerequisite: software iSCSI must be enabled first (storage_iscsi_enable); otherwise returns an error with guidance. Idempotent: a duplicate address:port returns "already configured" without changes. No separate storage_rescan call is needed afterwards. Audit-logged to ~/.vmware/audit.db. Returns a confirmation string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | iSCSI TCP port, 1-65535 (default 3260). | |
| target | No | Optional vCenter/ESXi target name from config. | |
| address | Yes | iSCSI portal IP address (IPv4/IPv6 literal; hostnames are rejected with a validation error). | |
| dry_run | No | If true, return a preview of the change without executing it. | |
| host_name | Yes | ESXi host name as shown in vCenter inventory. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |