How to manually remove a Cloud Proxy from Aria/vRealize Operations cluster
search cancel

How to manually remove a Cloud Proxy from Aria/vRealize Operations cluster

book

Article ID: 326397

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

The purpose of this article is to explain how to remove a Cloud Proxy manually via CLI.

Symptoms:
  • A Cloud Proxy may be duplicated on the Administration Cloud Proxies page.
  • A Cloud Proxy is powered off and deleted without removing it from Aria/vRealize Operations Operations, the Cloud Proxy is listed as inaccessible.
  • Attempts to gracefully remove the Cloud Proxy from either of the scenarios does not succeed.
  • As of Aria Operations 8.16, converted remote collectors must be removed and replaced with full cloud proxies. 


Environment

VMware vRealize Operations 8.x
VMware vRealize Operations 8.10.x
VMware vRealize Operations 8.6.x

Cause

  • Occasionally there can be a duplicate cloud proxy listed in the Product/Admin UI.
  • This can occur during cluster upgrades or failed Cloud Proxy deployments.

Resolution

If the Cloud Proxy is available in Aria/vRealize Operations Product UI, remove it from Product UI first:

  1. Select Data Sources -> Cloud Proxies
  2. Click the three vertical dots (ellipsis), and select Delete
Please note that in some older versions you have to select the Cloud Proxy in the list, and select Remove from the CP information window.

 

When the Cloud Proxy only appears in Admin UI, it must be removed using API call, the below command will prompt for Aria/vRealize Operations admin password:

curl --insecure 'https://<VROPS_IP>/casa/onprem/v1/cloudproxy/remove' -i -u 'admin' -X DELETE -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"cloud_proxy_uuid":"<INVALID-UUID>"}'


Replace <VROPS_IP> with IP Address of Aria/vRealize Operations primary node

Replace <INVALID-UUID> with UUID found as determined with the below steps:

  • You can manually review file /storage/db/casa/webapp/hsqldb/casa.db.script to determine UUID of Cloud Proxy using name or IP of Cloud Proxy. Alternatively, make the content easier to read using command:

sed -nre "/CLOUD_PROXIES/ s/^[^']+'([^']+)','([^']+)'.*/\2/p" /storage/db/casa/webapp/hsqldb/casa.db.script | python -m json.tool > /tmp/cloud_proxies


Use the following command to review the output of the previous command:

less /tmp/cloud_proxies

UUID will be in the following format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

NOTE! Do not modify casa.db.script file, this is not straight forward, and beyond the scope of this KB. The API call must be used to ensure safe removal of Cloud Proxy

 
  • You can now replace <VROPS_IP> and <INVALID-UUID>, as per example below:

curl --insecure 'https://192.168.0.0/casa/onprem/v1/cloudproxy/remove' -i -u 'admin' -X DELETE -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"cloud_proxy_uuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'

 
  • The invalid Cloud Proxy should have been removed and will no longer appear in the Admin UI


Additional Information

Impact/Risks:
  • The below steps will only be successful if the cluster is in a clean Online or Offline state.
    Do not attempt the below steps if the cluster is in a failed state, or in the middle of expanding or shrinking the cluster.

    Ensure you have a valid snapshot or backup of the vRealize Operations cluster before proceeding.
    See How to take a Snapshot of VMware Aria Operations for more information.