|
1 | 1 | ---
|
2 |
| -title: How to move a DevTest Labs schedule to another region |
3 |
| -description: Shows you how to move a DevTest Labs schedule to another region. |
| 2 | +title: How to move a Microsoft.DevtestLab/schedules to another region |
| 3 | +description: This article explains how to move a Microsoft.DevtestLab/schedules to another Azure region. |
4 | 4 | ms.topic: how-to
|
5 | 5 | ms.author: rosemalcolm
|
6 | 6 | author: RoseHJM
|
7 | 7 | ms.date: 05/09/2022
|
8 | 8 | ---
|
9 |
| -# Move a lab schedule to another region |
| 9 | +# Move Microsoft.DevtestLab/schedules to another region |
| 10 | + |
| 11 | +Microsoft.DevtestLab/schedules apply only to Compute Virtual Machines (VMs). They are often referred to as top level schedules, or simply schedules. In this article, you'll learn how to move schedules. |
| 12 | + |
| 13 | +Microsoft.DevTestLab/labs/schedules apply only to DevTest Labs (DTL) VMs. They are often referred to as Lab schedules. This type of schedule is not covered in this article. |
| 14 | + |
| 15 | +To move schedules, use an Azure Resource Manager (ARM) template to create a copy of the existing schedules in another region. |
10 | 16 |
|
11 | 17 | In this article, you'll learn how to:
|
12 | 18 | > [!div class="checklist"]
|
13 | 19 | > >
|
14 |
| -> - Export an Azure Resource Manager (ARM) template of your lab. |
| 20 | +> - Export an ARM template that contains your Microsoft.DevtestLab/schedules. |
15 | 21 | > - Modify the template by adding or updating the target region and other parameters.
|
16 |
| -> - Deploy the template to create the new lab in the target region. |
17 |
| -> - Configure the new lab. |
18 |
| -> - Move data to the new lab. |
19 | 22 | > - Delete the resources in the source region.
|
20 | 23 |
|
21 | 24 | ## Prerequisites
|
22 | 25 |
|
23 | 26 | - Ensure that the services and features that your account uses are supported in the target region.
|
24 | 27 | - For preview features, ensure that your subscription is allowlisted for the target region.
|
25 |
| -- DevTest Labs doesn't include secrets and passwords in the exported ARM template. You'll need the following: |
26 |
| - - the VMs |
27 |
| - - the Stored Secrets |
28 |
| - - PAT tokens of the private Artifact Repos to move the private repos together with the lab. |
29 |
| - |
30 |
| -## Prepare to move |
31 |
| - |
32 |
| -To get started, you'll export and modify a Resource Manager template that contains the schedule settings. |
33 |
| - |
34 |
| -### Prepare your Virtual Network |
35 |
| - |
36 |
| -1. Sign in to the [Azure portal](https://portal.azure.com). |
| 28 | +- Ensure a Compute VM exists in the target region. |
37 | 29 |
|
38 |
| -1. If you don't have a [Resource Group](../azure/azure-resource-manager/management/manage-resource-groups-portal.md#create-resource-groups) under the target region, create one now. |
39 |
| - |
40 |
| -1. Move your current DevTest Lab to the new region and resource group by using the steps included in the article, [Move a DevTest Labs to another region](./how-to-move-labs.md). |
41 |
| - |
42 |
| -1. Optionally, move your current virtual network to the new region and resource group by using the steps included in the article, [Move an Azure virtual network to another region](../virtual-network/move-across-regions-vnet-portal.md). |
43 |
| - |
44 |
| - Alternately, you can create a new virtual network, if you don't have to keep the original one. |
45 |
| - |
46 |
| -1. Move your virtual machines to the new region by using the steps included in the article, [Tutorial: Move Azure VMs across regions](../resource-mover/tutorial-move-region-virtual-machines.md). |
47 |
| - |
48 |
| - |
49 |
| -## Move the schedule |
50 |
| -There are two ways to move a lab schedule: |
| 30 | +## Move an existing schedule |
| 31 | +There are two ways to move a schedule: |
51 | 32 |
|
52 | 33 | - Manually recreate the schedules on the moved VMs. This process can be time consuming and error prone. This approach is most useful when you have a few schedules and VMs.
|
53 | 34 | - Export and redeploy the schedules by using ARM templates.
|
54 | 35 |
|
55 |
| -Alternately, you can move your existing schedules by using the following steps: |
| 36 | +Move your existing schedule by using the following steps: |
56 | 37 |
|
57 | 38 | 1. Sign in to the [Azure portal](https://portal.azure.com).
|
58 | 39 |
|
59 | 40 | 2. Go to the source resource group that held your VMs.
|
60 | 41 |
|
61 |
| -3. On the **Resource Group Overview** page, under **Resources**, and then:<br> |
62 |
| - (1) Select **Show hidden types**<br> |
63 |
| - (2) Select all resources with the type **Microsoft.DevTestLab/Schedules**<br> |
64 |
| - (3) Select **Export template**<br> |
| 42 | +3. On the **Resource Group Overview** page, under **Resources**, select **Show hidden types**. |
| 43 | + |
| 44 | +4. Select all resources with the type **Microsoft.DevTestLab/Schedules**. |
| 45 | + |
| 46 | +5. Select **Export template**. |
65 | 47 |
|
66 | 48 | :::image type="content" source="./media/how-to-move-schedule-to-new-region/move-compute-schedule.png" alt-text="Screenshot that shows the hidden resources in a resource group, with schedules selected.":::
|
67 | 49 |
|
68 |
| -5. On the **Export resource group template** page, select **Deploy**. |
| 50 | +6. On the **Export resource group template** page, select **Deploy**. |
69 | 51 |
|
70 |
| -6. On the **Custom deployment** page, select **Edit template**. |
| 52 | +7. On the **Custom deployment** page, select **Edit template**. |
71 | 53 |
|
72 |
| -7. In the template code, change all instances of '"location": "<*old location*>"' to '"location": "<*new location*>"' and then select **Save**. |
| 54 | +8. In the template code, change all instances of `"location": "<old location>"` to `"location": "<new location>"` and then select **Save**. |
73 | 55 |
|
74 |
| -8. On the **Custom deployment** page, enter values that match the target VM: |
| 56 | +9. On the **Custom deployment** page, enter values that match the target VM: |
75 | 57 |
|
76 | 58 | |Name|Value|
|
77 | 59 | |----|----|
|
78 | 60 | |**Subscription**|Select an Azure subscription.|
|
79 | 61 | |**Resource group**|Select the resource group name. |
|
80 | 62 | |**Region**|Select a location for the lab schedule. For example, **Central US**. |
|
81 |
| - |**Schedule Name**|Must be a different name. | |
82 |
| - |**VirtualMachine_xxx_externalId**|Must be the moved one, or the new one you just created. | |
| 63 | + |**Schedule Name**|Must be a globally unique name. | |
| 64 | + |**VirtualMachine_xxx_externalId**|Must be the target VM. | |
83 | 65 |
|
84 | 66 | :::image type="content" source="./media/how-to-move-schedule-to-new-region/move-schedule-custom-deployment.png" alt-text="Screenshot that shows the custom deployment page, with new location values for the relevant settings.":::
|
85 | 67 |
|
86 | 68 | >[!IMPORTANT]
|
87 |
| ->Each schedule must have a globally unique name, so remember to change the schedule name for the new location. |
| 69 | +>Each schedule must have a globally unique name; you will need to change the schedule name for the new location. |
88 | 70 |
|
89 |
| -9. Select **Review and create** to create the deployment. |
| 71 | +10. Select **Review and create** to create the deployment. |
90 | 72 |
|
91 |
| -10. When the deployment is complete, verify that the new schedule is configured correctly on the new VM. |
| 73 | +11. When the deployment is complete, verify that the new schedule is configured correctly on the new VM. |
92 | 74 |
|
93 | 75 | ## Discard or clean up
|
94 | 76 |
|
95 |
| -Now you can choose to clean up the original schedules if they're longer used. Go to the original schedule resource group (where you exported templates from in step 3 above), and delete the schedule resource. |
| 77 | +Now you can choose to clean up the original schedules if they're longer used. Go to the original schedule resource group (where you exported templates from in step 5 above), and delete the schedule resource. |
96 | 78 |
|
97 | 79 | ## Next steps
|
98 | 80 |
|
99 |
| -In this article, you moved a DevTest Labs schedule from one region to another and cleaned up the source resources. To learn more about moving resources between regions and disaster recovery in Azure, refer to: |
| 81 | +In this article, you moved a schedule from one region to another and cleaned up the source resources. To learn more about moving resources between regions and disaster recovery in Azure, refer to: |
100 | 82 |
|
101 |
| -- [Move a DevTest Labs to another region](./how-to-move-labs). |
| 83 | +- [Move a DevTest Labs to another region](./how-to-move-labs.md). |
102 | 84 | - [Move resources to a new resource group or subscription](../azure-resource-manager/management/move-resource-group-and-subscription.md).
|
103 | 85 | - [Move Azure VMs to another region](../site-recovery/azure-to-azure-tutorial-migrate.md).
|
0 commit comments