How to change the virtual machine name in Azure

By: Jason  

If you accidentally created a long name for my VM in azure and not sure how to change the name to make it shorter while connecting from ssh then you need to know how Azure handles the VM name at the time of VM creation.

Virtual machines in Azure have two distinct names: virtual machine name used as the Azure resource identifier, and in guest host name. When you create a VM in the portal, the same name is used for both the virtual machine name and the host name. The virtual machine name cannot be changed after the VM is created. You can change the host name when you log into the virtual machine.

So what you can do is just ssh to your machine and change its hostname to a much shorter name as per your liking.

Most Viewed Articles (in Azure )

Latest Articles (in Azure)

Comment on this tutorial