A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
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:
- 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.
- 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.
- 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:
- Troubleshoot Azure Arc on VMware configuration issues https://docs.microsoft.com/azure/aks/aksarc/aks-vmware-troubleshooting-guide#identify-and-resolve-duplicate-hostname-errors