storage_iscsi_remove_target
Remove an iSCSI send target from an ESXi host's software iSCSI adapter, then rescan HBAs and VMFS. Verify no datastores depend on it first: LUNs served only by that target become inaccessible.
Instructions
[WRITE] Remove an iSCSI send target from an ESXi host's software iSCSI adapter, then rescan all HBAs and VMFS volumes.
Destructive: LUNs served only by this target become inaccessible after the rescan — first verify the target exists (storage_iscsi_status) and that no datastores depend on it (list_all_datastores). Errors if the address:port pair is not configured or software iSCSI is disabled. Reversible only by re-adding via storage_iscsi_add_target. Audit-logged to ~/.vmware/audit.db. Returns a confirmation string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Configured iSCSI TCP port, 1-65535 (default 3260). | |
| target | No | Optional vCenter/ESXi target name from config. | |
| address | Yes | Configured iSCSI portal IP (IPv4/IPv6 literal; hostnames rejected). Must match the existing entry exactly. | |
| 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 |