Error: "Security group '<group name> cannot be deleted as it is in use." when deleting edge gateway in VMware Cloud Director
search cancel

Error: "Security group '<group name> cannot be deleted as it is in use." when deleting edge gateway in VMware Cloud Director

book

Article ID: 383808

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Deleting Organization VDC(OVDC) fails with the error:

    [########-####-####-####-############] Security group '<group name> cannot be deleted as it is in use.

  • Debug messages show references to the group in NSX:

    "com.vmware.vcloud.api.presentation.service.BadRequestException: Security group '<group name>' cannot be deleted as it is in use. at com.vmware.vcloud.networking.model.nsxtresource.NsxTGroup.deleteGroupInNsx(NsxTGroup.java:125)
  • The edge is not present in NSX.
  • The security group in the error is present in NSX but not used by any other objects. 

Environment

VMware Cloud Director 10.5.x

Cause

The edge deletion fails in VCD as the group cannot be deleted in NSX. 

Resolution

To resolve the issue, remove the stale security group in the NSX and then delete the edge in VCD.  

The documentation shows the steps to be followed when creating a security group, navigate to the NSX UI with the steps to identify the groups and delete the one associated with the OVDC edge gateway.