Wednesday, October 26, 2016

Missing ComputerName Field in Azure (ARM)

Have you noticed that some of your VMs in Azure ARM is missing a ComputerName field? All you get is a dash "-", like:

It turns out that you probably uploaded a non-generalized VHD (aka - it was not sysprepped). In Microsoft terms, this is also known as "specialized" VHD.

According to Microsoft, this is because the "OSProfile" field is missing, which is by design because this is a specialized image. One can only specify the OSProfile field when creating VMs using a generalized image.

Resolution: This is unfortunately a known issue and there is no way around it.

With a VM created from a specialized image the OSProfile field is set using the command "Set-AzureRMVMOperatingSystem". For example, to set it Windows, the following command is run:

Set-AzureRmVMOperatingSystem -VM $vmConfig -Windows

For more information about specialized image and generalized images in Azure: