How To Set and Select Multiple Hostname Templates


This article will show you how to set and then select from multiple hostname templates for provisioning VMs.


On the order page you could choose from the following options and the hostname would be set with the hostname example below:

Hostname Only


Hostname Sequential


Hostname and Server Environment


Hostname and Server Environment Sequential



You will need to create a new Parameter for your custom hostname options


1. Create New Custom Hostname Template Parameter

After your new Parameter has been created, add this to the environment(s) that this will be used on.

2. Add Any Controlling Parameters

If you have any parameters that you will be used in your Hostname, add that as a Controlling Parameter to your Custom Hostname Template parameter.

Select your Parameter with the dependency type of Regenerate Options


There is a custom parameter on an Environment called serverenv that has the options of PROD, QA, and DEV.

3. Add an Action To Regenerate Options

The below code will generate options provided in the example in the Overview of this article:

def get_options_list(field, control_value=None, **kwargs):
    serverenv = control_value
    options = [
        ("", "Hostname Only"),
        ("-00X", "Hostname Sequential"),
        ("-" + str(serverenv), "Hostname and Server Env"),
        ("-" + str(serverenv) + "-00X", "Hostname and Server Env Sequential"),        
    return {
        'options': options,

4. Update the Hostname Template on the Server Tier item on the Build tab of your Blueprint

Select the pencil on your Server Tier build item and update the Hostname Template field.


If you are using the requestor’s username as the base of the Hostname your Hostname Template field would be:


5. You Now Have Multiple Hostname Template Options to Choose on Your Order Form

The dropdown for your custom_hostname_template will now have your available options and will update the Hostname Preview.

Have more questions? Submit a request


Please sign in to leave a comment.