In some environments there may be a need to add business or operational constraints to Turbonomic. By creating Workload Placement policies, we can ensure Turbonomic is taking these constraints into account when it makes its decisions to keep the environment in the desired state. This may come in handy if workloads need to remain on certain tiers of storage, or if certain VMs need to remain on certain hosts for licensing reasons, etc...
Remember, Turbonomic will import existing workload policies from your hypervisor so you do not need to recreate these. Turbonomic's policies allow you to create enterprise- or datacenter-wide policies (as opposed to only cluster policies that are available in most hypervisors). You can verify that your existing policies have been imported by going to the Policy Tab > Workload Placement > Imported Placement Policies.
How to Create Workload Placement Policies
The high-level instructions:
1) Create a Consumer group.
2) Create a Provider group.
3) Create the policy that allows or does not allow the Consumer group to consume resources from the Provider group.
In my example, I want to make sure certain VMs (consumer group) only live on certain hosts (provider group).
1) Policy Tab > Group Management
2) Select the green button to create a new group
3) Give your group a name and then select the Members Tab
4) You can create a dynamic group that always matches certain criteria or you can create a static group that you manually maintain. For a dynamic group, select “Group entities by criteria” and for a static group, select “Manually select entities to group”
Then select the type of entity you would like to group by
Select how you would like to search for this entity
In my example, I will search by name.
Use regex to create the string you would like to match
In my example, I’m searching for all Virtual Machines that contain the string “sql”
Example of a Dynamic Group matching SQL. This group will constantly be updated as changes are made the environment – for example, new VMs that contain the string “sql” will automatically be added to the group
Example of a Static Group matching SQL. Manually select the entities (you can multi-select using the ctrl and shift keys) and drag-n-drop them in the “Custom group content” box.
5) Click “Create Group”
In my example, I’ve now created my Consumer Group. I will repeat steps 1-5 to create my Provider group. My Provider Group will contain the hosts that I want my Consumer Group to remain on.
Here is my Special Hosts group that includes 2 of my Production hosts.
6) Now let’s create a Workload Placement policy. Policy Tab > Workload Placement
7) Select the green button to create a new policy
8) Give your policy a name
9) What sort of policy would you like to create?
Place: Always place certain consumer entities on certain provider entities.
Examples: Always place X VMs on Y Hosts or Datastores. Always place X Datastores on Y Disk Arrays
Don’t Place: Never place certain consumer entities on certain provider entities.
Examples: Never place X VMs on Y Hosts or Datastores
Merge*: Allow Turbonomic to migrate VMs between Host Clusters or Storage Clusters
Examples: Migrate VMs between clusters Prod_1 and Prod_2.
*Storage and Network must be configured correctly across clusters so that a migration can take place.
10) Choose the “Consumer Type”
What sort of entity are you creating a policy around? Application, Virtual Machine, or Storage
In my example, I am selecting Virtual Machine since my Consumer group consists of Virtual Machines.
11) Click on the green button to select the Consumer Group. You will then be presented with all the different groupings that match the Consumer Type you selected. Click OK once you've found the Consumer Group.
In my example, I am presented with all of the Virtual Machine groups. In “My Groups” I will find the custom group I created earlier - “Special VMs”
12) Click on the green button to select the Provider Group. You will then be presented with all the different Provider groups that the Consumer can consume resources from. Click OK once you've found the Consumer Group.
In my example, I am presented with all of the Host & Storage groups. In “My Groups” I will find the custom group I created earlier - “Special Hosts”
13) Click “Create” and verify your new policy is located under the “Turbonomic Segments” folder.
Turbonomic will now take this policy into account when making its decisions to keep the environment in the desired state.