storage_iscsi_remove_target
Remove an iSCSI send target from an ESXi host's software adapter, previewing affected paths and datastores before confirming the destructive rescan.
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 through this target become inaccessible after the rescan. Without confirm=True this only previews: it returns blast_radius (the static targets it discovered, the paths that go with them, the devices and VMFS datastores that lose all or some paths) and changes nothing. Show that to the user and get their explicit decision. Do not set confirm=True on your own because the user asked earlier — they have not seen what it cuts off yet. Refused when a datastore would lose every path (unmount it first), when the address:port is not configured or software iSCSI is disabled, and when any path or static target cannot be attributed. Reversible only by re-adding via storage_iscsi_add_target. Returns a dict.
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. | |
| confirm | No | False (default) returns the blast radius and changes nothing. True applies it. | |
| dry_run | No | Deprecated alias for confirm; removed in the next minor release. dry_run=False acts, dry_run=True previews. | |
| host_name | Yes | ESXi host name as shown in vCenter inventory. |