|
| 1 | +--- |
| 2 | +title: Relocate Azure Virtual Machine Scale Sets to another region |
| 3 | +description: Learn how to relocate Azure Virtual Machine Scale Sets to another region |
| 4 | +author: anaharris-ms |
| 5 | +ms.author: anaharris |
| 6 | +ms.reviewer: anaharris |
| 7 | +ms.date: 08/20/2024 |
| 8 | +ms.service: azure-virtual-machine-scale-sets |
| 9 | +ms.topic: how-to |
| 10 | +ms.custom: |
| 11 | + - subject-relocation |
| 12 | +# Customer intent: As an administrator, I want to move Azure Virtual Machine Scale Sets to another region. |
| 13 | +--- |
| 14 | + |
| 15 | + |
| 16 | +# Relocate Azure Virtual Machine Scale Sets to another region |
| 17 | + |
| 18 | +This article covers the recommended approach, guidelines, and practices for relocating Virtual Machine Scale Sets to another region. |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +Before you begin, ensure that you have the following prerequisites: |
| 23 | + |
| 24 | +- If the source VM supports availability zones, then the target region must also support availability zones. To see which regions support availability zones, see [Azure regions with availability zone support](../reliability/availability-zones-service-support.md#azure-services-with-availability-zone-support). |
| 25 | + |
| 26 | +- The subscription in the destination region needs enough quota to create the resources. If you exceeded the quota, request an increase. For more information, see [Azure subscription and service limits, quotas, and constraints](..//azure-resource-manager/management/azure-subscription-service-limits.md). |
| 27 | + |
| 28 | +- Consolidate all the associated extensions from source Virtual Machine Scale Set, as some need to be reconfigured after relocation. |
| 29 | + |
| 30 | +- Confirm if the VM image is a part of VM image gallery. Gallery resources need to be replicated to the target region. |
| 31 | + |
| 32 | +- Capture the list of resources that are being configured, such as capturing diagnostic logs. This is important with respect to prioritization and sequencing. |
| 33 | + |
| 34 | +- Ensure that the following services are available and deployed in the target region: |
| 35 | + |
| 36 | + - [Log Analytics Workspace](./relocation-log-analytics.md) |
| 37 | + - Diagnostic Virtual Machine Scale Set |
| 38 | + - [Key Vault](./relocation-key-vault.md) |
| 39 | + - [Proximity Placement Group](/azure/virtual-machine-scale-sets/proximity-placement-groups) |
| 40 | + - Public IP address |
| 41 | + - [Load Balancer](../load-balancer/move-across-regions-external-load-balancer-portal.md) |
| 42 | + - [Virtual Network](./relocation-virtual-network.md) |
| 43 | + |
| 44 | +- Ensure that you have a Network Contributor role or higher in order to configure and deploy a Load Balancer template in another region. |
| 45 | + |
| 46 | +- Identify the networking layout of the solution in the source region, such as NSGs, Public IPs, VNet address spaces, and more. |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +## Prepare |
| 51 | + |
| 52 | +In this section, follow the instructions to prepare for relocating a Virtual Machine Scale Set to another region. |
| 53 | + |
| 54 | + |
| 55 | +1. Locate the image reference used by the source Virtual Machine Scale Set and replicate it to the Image Gallery in the target region. |
| 56 | + |
| 57 | + :::image type="content" source="media\relocation\virtual-machine-scale-sets\image-replication.png" alt-text="Screenshot showing how to locate image of virtual machine."::: |
| 58 | + |
| 59 | +1. Relocate the Load Balancer, along with the public IP by doing one of the following methods: |
| 60 | + |
| 61 | + - *Resource Mover*. Associate Load Balancer with public IP in the source region to the target region. For more information, see [Move resources across regions (from resource group) with Azure Resource Mover](../resource-mover/move-region-within-resource-group.md). |
| 62 | + - *Export Template*. Relocate the Load Balancer along with public IP to the target region using the export template option. For information on how to do this, see [Move an external load balancer to another region using the Azure portal](../load-balancer/move-across-regions-external-load-balancer-portal.md). |
| 63 | + |
| 64 | + >[!IMPORTANT] |
| 65 | + > Because public IPs are a regional resource, Azure Resource Mover re-creates Load Balancer at the target region with a new public IP address. |
| 66 | +
|
| 67 | +1. Manually set the source Virtual Machine Scale Set instance count to 0. |
| 68 | + |
| 69 | + :::image type="content" source="media\relocation\virtual-machine-scale-sets\set-instance-count.png" alt-text="Screenshot showing how to set Virtual Machine Scale Set instance count to 0."::: |
| 70 | + |
| 71 | +1. Export the source Virtual Machine Scale Set template from Azure portal: |
| 72 | + |
| 73 | + 1. In the [Azure portal](https://portal.azure.com), navigate to your source Virtual Machine Scale Set. |
| 74 | + 1. In the menu, under **Automation**, select **Export template** > **Download**. |
| 75 | + 1. Locate the .zip file that you downloaded from the portal, and unzip that file to a folder of your choice. This zip file contains the .json files that include the template and scripts to deploy the template. |
| 76 | + |
| 77 | + |
| 78 | +1. Edit the template: |
| 79 | + |
| 80 | + 1. Remove associated resources if they’re present in the template, such as Log Analytics Workspace in the **Monitoring** section. |
| 81 | + |
| 82 | + 1. Make any necessary changes to the template, such as updating all occurrences of the name and the location for the relocated source Virtual Machine Scale Set. |
| 83 | + |
| 84 | + 1. Update the parameter file with these inputs: |
| 85 | + - Source Virtual Machine Scale set `name`. |
| 86 | + - Image Gallery `Resource id`. |
| 87 | + - Virtual network `subnet Id`. Also, make the necessary ARM code changes to the subnet section so that it can call the Virtual Network `subnet Id`. |
| 88 | + - Load Balancers` resource id`, `Address id`, and `virtual network id`. Change the `value` property under `parameters`. |
| 89 | + |
| 90 | +## Relocate |
| 91 | + |
| 92 | +In this section, follow the steps below to relocate a Virtual Machine Scale Set across geographies. |
| 93 | + |
| 94 | +1. In the target region, recreate the Virtual Machine Scale Set with the exported template by using IAC (Infrastructure as Code) tools such as Azure Resource Manager templates, Azure CLI, or PowerShell. |
| 95 | + |
| 96 | +1. Associate the dependent resources to the target Virtual Machine Scale Set, such as Log Analytics Workspace in **Monitoring** section. Also, configure all the extensions that were consolidated in the [Prerequisites section](#prerequisites). |
| 97 | + |
| 98 | + |
| 99 | +## Validate |
| 100 | + |
| 101 | +When the relocation is complete, validate the Virtual Machine Scale Set in the target region by performing the following steps: |
| 102 | + |
| 103 | + - Virtual Machine Scale Set doesn't keep the same IP after relocation to new target location. However, make sure to validate the private IP configuration. |
| 104 | + |
| 105 | + - Run a scripted or manual smoke test and integration test to validate that all configurations and dependent resources have been properly linked and all configured data are accessible. |
| 106 | + |
| 107 | +- Validate Virtual Machine Scale Set components and integration. |
| 108 | + |
| 109 | +## Related content |
| 110 | + |
| 111 | +- To move registry resources to a new resource group either in the same subscription or a new subscription, see [Move Azure resources to a new resource group or subscription](../azure-resource-manager/management/move-resource-group-and-subscription.md). |
0 commit comments