As a cloud administrator, you can set values that control how resources are allocated for deployments for your entire organization.
While you can use placement policies on cloud zones and in projects to control the distribution of workloads at deployment time, the methods presented here are used to prevent overallocation and set limits at the organization level.
What to do first
- Ensure that you have the organization owner permissions. You will need them to get an authentication token and run the commands. See What are the vRealize Automation user roles.
- Get an authentication topic. Locate the API Programming Guide for your version and see "Getting Your Authentication Token" in that guide.
Prevent memory overallocation
Some systems allow you to deploy resources even if the host or cluster does not have sufficient resources. For example, you successfully deploy a virtual machine, but you cannot turn it on due a lack of storage or memory.
To avoid deploying resources that you cannot turn on, you can set the PREVENT_COMPUTE_MEMORY_OVERALLOCATION configuration property to TRUE. This change ensures that vRealize Automation tracks how much memory is allocated on each host or cluster. It then uses that value to prevent provisioning to hosts or clusters that are fully utilized, preventing overallocation. The allocated memory is calculated by adding up all the managed virtual machines in the host or cluster. Discovered virtual machines that have not yet been onboarded are not counted.
This is a global property.
- To add the property, go to
https://<your_vRA_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty
. - Click Try it out.
- For the
value
, enter true. - For the
key
, enter PREVENT_COMPUTE_MEMORY_OVERALLOCATION. - Click Execute.
To reset the preventing property and allow overallocation, set the value to false
.
Set memory allocation limits
You can set a percentage value that is used as the maximum amount of memory for a host or cluster. This value is the allocation limit. You can set a conservative value of less than 100%. You can also set a value over 100% if you have a clear understanding of how your resources are allocated and want to fine tune the limit.
For example, you have a host or cluster with 100 GB of total memory and you set the value at 50%. vRealize Automation considers the host to have 50 GB of total memory. Or, you can set the value to 120%. vRealize Automation then considers the host to have 120 GB of memory.
You can set a global property and a host or cluster specific property. Any host- or cluster-specific value setting takes precedence over the global setting. This allows you to set a global default value and then set a more refined value for particular hosts or clusters.
To set the global limit:
- To add the property, go to
https://<your_vRA_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty
. - Click Try it out.
- For the
value
, enter 50. - For the
key
, enter DEFAULT_MAX_ALLOWED_COMPUTE_MEMORY_ALLOCATION_PERCENT. - Click Execute.
To set a host and cluster limit:
- To retrieve the host or cluster ID, referred to in the API as fabric computes, go to
https://<your_vRA_URL>/iaas/api/swagger/ui/#/Fabric%20Compute/getFabricComputes
and click` Try it out. - Locate and copy the ID for the host or cluster that you want apply the limit to.
- To add the property, go to
https://<your_vRA_URL>/iaas/api/swagger/ui/#/Fabric%20Compute/updateFabricCompute
. - Click Try it out.
- Enter the host or cluster ID that your retrieved using the Get command.
- Enter the property and value.
For example, "maximumAllowedMemoryAllocationPercent": 120
- Click Execute.