A non-functional iSCSI target remains visible when listing vSAN iSCSI targets.
The target has no LUNs attached and shows as non-compliant.
The target cannot be removed from the vCenter UI or via standard esxcli commands.
Example output showing the stale target:
[root@localhost:~] esxcli vsan iscsi target listAlias iSCSI Qualified Name (IQN) Interface Port Authentication type LUNs Is Compliant UUID I/O Owner UUID----------- ---------------------------------------------------------------------------------------- --------- ---- ------------------------- ------- ---------------- --------------------------------------------------------- --------------------------------------------------------testalias-2 iqn.1998-01.com.vmware:52c7########41a5-88ed########2330 vmk3 3260 No-Authentication 0 false a9f55c69-b036-9c27-925b-303e########DB-1 iqn.2026-01.com.ssf:oracledb-1 vmk3 3260 No-Authentication 4 true e8b36069-f2c6-7647-3e3c-303e######## 693bc8c8-34b3-7155-9e4c-303e########
Removing the stale target via vCenter fails with the following error:
Cannot complete the operation. See the event log for details. Failed to remove an iSCSI target. _RemoveIscsiTarget failed, error is Util: Cannot find target namespace dir for target a9f55c69-b036-9c27-925b-303e########
VMware vSAN 9.0.0
The affected iSCSI target (testalias-2) was previously created for testing and later deleted.
Although the target was removed, its associated metadata was not fully cleaned up from the vSAN iSCSI configuration. As a result:
A stale iSCSI target entry remains registered in the vSAN configuration.
The corresponding target namespace directory no longer exists on the vSAN datastore.
vCenter and standard CLI removal operations fail because they rely on this missing namespace directory.
This results in an orphaned iSCSI target object that cannot be managed through supported UI or CLI workflows.
Note: This procedure modifies internal vSAN configuration files. Ensure a valid backup is taken before proceeding.
cd /vmfs/volumes/vsanDatastore/.iSCSI-CONFIG/etc/
cp vit.conf vit.conf.backup
vi vit.conf
testalias-2)(:wq! in vi)
Restart the required services to apply the changes:
/etc/init.d/vitd restart
/etc/init.d/vsanmgmtd restart
This issue is typically observed when iSCSI targets are created and removed during testing or repeated configuration changes.
Proper cleanup does not always occur if target deletion fails or is interrupted.
If the issue persists or multiple stale entries are present, contact VMware Support before performing further manual cleanup.