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
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|<ServiceConfiguration name="CloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2014-06.2.4">|
|<Role name="CloudService.Web" vmName="WebInst">|
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!
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.