As an administrator, you can define the placement policy for projects where more than one cloud zone is eligible as the deployment target zone. For example, you might have a project where you want to deploy cloud templates based on the set priority, you might want to balance the deployed resources across multiple zones based on which one has the best VM to host ratio, or you might want to balance the VMs based on the amount of free resources in the zones. .

Allocation considerations

For a default or spread placement policy.

  • If the deploying user has permission to manage cloud accounts that are in maintenance mode, the allocation process can select a cloud account that is in maintenance mode because the user might need to run a test deployment before closing the maintenance window.
  • If the user does not have permission to manage cloud accounts, then the cloud accounts that are in maintenance mode are filtered out of the allocation process.
  • Hosts that are in maintenance mode are counted as part of the spread ratio. To exclude a host in maintenance from the ratio calculation, you must set the power state to off.

For a spread policy.

  • Ratios are calculated based on hosts. The hosts can be standalone or part of a cluster.
  • If a standalone host is powered off, it is not counted as part of the ratio.
  • If a host that is part of a cluster is powered off, the powered off state is not reflected in the cluster and the host is still considered when calculating the ratio.

For a spread by memory policy.

  • The amount of free memory is calculated by identifying the amount of memory of all the hosts in the cloud zone minus the allocated memory of all the currently deployed virtual machines. However, there are variations based on whether the project is evaluate private cloud zones, public cloud zones, or a mix of private and public.
    • Projects with only private cloud zones.

      To determine free memory for private cloud zones, the total memory of the hosts in the zone is retrieved. The amount of memory allocated to all the managed virtual machines is retrieved. The free memory is the total memory minus allocated memory.

    • Projects with only public cloud zones.

      It is not possible to determine the free memory for public cloud zones. Therefore, the amount of memory allocated to all the managed virtual machines is retrieved. The cloud zones are ordered by the amount of allocated memory so that the zone with the least amount of allocated memory is prioritized first.

    • Projects with a mix of private and public cloud zones.

      To determine the amount of free memory, the private cloud zone with the largest amount of total memory, which is retrievable information, is made the baseline that is used for all the public cloud zones.

      The amount of free memory for all the private cloud zones are individually calculated based on the total memory of the hosts minus the memory allocated for the virtual machines. The amount of free memory for all the public cloud zones are calculated based on the value identified for the largest private zone memory. Then the memory allocated to all the managed virtual machines is subtracted from that baseline total and the zones with the most free memory are prioritized first.

How to set the placement policy

If you have multiple cloud zones in a project that are equally eligible as the target for a deployment, the deployment request evaluates where to place them based on how you have the Placement policy configured.

  1. Select Infrastructure > Projects and create or select a project.
  2. In the project, click the Provisioning tab.
  3. Select a policy.
    Placement policy Description
    Default

    Deploys the requested resources to the first cloud zone that matches the requirements.

    Select Default when you want the workloads deployed in the priority order and don't mind utilizing all the resources on a host.

    If this option is selected, the VM and Hosts values are not retrieved.

    Spread

    Deploys the requested resources to the cloud zone with the smallest number of virtual machines per hosts.

    Select Spread when you want to distribute the workloads across hosts, utilizing resources broadly across hosts.

    If this option is selected, the number of VMs and hosts are retrieved from the cloud zone resources and evaluated.

    Spread by Memory

    Deploys the requested resources to the cloud zone with the largest amount of free memory.

    Select Spread by Memory when you want the workloads placed on hosts with the largest amount of unallocated memory.

    If this option is selected, the identification of the zone with the most free memory depends on whether the project contains only private cloud zones, public cloud zones, or a mix. See the allocation considerations above.

  4. Click Save.

Review how the policy is applied

After you configure the project-level placement policy, you can view where the system plans to deploy the cloud template in a provisioning diagram.

  1. Select Design > Cloud Templates and select or configure a template that uses the project to which you selected a policy.
  2. Click Test.
  3. When the test completes successfully, click Provisioning Diagram in the test results.
  4. The diagram will resemble one of the two examples.
    Policy Type Provisioning diagram
    Default Screenshot of the provisioning diagram with the default policy highlighted and VM and host values of zero.
    Spread Screenshot of the provisioning diagram with the spread policy highlighted and VM and host values of that illustrate the better ratio.
  5. If you are ready to deploy, return to the cloud template and click Deploy.

Placement policy evaluation during the allocation process

The following diagram helps you understand when the policy is evaluated during the allocation process and when the target zone and host are identified.

Workflow diagram that illustrates how the placement is determined based in the default or spread placement policy.