A VM placement policy is a VDC compute policy that contains a reference to a provider VDC policy. You can add multiple provider VDCs to the scope of a VM placement policy. You can use a VM placement policy to define the placement of a VM on a specific host, group of hosts, or a cluster.

A VM placement policy can contain a reference to one or more provider VDC policies. When you create a placement policy from within a provider VDC, the policy references only the selected provider VDC. You can include more provider VDCs in the scope of a VM placement policy by editing it or you can create a placement policy from the VM Placement Policies tab to include more than one provider VDC in its scope. See Edit a VM Placement Policy and Create a Global VM Placement Policy.

Prerequisites

  • Verify that you have at least one provider VDC in your environment.
  • Verify that you have at least one VM group in your environment.

    A VM group is a collection of VMs that you can link to a host group with positive affinities. Through a positive affinity rule, you cause the placement of a group of VMs on a specific host. You can create a VM group through the vCenter Server UI or the VMware Cloud Director API.

Procedure

  1. From the top navigation bar, select Resources and click Cloud Resources.
  2. In the left panel, select Provider VDCs.
  3. Click a provider VDC from the list.
  4. Click the VM Placement Policies tab and click New.
  5. (Optional) On the What is VM Placement policy page of the wizard, select the check box to stop showing the VM placement policy information.
  6. Click Next.
  7. Enter a name for the VM placement policy and, optionally, a description.
  8. Select the VM groups or logical VM groups to which you want the VM to be linked and click Next.

    When you select more than one logical group, if a tenant applies this policy to a VM, the VM becomes a member of all the VM groups included in the selected logical VM groups. The VM is conditioned to a combination of all the affinities that apply to the VMs in these groups. You can select simultaneously VM groups and logical groups.

    You can create an inline logical VM group by selecting one VM group per cluster. This logical VM group does not have a name and can be used only for the selected VM placement policy.

  9. For VMware Cloud Director 10.4.2 and later, if you want to define a sizing policy together with the placement policy and you are not reusing an existing policy, set predefined CPU and memory consumption constraints that apply to VMs with this policy.
    To learn more about the CPU and memory attributes, see Attributes of VM Sizing Policies.
    1. Select Yes, and click Next.
    2. On the CPU page, select the CPU allocation settings that you want to apply to the policy, and click Next.
    3. Select the memory allocation settings that you want to apply to the policy.
  10. For VMware Cloud Director 10.4.2 and later, click Next.
  11. Review the VM placement policy settings and click Finish.

What to do next