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.
Each of the resource checks described in this article operate independently. They are not dependent on one another.
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. Virtual machines that were provisioned outside vRealize Automation, discovered, but have not yet been onboarded are not counted.
This is a global property.
- To add the property, go to
https://<your_automation_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_automation_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_automation_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_automation_URL>/iaas/api/swagger/ui/#/Fabric%20Compute/updateFabricCompute
. - Click Try it out.
- Enter the host or cluster ID that you retrieved using the Get command.
- Enter the property and value.
For example, "maximumAllowedMemoryAllocationPercent": 120
- Click Execute.
Prevent storage overallocation of datastores
When you turn on the property, the amount of storage allocated on each datastore is tracked and that value is used to prevent provisioning to datastores where the provisioning request exceeds the available allocated storage.
The amount is calculated by summing the memory of all the managed disks on the datastore. Machines that are provisioned outside vRealize Automation, discovered, but not yet onboarded are not included in the calculation.
Set this global property.
- To add the property, go to
https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty
. - Click Try it out.
- For the
value
, enter true. - For the key, enter PREVENT_COMPUTE_STORAGE_OVERALLOCATION.
- Click Execute.
Set storage allocation limits
You can set a percentage value that is used as the maximum amount of storage for a datastore. This value is the allocation limit. You can set a conservative limit of less than 100%. You can also set a value over 100% if you have a clear understanding of how your resources allocation and you want to fine tune the limit.
For example, you have a datastore with 100 GB of total storage and you sent the value to 50%. vRealize Automation considers the datastore to have 50 GB of total storage. Or, you can set the value to 120%. vRealize Automation then considers the host to have 120 GB of storage.
You can set a global property and a datastore specific property. Any datastore-specific value setting takes precedence over the global setting. This method allows you to set a global default value and then set a more refined value for particular datastores.
To set the global limit:
- To add the property, go to
https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty
. - Click Try it out.
- For the
value
, enter 50. - For the
key
, enter DEFAULT_MAX_ALLOWED_STORAGE_ALLOCATION_PERCENT. - Click Execute.
To set a limit on a specific datastore:
- To retrieve the host or cluster ID, referred to in the API as fabric computes, go to
https://<your_automation_URL>/iaas/api/swagger/ui/#/Fabric%20vSphere%20Datastore/getFabricVsphereDatastore
and click Try it out. - Locate and copy the ID for the datastore that you want to apply the limit to.
- To add the property, go to
https://<your_automation_URL>/iaas/api/swagger/ui/#/Fabric%20vSphere%20Datastore/updateFabricVsphereDatastore
. - Click Try it out.
- Enter the datastore ID that you retrieved using the Get command.
- Enter the property and value.
For example, “maximumAllowedStorageAllocationPercent”:120
- Click Execute.