Error 'This endpoint is being used by # compute resources and # storage paths and cannot be deleted' when you delete an endpoint in vRealize Automation 5.x - 6.x
search cancel

Error 'This endpoint is being used by # compute resources and # storage paths and cannot be deleted' when you delete an endpoint in vRealize Automation 5.x - 6.x

book

Article ID: 325801

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • After collecting data against an endpoint in vRealize Automation (formerly known as vCloud Automation Center), you are unable to delete the endpoint regardless of any assigned compute resources.
  • The error that is displayed when you attempt to delete the endpoint will be similar to:

    You cannot delete this endpoint because 2 compute resources and 0 storage paths use it


Environment

VMware vCloud Automation Center for Desktop 6.1.x
VMware vRealize Automation 6.2.x
VMware vCloud Automation Center for Desktop 5.2.x
VMware vCloud Automation Center for Server 5.1.x
VMware vCloud Automation Center for Server 6.1.x
VMware vCloud Automation Center for Server 5.2.x
VMware vRealize Automation Desktop 6.2.x
VMware vCloud Automation Center for Server 6.0.x
VMware vCloud Automation Center for Desktop 5.1.x
VMware vCloud Automation Center for Desktop 6.0.x

Cause

This issue occurs when compute resources have been collected against an endpoint preventing you from deleting it.

Resolution

This is a known issue affecting vRealize Automation 5.x and 6.x.

Currently, there is no resolution for these versions.
 


Workaround:
Note: Do not attempt to run the scripts attached to this article on vRealize Automation 7.x versions.
 
To work around this issue, execute the relevant stored procedure attached to this KB article which is designed to delete hosts and compute resources that are not associated with any active Fabric groups or reservations. This stored procedure will not remove any resources from vRealize Automation that are actively in use.
  1. Back up your vRealize Automation SQL database.
  2. Download the RemoveInactiveHosts script attached for the exact version of vRealize Automation.
  3. Delete any Reservations you have associated with Compute Resources that are associated with the Endpoint you want to delete.
  4. Install the SQL stored procedure from the RemoveInactiveHosts zip file you have downloaded into your vRealize Automation database.
  5. Stop any Agents associated with collecting data from the Endpoint.
  6. Run this SQL query against the vRealize Automation database to retrieve a list of resources that will be removed:

    exec usp_RemoveInactiveHosts
     
  7. Run this SQL query against the vRealize Automation database to execute the deletions:

    exec usp_RemoveInactiveHosts @DeleteFromDB = 1
     
  8. After the deletion is complete, attempt once again to delete the endpoint.
  9. If you still cannot delete the endpoint, you may have active reservations or the compute resource may still be associated with a Fabric group. Start again at step 3.
  10. After the endpoint is removed, you can start the associated agents and run another data collection to pull any missing hosts back"


Additional Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions boxError "This endpoint is being used by # compute resources and # storage paths and cannot be deleted" when you attempt to delete an endpoint in vRA 7.x

Impact/Risks:
If you do not install the correct version of the RemoveInactiveHosts stored procedure, you can cause data corruption in the vRealize Automation database. Be sure to back up your database prior to beginning.

Attachments

2105809_RemoveInactiveHosts52.zip get_app
2105809_RemoveInactiveHosts62_v1.zip get_app
2105809_usp_RemoveInactiveHosts60.zip get_app
2105809_RemoveInactiveHost61_v5.zip get_app
2105809_RemoveInactiveHostsV40.zip get_app