Rename Azure Resource

Handian Sudianto 4,431 Reputation points
2024-06-20T13:35:39.71+00:00

Hello, How we can rename existing azure resources such as renaming azure vm?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,541 questions
0 comments No comments
{count} votes

Accepted answer
  1. kobulloc-MSFT 26,131 Reputation points Microsoft Employee
    2024-06-20T18:46:00.26+00:00

    Hello, @Handian Sudianto ! I want to add a bit of clarity to the other answers here.

    Can I rename an Azure resource?

    No, you cannot rename an Azure resource. This still remains as some of the most popular feedback on Azure Feedback however it is very difficult to change due to the way that Azure works.

    There is a workaround for renaming resource groups that involves moving an existing resource group into a new resource group but for the resources themselves, you would need to recreate them in order to change the name.


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Deepanshukatara-6769 7,830 Reputation points
    2024-06-20T14:14:27.1233333+00:00

    Hi @hanidan , Welcome to MS Q&A

    To rename an existing Azure virtual machine, you can modify the hostname of the VM. This can be done by renaming the computer from a remote desktop session or by using the Run command in the Azure portal.

    For Windows, you can change the hostname from PowerShell by using the Rename-Computer command. For Linux, you can change the hostname by using hostnamectl. After you run either Rename-Computer or hostnamectl on your VM, you need to restart your VM for the hostname to change.

    For more and step wise details, you can refer to the Azure documentation on Viewing and Modifying Hostnames.

    Kindly accept answer , if it helps

    Please let me know if further questions

    Thanks

    Deepanshu


  2. Deepanshukatara-6769 7,830 Reputation points
    2024-06-20T14:36:19.66+00:00

    Hi ,

    There's no way to rename an Application Gateway resource. You must create a new resource with a different name.

    You cannot rename existing resources. If you're trying to standardize existing resources, it becomes impossible to adopt a universal naming convention. All you can do is move an existing resource group to a new resource group OR create a new resource with the same name and settings.

    You can rename the subscription but certainly, it will not have an impact

    If it helps, kindly accept

    Thanks

    Deepanshu

    0 comments No comments