Skip to content

Commit 3a2c376

Browse files
authored
Merge pull request #198127 from RoseHJM/als-add-move-schedule-article
DTL - add move schedule article
2 parents 50fb0a2 + 812e4a5 commit 3a2c376

File tree

5 files changed

+90
-0
lines changed

5 files changed

+90
-0
lines changed

articles/devtest-labs/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@
259259
href: create-alerts.md
260260
- name: Move to new region
261261
href: how-to-move-labs.md
262+
- name: Move schedules to another region
263+
href: how-to-move-schedule-to-new-region.md
262264
- name: Reference
263265
items:
264266
- name: CLI

articles/devtest-labs/how-to-move-labs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,4 @@ In this article, you moved a DevTest lab from one region to another and cleaned
265265

266266
- [Move resources to a new resource group or subscription](../azure-resource-manager/management/move-resource-group-and-subscription.md)
267267
- [Move Azure VMs to another region](../site-recovery/azure-to-azure-tutorial-migrate.md)
268+
- [Move Microsoft.DevtestLab/schedules to another region](./how-to-move-schedule-to-new-region.md)
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: How to move a schedule to another region
3+
description: This article explains how to move schedules to another Azure region.
4+
ms.topic: how-to
5+
ms.author: rosemalcolm
6+
author: RoseHJM
7+
ms.date: 05/09/2022
8+
---
9+
# Move schedules to another region
10+
11+
In this article, you'll learn how to move schedules by using an Azure Resource Manager (ARM) template.
12+
13+
DevTest Labs supports two types of schedules.
14+
15+
- Schedules apply only to compute virtual machines (VMs): schedules are stored as microsoft.devtestlab/schedules resources, and often referred to as top level schedules, or simply schedules.
16+
17+
- Lab schedules apply only to DevTest Labs (DTL) VMs: lab schedules. They are stored as microsoft.devtestlab/labs/schedules resources. This type of schedule is not covered in this article.
18+
19+
In this article, you'll learn how to:
20+
> [!div class="checklist"]
21+
> >
22+
> - Export an ARM template that contains your schedules.
23+
> - Modify the template by adding or updating the target region and other parameters.
24+
> - Delete the resources in the source region.
25+
26+
## Prerequisites
27+
28+
- Ensure that the services and features that your account uses are supported in the target region.
29+
- For preview features, ensure that your subscription is allowlisted for the target region.
30+
- Ensure a Compute VM exists in the target region.
31+
32+
## Move an existing schedule
33+
There are two ways to move a schedule:
34+
35+
- 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.
36+
- Export and redeploy the schedules by using ARM templates.
37+
38+
Use the following steps to export and redeploy your schedule in another Azure region by using an ARM template:
39+
40+
1. Sign in to the [Azure portal](https://portal.azure.com).
41+
42+
2. Go to the source resource group that held your VMs.
43+
44+
3. On the **Resource Group Overview** page, under **Resources**, select **Show hidden types**.
45+
46+
4. Select all resources with the type **microsoft.devtestlab/schedules**.
47+
48+
5. Select **Export template**.
49+
50+
:::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.":::
51+
52+
6. On the **Export resource group template** page, select **Deploy**.
53+
54+
7. On the **Custom deployment** page, select **Edit template**.
55+
56+
8. In the template code, change all instances of `"location": "<old location>"` to `"location": "<new location>"` and then select **Save**.
57+
58+
9. On the **Custom deployment** page, enter values that match the target VM:
59+
60+
|Name|Value|
61+
|----|----|
62+
|**Subscription**|Select an Azure subscription.|
63+
|**Resource group**|Select the resource group name. |
64+
|**Region**|Select a location for the lab schedule. For example, **Central US**. |
65+
|**Schedule Name**|Must be a globally unique name. |
66+
|**VirtualMachine_xxx_externalId**|Must be the target VM. |
67+
68+
:::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.":::
69+
70+
>[!IMPORTANT]
71+
>Each schedule must have a globally unique name; you will need to change the schedule name for the new location.
72+
73+
10. Select **Review and create** to create the deployment.
74+
75+
11. When the deployment is complete, verify that the new schedule is configured correctly on the new VM.
76+
77+
## Discard or clean up
78+
79+
Now you can choose to clean up the original schedules if they're no longer used. Go to the original schedule resource group (where you exported templates from in step 5 above) and delete the schedule resource.
80+
81+
## Next steps
82+
83+
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:
84+
85+
- [Move a DevTest Labs to another region](./how-to-move-labs.md).
86+
- [Move resources to a new resource group or subscription](../azure-resource-manager/management/move-resource-group-and-subscription.md).
87+
- [Move Azure VMs to another region](../site-recovery/azure-to-azure-tutorial-migrate.md).
166 KB
Loading
57.3 KB
Loading

0 commit comments

Comments
 (0)