How to migrate Azure Arc-enabled servers across regions

There are scenarios in which you'll want to move your existing Azure Arc-enabled server from one region to another. For example, you might want to move regions to improve manageability, for governance reasons, or because you realized the machine was originally registered in the wrong region.

To migrate an Azure Arc-enabled server from one Azure region to another, you have to uninstall the VM extensions, delete the resource in Azure, and re-create it in the other region. Before you perform these steps, you should audit the machine to verify which VM extensions are installed.

Note

While installed extensions continue to run and perform their normal operation after this procedure is complete, you won't be able to manage them. If you attempt to redeploy the extensions on the machine, you may experience unpredictable behavior.

Move machine to other region

Note

Performing this operation will result in downtime during the migration.

  1. Remove any VM extensions that are installed on the machine. You can do this by using the Azure portal, Azure CLI, or Azure PowerShell.

  2. Use the azcmagent tool with the Disconnect parameter to disconnect the machine from Azure Arc and delete the machine resource from Azure. You can run this manually while logged on interactively, with a Microsoft identity platform access token, or with the service principal you used for onboarding (or with a new service principal that you create).

    Disconnecting the machine from Azure Arc-enabled servers does not remove the Connected Machine agent, and you don't need to remove the agent as part of this process.

  3. Run the azcmagent tool with the Connect parameter to re-register the Connected Machine agent with Azure Arc-enabled servers in the other region.

  4. Redeploy the VM extensions that were originally deployed to the machine from Azure Arc-enabled servers.

    If you deployed the Azure Monitor for VMs (insights) agent or the Log Analytics agent using an Azure Policy definition, the agents are redeployed after the next evaluation cycle.

Next steps