Share via

Azure Arc Hostname

Handian Sudianto 7,026 Reputation points
2026-05-02T13:35:36.13+00:00

When i rename Azure Arc Machine then why after the machine renamed then in azure portal the name still use old name?

Azure Arc
Azure Arc

A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.

0 comments No comments

Answer accepted by question author

  1. Siva shunmugam Nadessin 9,625 Reputation points Microsoft External Staff Moderator
    2026-05-04T00:57:31.66+00:00

    Hello Handian Sudianto

    Thank you for reaching out to the Microsoft Q&A forum. 

    When investigated we see that Azure Arc doesn’t automatically pick up an OS-level hostname change—you’re seeing the “old” name because that’s the resource name you originally gave when you connected the machine. Here’s why and what you can do:

    1. Azure Arc resource names are fixed at onboarding
      • When you run something like az connectedmachine connect --resource-group MyRG --location eastus --resource-name MyArcServer the string MyArcServer becomes the ARM resource name. Renaming the computer in Windows or Linux later doesn’t mutate that Azure resource name.
    2. If you want the portal to show the new name, you have two main options: a. Re-onboard with the new name
      • Disconnect the agent: az connectedmachine disconnect --resource-group MyRG --name OldName
      • Reconnect using your new hostname: az connectedmachine connect --resource-group MyRG --location eastus --resource-name NewHostName b. Or delete the Arc resource and onboard again with your desired name
      • In the portal or via CLI remove the connected machine resource, then run az connectedmachine connect with --resource-name set to the new name.
    3. Going forward, you can pre-empt hostname conflicts or renaming needs by using the --resource-name parameter independently of the OS hostname (for example, append a unique ID). That way you’ll always have control over what shows in the portal.

    Let me know if any further queries - feel free to reach out!

    Reference:

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-05-02T13:35:43.55+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Azure Arc uses an Azure resource name that is immutable and separate from the operating system hostname.

    When the hostname of the underlying Windows or Linux machine is changed, Azure Arc does not automatically update the existing Arc server resource name in Azure. As with other Azure resources, the Arc-enabled server resource name cannot be renamed in place.

    To have the new hostname reflected in Azure for an Arc-enabled server, the documented approach is:

    1. Remove any VM extensions from the Arc-enabled server resource (so they can be redeployed later).
    2. Disconnect the machine from Azure Arc using azcmagent disconnect, which deletes the Arc server resource in Azure.
    3. Reconnect the machine using azcmagent connect. During reconnect, the agent registers a new Arc-enabled server resource, and by default uses the machine’s current hostname as the resource name (or a custom name via --resource-name).
    4. Redeploy any required VM extensions to the new Arc resource.

    Until this delete-and-recreate process is done, the Azure portal continues to show the old Arc resource name even though the OS hostname has changed.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.