Using SCVMM Custom Properties

Learn about using System Center Virtual Machine Manager 2012 custom properties.

John Savill

February 7, 2013

3 Min Read
Using SCVMM Custom Properties

Q. What are System Center Virtual Machine Manager 2012 custom properties?

A: System Center 2012 Virtual Machine Manager (SCVMM) contains 10 custom properties named Custom1 through Custom10. You can also create additional custom properties for the various types of SCVMM objects such as a virtual machine (VM), a virtual machine template, hosts, hostgroups, clouds, and more.

You might create a custom property to store information, such as a cost center, its primary application function, desired physical location, or a contact email address--anything you can think of. These properties can then be used for administrators and business users to more easily understand information about assets in SCVMM and for reporting.

However, the real power is realized when your custom properties are combined with custom placement rules that can utilize the custom properties to help control where VMs are placed.

For example, if you haven't fully embraced a private cloud where any VM can run on any host but instead each business unit group has their own set of hosts, you could create a Cost Center property for VMs and hosts, then create a custom placement rule that says the Cost Center of the VM must match that of the host for placement.

These rules are used both for initial placement and also as part of Dynamic Optimization, where VMs are rebalanced among all hosts. It's important to note when you create your custom placement rules that you have options if the rule "should" or "must" match or not match. "Should" means the placement will try and match but doesn't have to and if placement violates the rule then a warning is generated. If "Must" is used, then placement isn't possible if the rule is violated.

To create a custom propert, perform the following:

  1. Start Virtual Machine Manager console.

  2. Navigate to the VMs and Services workspace and select the VM you want to set a custom property for and open its properties.

  3. Select the Custom Properties area, and click the Manage Custom Properties button.

  4. In the Manage Custom Properties dialog, click the Create... button.

  5. Enter a name and description for the custom property and click OK.

  6. The new custom property will be available in the list of available properties. Select it and click the Add button so it becomes an assigned property, then click OK. Note the View Script button is available to show Windows PowerShell script to perform the action you just performed in the GUI. That is,

    New-SCCustomProperty -Name "Cost Center" -Description "Cost Center of the object" -AddMember @("VM")
  7. You can now set a value for the custom property, and again the View Script button will show you the PowerShell script to perform the action; for example:

    $VM = Get-SCVirtualMachine -VMMServer savdalvmm12.savilltech.net -Name "Win8Template (VDI)" -ID "495de667-3180-4f45-93e2-86d52cd82724" | where {$_.VMHost.Name -eq "savdalhv01.savilltech.net"}$customProperty = Get-SCCustomProperty -ID "54923412-8b75-456c-b0f3-7a2a90391c53"Set-SCCustomPropertyValue -CustomProperty $customProperty -InputObject $VM -Value "Desktop Team"


     

  8. Now select the properties of a host group, and select the Custom Properties area and click Manage Custom Properties. The custom property you already created is available. Add it to assigned properties and enter a value.

  9. On the same host group properties dialog are the Placement Rules, which allow any of the custom properties to be selected, and the display of the rule selection on how the custom property must/should relate to the host.

  10. Click OK to all dialogs.

That's it! You are now using custom properties.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like