iSCSI discovery sendtarget address remove operation fails
search cancel

iSCSI discovery sendtarget address remove operation fails

book

Article ID: 319790

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When there are active sessions on the targets discovered by an iSCSI discovery sendtarget address, you see these symptoms:

  • The iSCSI discovery sendtarget address remove operation fails.
  • You see this error similar to:

    Cannot remove discovery address as there are active sessions on the targets discovered by this address.

Environment

  • VMware vSphere ESXi 7.x
  • VMware vSphere ESXi 8.x
  • VMware vSphere ESXi 9.x

Cause

This issue occurs because the iSCSI discovery sendtarget address is removed when there are active sessions on the targets discovered by this address.

Resolution

Resolution: To resolve this issue, manually terminate the active sessions before removing the discovery address.

  1. List the active iSCSI sessions: esxcli iscsi session list

  2. Identify the Target Name (IQN) and Adapter from the list.

  3. Remove the specific session: esxcli iscsi session remove --name=<target_name> --adapter=<adapter_name>

  4. Alternatively, use the force flag to remove the discovery address and its associated sessions: esxcli iscsi adapter discovery sendtarget remove --adapter=<adapter_name> --address=<IP_address:port> --force

Additional Information

For additional information see How to remove iSCSI targets on ESXi