XenServer Management on Steroids with SCVMM 2012 Part 6

Share Button

In Part 5 we discussed App Controller 2012, and wrapped up our Delegation of Administration portion of this blog post. In Part 6 we will discuss my second pain point with XenServer which is the Lack of host affinity rules.

Resource affinity rules AKA Custom Placement Rules

In this section I’m going to show you how you can gain the benefit’s of affinity rules in your cluster. In SCVMM 2012 this is called “Host Placement Rules” I will dig into them below by walking you through a scenario.

Basically custom placement rules work in conjunction with custom properties that are defined on a particular object in SCVMM 2012. Custom properties can be defined on Virtual Machines, VM Templates, Host’s, Host cluster’s, Host Group, Service Template, Service Instance, Computer tier, and Cloud’s. By default SCVMM 2012 creates Custom fields 1-10, and you can also define your own. You will notice the custom properties section on any of the mentioned object’s properties dialog.

My goal with Custom Placement rule’s were to make sure Core Citrix Infrastructure roles such as Web Interface, Provisioning Server’s, Desktop Delivery Controllers, etc are NOT on the same HOST for obvious reasons.

Creating Custom Properties

1. Before we can determine which VM’s must stick on which host’s we’ll need to add a custom property to each of the Virtual Machine’s your looking to apply an affinity rule too. First up is adding the custom property, Right click your Virtual Machine and select properties. You will notice in Figure 64 1-10 custom properties are pre-created by SCVMM 2012. I personally don’t like them, and will show you why later. Instead, We’re going to create our own custom property field name. This can be done by clicking “Manage Custom Properties”

Figure 64 –
Defining custom properties

2. Under the Manage Custom Properties dialog you will notice we can select an “Object type” Drop this list down Virtual Machine than click “Create” For demo purposes I’m going to name it “Citrix-PVS”, it’s important to make a detailed description so you will remember exactly what the property is in reference too. As you can see in Figure 65I chose the name “Citrix-PVS” I’m going to make up values of “A” and “AA” to keep things simple. “AA” (Anti-Affinity) will separate hosts and “A” (Affinity) meaning same host. We could do 0,1, Apple, and Orange, Fish, and Mickey Mouse, it doesn’t matter the value, what matter’s is the logic when it’s applied to the custom placement rule. Click “OK” to close the “Create Custom Property” dialog.

Figure 65 –
Defining custom properties

3. After you click OK, you will notice in Figure 66 your newly defined custom property. Highlight it, and select “Add” this will move it under the Assigned Properties. Click “OK” when finished. As an example I left a bunch of fake custom properties I made, You’ll quickly notice you can’t remove custom properties created via the GUI ( at least I didn’t see how, so I turned to Powershell ) Here is the command if your interested to Remove a Custom Property from the GUI. Remove-SCCustomProperty

Figure 66 –
Defining custom properties

4. Once you close out of the “Manage Custom Properties” dialog box you will see the pre-defined “Custom 1-10” properties SCVMM provides along with your newly defined “Citrix-PVS” property. As noted in the Description from Figure 66 I defined “AA” which is shown in Figure 67 which will mean any PVS VM’s assigned the custom property “Citrix-PVS” with a Value of “AA” will be on separate hosts, as long as the custom placement rule matches this. Click “OK” to continue.

Figure 67 –
Defining custom properties

5. Our next step is to add the “AA” Value to the second PVS server in the cluster. Simply right click the VM –> select properties –> than select “Custom Properties” from the left hand side of the dialog. As seen in Figure 67the “Citrix-PVS” custom property is now shown automatically. As a heads up, this will be shown on “ALL” VM’s as it’s a Custom Property and it’s global. Enter “AA” for your second PVS server, and click “OK”.

6. Now that “Citrix-PVS” custom property is assigned to both PVS VM’s we will now need to assign this property to All XenServer host’s that the two PVS VM’s could possibly be hosted on, in my Lab environment I have two host’s so I’m going to assign the property to both hosts. Right click each Host and select properties –> Than select “Custom Properties” you will notice Custom Properties 1-10 showing, but not your defined “Citrix-PVS” property. Click “Manage Custom Properties” as seen in Figure 68 You will notice the “Object Type” is Host, not Virtual Machine because we are dealing with the Hosts. Select “Citirx-PVS” and click “Add”, than click “OK”

Figure 68 –
Defining custom properties

7. Just like in the previous step’s for applying the “Citrix-PVS” custom property to your PVS VM’s, your going to type the “AA” value than press “OK”. A completed screen shot of this step is shown in Figure 69 below. Your going to perform this step for All host’s which can host your PVS VM’s.

Figure 69 –
Defining custom properties

Creating Custom Placement Rules

1. Now that we have our custom properties created, and our values assigned to our PVS VM’s and hosts, it’s time to setup the custom placement rule. This is defined at the Host Folder level. I created a Host folder earlier called “XenServer DEV” which contains my Cluster, and two XenServer Hosts. As seen in Figure 70Right click “XenServer Dev” host folder and select properties.

Figure 70 –
Assigning Custom Placement rules

2. Once the “XenServer Dev” properties dialog is displayed, select “Placement Rules” on the left hand side. You will notice since I haven’t defined any rules, nothing is shown below. Let’s go ahead and click Add shown in Figure 71I’ll explain what each of the Rules in step 3.

Figure 71 –
Assigning Custom Placement rules

3. Let’s talk for a second about the custom “Requirements” before we make our selection. I would just like to say upfront there is not very good documentation on the custom placement rules, the best explanation I got was from a TechNet forum post. As you can see in Figure 72 There are four different options which can be assigned to your custom property, which also means assigned to your VM’s with this property assigned. In short, “MUST” mean’s it’s enforced, your VM is either going to be BLOCKED from being on the same HOST this is displayed in Figure 73 below. Notice if you attempt to click “Next” you be presented with a Warning dialog shown in Figure 74 preventing you from moving forward. “SHOULD NOT” means it will just display a warning which can be seen in Figure 75below. The difference here is you CAN continue when a warning is displayed.

Figure 72 –
Assigning Custom Placement rules

Figure 73 –
Assigning Custom Placement rules

Figure 74 –
Assigning Custom Placement rules

Figure 75 –
Assigning Custom Placement rules

4. Once you select your custom placement “Requirement” click “OK” this will take you to the custom placement dialog, and display your newly defined custom placement rule. To keep with our PVS Scenario, I’m going to select “Virtual Machine Must NOT match Host” As you can see in Figure 76 our custom rule “Citrix-PVS” is now applied, notice “Blocks Deployment” has a CHECK, the reasoning for this is because we selected “MUST NOT” in our Requirement. Click “OK” to apply the rule.

Figure 75 –
Assigning Custom Placement rules

I would like to make a quick note here about the “Custom Placement Rules” Window. You will notice once the rule is applied, there is no way to edit it, you are forced to remove and re-add. Also you should notice, there isn’t an option for details. The reason I am bringing this up is due to the “Property” name, this is why it’s important to name your property with a good naming convention. If you recall in the “Creating Custom Properties” section Step 1, I mentioned I didn’t like the default Custom 1-10 properties. Here is why! Imagine a window full of Custom 1-10 properties , but no ability to see a description of what it applies to!

I chose to do “Citrix-PVS” so you can easily remember this rule Applies to “Citrix” and it’s the PVS role, you can choose to name these custom properties how ever you wish. I feel it’s important to have a solid naming convention though. I thought about doing “Citrix-Control” ( Control Layer, for you reference architecture readers!) which I would than apply to any of the VM’s (WI, DDC, PVS, XACTRL, etc) which I don’t want on the same host, my only concern with this, is if you wanted to get more granular, as well as remember which VM’s are apart of that custom property. So I chose to separate. Curious of your thoughts here, If you have any suggestions for custom property naming convention I would love to hear it!

5. Now that our custom rule’s are supplied it’s simple to test. Just perform a Live-Migration of one of the PVS VM’s, You’ll notice depending on the rule you defined either a Warning message (Should NOT) or a BLOCK or Red X (MUST NOT). These dialogs were actually shown above in Figure 73-75. That’s it! You now completely creating custom placement rules.

Wrap up

I hope everyone enjoyed this article. It’s my first major article in over a year, and I’m looking forward to getting more out there and excited to be posting as part of the ITVCE Community. Hopefully this post wasn’t to long and breaking it up into part’s helped. I hope everyone found the information included useful. This article wasn’t meant to be a deep dive into SCVMM + App Controller but more of an introduction to both product’s to show the management benefit’s and fill those gaps I mentioned in the beginning of the article. I plan to do some more post’s on SCVMM 2012, I really like the App Controller functionality. Since I started this article there have been some product updates, XenServer 6.1 has been released, along with the new SCVMM 2012 integration pack for it. In additional to these updates SCVMM 2012 SP1, and App Controller 2012 SP1 are coming very shortly. Expect an updated article in the near future, and future post’s on added functionality inside of SCVMM 2012 SP1 in both the core VMM product, and App Controller.

I’ve decided to add a part 7 ( SCVMM & App Controller 2012 SP1 + XenServer 6.1 updates) to this article which will contain the updates mentioned above. Expect Part 7 in the next few weeks. As always, feel free to comment and make suggestions. I look forward to your feedback!

Below I’ve included some good resources that ran across as I was putting this blog together:

Share Button
  1. JoseJose10-10-2013

    Excellent posts on XS w/SCVMM! Any chance part 7 will be available soon?

Leave a Reply