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 role and Cloud Assembly Administrator service role. 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.

  1. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty.
  2. Click Try it out.
  3. For the value, enter true.
  4. For the key, enter PREVENT_COMPUTE_MEMORY_OVERALLOCATION.
  5. 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:

  1. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty .
  2. Click Try it out.
  3. For the value, enter 50.
  4. For the key, enter DEFAULT_MAX_ALLOWED_COMPUTE_MEMORY_ALLOCATION_PERCENT.
  5. Click Execute.

To set a host and cluster limit:

  1. 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.
  2. Locate and copy the ID for the host or cluster that you want apply the limit to.
  3. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Fabric%20Compute/updateFabricCompute.
  4. Click Try it out.
  5. Enter the host or cluster ID that you retrieved using the Get command.
  6. Enter the property and value.

    For example, "maximumAllowedMemoryAllocationPercent": 120

  7. 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.

  1. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty.
  2. Click Try it out.
  3. For the value, enter true.
  4. For the key, enter PREVENT_COMPUTE_STORAGE_OVERALLOCATION.
  5. 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:

  1. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty.
  2. Click Try it out.
  3. For the value, enter 50.
  4. For the key, enter DEFAULT_MAX_ALLOWED_STORAGE_ALLOCATION_PERCENT.
  5. Click Execute.

To set a limit on a specific datastore:

  1. 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.
  2. Locate and copy the ID for the datastore that you want to apply the limit to.
  3. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Fabric%20vSphere%20Datastore/updateFabricVsphereDatastore.
  4. Click Try it out.
  5. Enter the datastore ID that you retrieved using the Get command.
  6. Enter the property and value.

    For example, “maximumAllowedStorageAllocationPercent”:120

  7. Click Execute.

Prevent CPU 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 to insufficient virtual CPUs.

To avoid deploying resources that you cannot turn on, you can set the PREVENT_COMPUTE_CPU_OVERALLOCATION configuration property to TRUE. This change ensures that vRealize Automation tracks how many virtual CPU threads are 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 CPUs 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.

  1. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty.
  2. Click Try it out.
  3. For the value, enter true.
  4. For the key, enter PREVENT_COMPUTE_CPU_OVERALLOCATION.
  5. Click Execute.

To reset the preventing property and allow overallocation, set the value to false.

Set CPU allocation limits

You can set a percentage value that is used as the maximum number of virtual CPU threads 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 10 CPUs and you set the value at 50%. vRealize Automation considers the host to have 5 CPUs. Or, you can set the value to 120%. vRealize Automation then considers the host to have 12 CPUs.

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:

  1. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Property/patchConfigurationProperty .
  2. Click Try it out.
  3. For the value, enter 50.
  4. For the key, enter DEFAULT_MAX_ALLOWED_COMPUTE_CPU_ALLOCATION_PERCENT.
  5. Click Execute.

To set a host and cluster limit:

  1. 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.
  2. Locate and copy the ID for the host or cluster that you want apply the limit to.
  3. To add the property, go to https://<your_automation_URL>/iaas/api/swagger/ui/#/Fabric%20Compute/updateFabricCompute.
  4. Click Try it out.
  5. Enter the host or cluster ID that you retrieved using the Get command.
  6. Enter the property and value.

    For example, "maximumAllowedCpuAllocationPercent": 120

  7. Click Execute.