Assigning a custom name to Cloud Services instances

The default instance name

Those of you who look at SQL database connection logs, or at tools like New Relic to monitor your Cloud Service applications, may have noticed that the list of servers running the application have names like “RD000D3A107CFC” (this is the host name in the network).

This name isn’t very useful when trying to identify which of the instances we see in the Azure Management Portal is the one that corresponds to that name. All instances in the portal are named as the role name followed by a number (e.g.: CloudService.Web_IN_1).

How can we check that name?

There are two options:

  • Access the instance with Remote Desktop and take a look at the system properties.
  • By code, calling Dns.GetHostName().

Setting a more descriptive name

Fortunately, we have an alternative, the only thing we need to do is set a vmName for our Role in the Service configuration file:

After this, our instances will be WebInst0, WebInst1, and so on.

To know all the options available for the configuration of the Role, you can visit: https://msdn.microsoft.com/en-us/library/azure/jj156212.aspx

Hope it helps!

@gjbellmann

Advertisements

One thought on “Assigning a custom name to Cloud Services instances

  1. tbsbet

    This name isn’t very useful when trying to identify which of the instances we see in the Azure Management Portal is the one that corresponds to that name. All instances in the portal are named as the role name followed by a number.

    Like

    Reply

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s