Naming Convention for Virtual Machines

What is a good naming convention or scheme for a virtual machines?

We are building a cluster of virtualization hardware servers in our headquarters and a similar cluster in each of our state offices (one cluster per state).

We need to name the virtualization hardware servers, which is the easy part, but we also need to come up with a naming convention for the virtual machines (VMs) that will run on the virtualization hardware.

The naming convention needs to be descriptive enough for administrators and developers to easily identify what the VM is for, but short enough to not generate repetitive strain injury at the keyboard.

To make things more interesting, our existing hardware naming conventions are different between functional areas of the enterprise. Internally consistent, but different. There are different cultures, such as AIX, HP-UX, Linux, Windows.

My initial thoughts are to construct a DNS or Active Directory listing with TWO names per machine: One name which is unique across the enterprise, and is fairly descriptive; and the other name which is local to a functional area. Basically, an enterprise VM name space and a functional area VM name space. The enterprise VM names can be long, because it will be mainly machines using them for across-enterprise mapping of functional area VM names. The functional area names need to be short and concise so that developers can manage them easily in their head.


For internal hostnames, I like assigning a subdomain for virtual machines, say "vm.example.com". You can further delineate that with virtualization type (vmware., xen., kvm., etc).

Then, each host has the descriptive name per your internal standards. I've worked in two environments that had sensible hostname standards:

  • purpose number environment, ie web1prod, db3test, etc.
  • purpose subnet sequence(a-z vs #), where subnet is a 1 (public facing), 2 (dmz/internal) or 3 (management network), ie web1a, build2a, mon3a.

The former is my primary preference, so for say, a web server virtual machine for your dev environment:

  • web1dev.vm.example.com

For a database server in your Xen test environment (if you go with multiple virtualization types).

  • db1.xen.example.com

I'll share what we do with our network gear. The same principle applies:

DNS entries:
switchoffice-3550-12G     IN A X.X.X.X
so355012                  IN CNAME switchoffice-3550-12G

The basic idea is a short name for typing and a long name for descriptive purposes. This goes along with your idea of different names for the hosts, but using CNAMEs has the added advantage that a dig or nslookup will reference the long name.