By using provider virtual data center (VDC) compute policies, vCloud Director system administratorscan expose virtual machine (VM) groups and logical VM groups to tenants.

Provider VDC compute policies might contain a collection of the following:
  • VM groups that contain similar VMs. Each VM group belongs to a different cluster.
  • Logical VM groups that are suited for diverse functionalities.
  • Both VM groups and logical VM groups.

Provider VDC Compute Policies and Logical VM Groups

System administrator can expose vSphere Distributed Resource Scheduler (DRS) VM-host affinity rules to tenants by using VM groups and logical VM groups. DRS VM-host affinity rules are exposed at the provider level in vCloud Director as VM groups. VM-host affinity rules are bound to a specific cluster. Because elastic provider VDCs can span across multiple vSphere clusters, logical VM groups provide the abstraction of DRS VM-host affinity rules that works across multiple clusters by grouping cluster bound VM groups that are logically equivalent. To manage logical VM groups, you use vCloud OpenAPI. For information about vCloud OpenAPI, see Getting Started with vCloud OpenAPI at https://code.vmware.com.

To expose VM-host affinity rules, you add VM groups and logical VM groups to a provider VDC compute policy and create a reference between the provider VDC compute policy and a VDC compute policy.

In the provider VDC compute policy context, logical VM groups have an AND relationship between one another.

With provider VDC compute policies and logical VM groups, vCloud Director system administrators can expose multiple VM groups to tenant users within an organization VDC. For example, consider an environment that contains two clusters: cluster1 and cluster2. In cluster1 resides the host SQL_host_1, while in cluster2 reside the hosts SQL_fast_host and Fast_host.
  1. In cluster1, you create SQL_host_group1 and VM_group1.

    You create a positive affinity between VM_group1 and SQL_host_group1.

  2. In cluster2, you create four groups.
    • You create SQL_host_group2 and VM_group2

      You create a positive affinity between VM_group2 and SQL_host_group2.

    • You create fast_host_group and VM_group3.

      You create a positive affinity between VM_group3 and fast_host_group.

You create the PVDC_compute_policy1 that consists of logical_VM_group1 and logical_VM_group2. The logical_VM_group1 comprises VM_group1 and VM_group2. The logical_VM_group2 comprises VM_group3.

You create and publish the SQL_and_fast VDC compute policy to an organization VDC, and add a reference to PVDC_compute_policy1. When you create a reference between the SQL_and_fast VDC compute policy and the PVDC_compute_policy1, you expose logical VM groups and VM groups information to tenant users within the organization VDC. As a result, when a tenant applies the SQL_and_fast VDC compute policy to a VM, the placement engine adds the VM to the SQL_fast_host within cluster2.

The workflow is the following.
  1. A vCenter Server administrator creates host groups by using the vSphere Client.

    For information, see the Create a Host DRS Group (MSCS) topic in the VMware vSphere ESXi and vCenter Server Documentation.

  2. A vCenter Server administrator or a vCloud Director system administrator creates VM groups.

    For information, see the Create or Update a VM Group topic in the vCloud Director Administrator's Guide.

  3. A vCloud Director system administrator creates the appropriate affinity rules between VM groups and host groups.

    For information, see Managing VM-Host Affinity Rules topic in the vCloud Director Administrator's Guide.

  4. A vCloud Director system administrator groups logically equivalent VM groups into logical VM groups by using the vCloud OpenAPI.
  5. A vCloud Director system administrator creates a provider VDC compute policy and adds the logical VM groups by using the vCloud OpenAPI.
  6. A vCloud Director system administrator creates a VDC compute policy that refers to the provider VDC compute policy, and publishes the VDC compute policy to an organization VDC by using the vCloud OpenAPI.
When a tenant creates a VM in the organization VDC and selects the VDC compute policy, vCloud Director adds the VM to the VM group that is referenced in the VDC compute policy. As a result, vCloud Director creates the VM on the appropriate host.

Provider VDC Compute Policies and VM Groups

A provider VDC compute policy can have zero or one VM group from each cluster. For example, the provider VDC compute policy oracle_license can comprise VM groups oracle_license1 and oracle_license2, where VM group oracle_license1 belongs to cluster oracle_cluster1, and VM group oracle_license2 belongs to cluster oracle_cluster2.

When you assign a provider VDC compute policy to a VM, the placement engine adds this VM to the corresponding VM group of the cluster on which it resides. For example, if you select to deploy a VM on cluster oracle_cluster1 and assign the provider VDC compute policy oracle_license to this VM, the placement engine adds the VM to VM group oracle_license1.

The workflow is the following.
  1. A system administrator creates one or more provider VDC compute policies by using the vCloud OpenAPI.
  2. A system administrator creates one or more VDC compute policies by using the vCloud OpenAPI.

    A VDC compute policy can be associated with zero or one provider VDC compute policy. VDC compute policies are unique by name and by provider VDC compute policy.

  3. A system administrator publishes the VDC compute policy to one or more organization VDCs by using the vCloud OpenAPI.

    Tenants can see only the VDC compute policies that are published to their organization VDCs. Provider VDC compute policies are not available at a tenant level.

  4. Tenants can use the vCloud API or the vCloud Director Tenant Portal to assign an organization VDC compute policy to a VM when creating or updating a VM.

Initially, the system does not contain any provider VDC compute policies, and each organization VDC contains only a default compute policy, which is not associated with a provider VDC compute policy.

To create and manage provider and global VDC compute policies, you must use the vCloud OpenAPI. See Getting Started with vCloud OpenAPI at https://code.vmware.com.