vCloud Director 10 has introduced a new concept called VM placement policies which helps Cloud Provider to control the virtual machine (VM) placement on a specific cluster or host.VM placement policies give cloud providers various options to allocate resources to various use cases like:
- Deploy VM’s to specific cluster based on performance requirement
- Deploy VM’s to Specific cluster based on resource requirements
- Deploy VM’s based on Licensing requirement as a part of Oracle/SQL licenses optimisation
- Allocate specific hosts to specific Tenants
- Deploy container/special use case specific VMs to a specific host/cluster
- Restrict elastic VDC pools to deploy VMs to a specific cluster
vCD Provider administrator create and manage VM placement policies and placement policies are created and managed for each provider VDC, because a VM placement policy is scoped at the provider VDC level.
Create a VM Placement Policy
Before we create VM Placement policies, provider need to perform few steps on vCenter , so lets go and login to vCenter which is providing resource to vCloud Director and go to Cluster -> Configure -> VM/Host Groups
In this case i want to limit deployment of Oracle and MS SQL VM’s to specific hosts due to licensing, so let’s create Hosts groups and VM Groups:
Host Groups:
To create Host Groups , Click on Add inside VM/Host Groups:
- Enter Host Group Name
- Select Type as “Host Group”
- Click on Add to add Host/Hosts of the cluster.
VM Groups
To create VM Groups , Click on Add inside VM/Host Groups
- Enter VM Group Name
- Select Type as “VM Group”
- Click on Add to add VM/VMs of the cluster. (select any dummy VM as of now)
once both the groups has been created go to VM/Host rules in the cluster and create a rule.
VM/Host Rules
To create VM/Host Rules, Click on Add inside VM/Host Rules
- Enter Rule Name
- Ensure “Enable rule”
- Select rule type as “Virtual Machine to Hosts”
- VM Group: Select VM Group that we have created above
- Here you have four choices: (In my case i have choose Must rule)
- Must run on host in group
- Should run on host in group
- Must not run on host in group
- Should not run on host in group
- Host Group: Select Host Group that we have created above
From vCenter prospective we are done, we have multiple choice to create VM to Hosts affinity/anti-affinity rules , once we have created rules , vCloud director picks up only “VM Groups” which provider will expose to tenants.
Create VM Placement Policies in vCloud Director
- Click on “VM Placement Policies”
New Policy Creation Wizard
Publish VM Placement Policies to Org VDC
When provider creates a VM placement policy, it is not visible to tenants. Provider need to publish a VM placement policy to an org VDC to make it available to tenants and publishing a VM placement policy to an org VDC makes the policy visible to tenants. The tenant can select the policy when they:
- Create a new standalone VM
- Create a VM from a template,
- edit a VM
- add a VM to a vApp
- Create a vApp from a vApp template.
To publish this newly created policy to tenants , go to:
- Organization VDCs and Select an organization VDC
- Click the VM Placement Policies tab and Click Add.
- Select the VM placement policies that you want to add to the organization VDC and click OK.
- Provider can make certain policies as “Default” when customer does not choose any policy , system will automatically use “Default”.
Policy Usage by Tenant
Once policies has been created and exposed to tenant organisation, tenant can use those policies while provisioning VMs. like here i have created two policies “Oracle” and “SQL” and tenant can choose based on workload requirement.
NOTE – Placement Policies are optional and a provider can continue to use the default policy that is created during installation and only one policy can be assigned to a VM.
This completes the creation of placement policies and their exposure to tenants. please feel free to share/comment.
awesome
LikeLike
Hi, very good feature ! Do we have a way to prevent the user if he choose the wrong placemement policies ?
I mean for example, if guest OS is “microsoft”, the placement policies must be the microsoft one, maybe with vCO workflow and blocking task ?
LikeLike
How does this work for getting vms placed into a specific cluster?
These host to group mappings are to put vms on a particular host in a cluster aren’t they?
LikeLike
How does this work for getting vms placed into a specific cluster?
These host to group mappings are to put vms on a particular host in a cluster aren’t they?
LikeLike
You create a host group and that group will have all the hosts of that cluster and on this group apply policy..
LikeLike