Hostname Challenges

The need for intuitive, information-rich, and consistent hostname standards is particularly important as enterprise IT adopts hybrid cloud provisioning workflows. But during the virtual machine (VM) provisioning process, many IT admins are still manually constructing the hostname for new VMs. They’ll follow the naming convention of whatever environment they are currently managing, but the process can be time-consuming, error-prone, and require training.

Typically, IT admins have to keep track of and manage the hostname conventions for the entire enterprise. As some teams start to provision resources themselves, they might not follow the same conventions and do them using an ad hoc method. One set of standards could be maintained for servers in one region—possibly from a spreadsheet or memorized—and then another standard could be maintained somewhere else like a console for a public cloud provider.

This can start to get more complex and problematic as enterprises expand their digital business with more options for self-service IT. Worse yet, What if someone accidentally deletes a running production server instance based on a poorly managed naming convention? Revenue is lost because customers needed to access whatever was running in that environment. Maybe that’s a bit dramatic, yet it could happen and can be easily avoided.

Consider if IT admins instead had the ability to define hostname templates, and rely on automation to automatically construct the hostname based on the environment, group, OS, and other user inputs and deterministic variables. Even better, what if they could manage all of this from one place?

Example Naming Convention

As no one doubts the importance of having the right naming convention in place for hostnames, It can make all the difference, especially when considering an enterprise-wide hybrid cloud initiative.

For hostnames in a hybrid cloud provisioning process, the names are used for IT management, maintenance, and troubleshooting workflows for the full lifecycle management of resources. The goal is that the hostnames can help anyone quickly identify key aspects of a provisioned resource without having to hunt for information that has not been well documented or followed.  

Let’s look at an example hostname for a virtual machine (VM) in a typical hybrid enterprise:

This hostname, PEATLWEBL001 translates to a VM that has been provisioned in a Production environment based on an Eastern region in Atlanta. The functional role of the VM is a Web Server. It’s running on a Linux platform and has the unique number as 001 that would increment with additional VMs added based on this naming convention.

Looking at another example in this naming convention, DWSFOSQLW003 would be a Development server running in the Western region in San Francisco. Its functionality is a SQL server on Windows platform with a unique identifier as 003 in a set of SQL servers supporting application development.

The categories for this hostname could be summarized as:

  • Environment—Production, Development, Test, QA, Model, Staging
  • Region—East, West, North, South
  • City—Dependent on the Region: Atlanta, San Francisco, New York, Miami, etc.
  • Function—Web, App, SQL, Load Balancer, etc.
  • Platform—Window, Linux
  • 00X—Unique Identifier

Auto-Generating Hostnames

Once you have a naming convention defined, you can build an expression to dynamically populate the hostname for a VM as it’s being provisioned without any manual intervention.

A simple expression could be defined by the region and a unique identifier:


For a more complex expression for the naming convention example in the previous section, it would be something like this:

{{environment|upper|first}}{{group.region|upper|first}}{{ environment.city_name|upper|first }}{{ server_type }}{{ os_family.get_base_name|upper|first}}00X

Of course, that means you should have a parameter like “hostname_template” in your provisioning solution like we do here at CloudBolt. Without writing any code, just some included {{ parameters }}, you can do just about any kind of dynamic hostname definition.

Check out this video of using hostname templates in CloudBolt:

For more information about this feature, see Hostname Specification in the Product Documentation.

Check out our Solutions Overview to learn more about how CloudBolt can help amplify the value of your hostnames.

Recommended Reading