storage_iscsi_add_target
Adds an iSCSI send target to an ESXi host's software iSCSI adapter and automatically rescans to discover new LUNs. Requires iSCSI to be enabled first.
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.
Args: host_name: ESXi host name as shown in vCenter inventory. address: iSCSI portal IP address (IPv4/IPv6 literal; hostnames are rejected with a validation error). port: iSCSI TCP port, 1-65535 (default 3260). dry_run: If true, return a preview of the change without executing it. target: Optional vCenter/ESXi target name from config; omit for the default target.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| target | No | ||
| address | Yes | ||
| dry_run | No | ||
| host_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |