VM segment port is not deleted in NSX after VM is removed from vCenter
search cancel

VM segment port is not deleted in NSX after VM is removed from vCenter

book

Article ID: 399077

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • A VM is deleted from vCenter.
  • Post deletion of VM, the VM port remains within NSX.

NSX User Interface > Networking > Segments > NSX > Ports

  • The NSX Manager logs shows an attempt to remove multiple attachers.

    /var/log/proton/nsxapi.log
    2025-04-18T12:58:46.752Z  INFO L2TaskExecutor19 LogicalPortServiceImpl 77332 SWITCHING [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] DebugLp: Removing attachers : portAttachers [LogicalPortAttachers [logicalPortId=[UUID], attachers={[UUID]=[/vmfs/volumes/[ID]/[VM Name].vmx], [UUID]=[/vmfs/volumes/[ID]/[VM Name].vmx]}]]

  • For the stale port, multiple attachers can also be seen in the user interface

NSX User Interface > Networking > Segments > NSX > Ports > More > View Attachment Details

Environment

VMware NSX-T Data Center
VMware NSX

Cause

There is no retry mechanism when a DETACH message is sent from the source host to the manager during a VM migration. If this message is lost, the logical port (LP) attacher will remain indefinitely set on the LP. When attempting to delete the LP, it will remain, as the stale attacher blocks the LP deletion task. This results in a stale port.

Resolution

This is a known issue impacting VMware NSX.

Additional Information

To clean up stale ports. Please see KB 324256