top of page
  • Brock Peterson

Exclude VMs from Rightsizing via API in VMware Aria Operations

The ability to rightsize VMs is a powerful feature of Aria Operations, one that we've discussed before. VMware Staff Technical Marketing Architect Brandon Gordon recently provided an update to his exhaustive blog on VM Rightsizing as well, you can find it here.

Within the UI, you can exclude VMs from Rightsizing by selecting the VM and choosing EXCLUDE VM(S).

What if you want to do this programmatically? API! In this we'll use both the Public API and Internal API. First, let's get the identifiers of the VMs we'd like to exclude via GET /api/resources, the cURL looks like this:

curl -X GET "" -H  "accept: application/json" -H  "Authorization: vRealizeOpsToken 287ed085-c6ca-4255-b69c-956f1665ed51::4d2d5517-4965-41bc-819c-f71b058755a8"

Searching the output of the GET /api/resources, I've found the identifiers of the VMs I want to exclude, naming these two:

You can also find the VM identifiers via Environment - Inventory.

Now that we have the identifiers, let's exclude them from Rightsizing. In order to do that, we'll have to explore the Internal APIs. Top right of your Swagger page, select Internal APIs from your dropdown.

Scroll down to the POST /internal/optimization/rightsizing/exclude/entities endpoint and adjust the Parameters to include your VM identifiers.

The cURL looks like this:

curl -X POST "" -H  "accept: application/json" -H  "X-vRealizeOps-API-use-unsupported: true" -H  "Authorization: vRealizeOpsToken 287ed085-c6ca-4255-b69c-956f1665ed51::6f2ef199-50d1-4e91-b23b-76798cc8e8f6" -H  "Content-Type: application/json" -d "{  \"entities\" : [ \"2d2fe6c6-2a4c-498c-86e8-cce1b763d3e1\" , \"287beeb2-05cd-4463-abfc-3ad2e3031d6a\" ]}"

Click Execute to exclude those two VMs from Rightsizing. Back at the Aria Operations UI we can confirm those two VMs are now being excluded from Rightsizing.

For more information on Aria Operations please visit the VMware Aria Apps & Cloud Management Tech Zone!

bottom of page