Skip to content

Commit e34d88b

Browse files
Merge pull request #106451 from rayne-wiselman/raynemarch4
adding move region articles for maintenance control
2 parents d668dbc + 34c4077 commit e34d88b

File tree

4 files changed

+175
-0
lines changed

4 files changed

+175
-0
lines changed

articles/virtual-machines/linux/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,10 @@
726726
href: ../../site-recovery/azure-to-azure-tutorial-migrate.md?toc=/azure/virtual-machines/linux/toc.json&bc=/azure/virtual-machines/linux/breadcrumb/toc.json
727727
- name: Move to an availability zone
728728
href: ../../site-recovery/move-azure-vms-avset-azone.md?toc=/azure/virtual-machines/linux/toc.json&bc=/azure/virtual-machines/linux/breadcrumb/toc.json
729+
- name: Move Maintenance Control configurations to another region
730+
href: ../move-region-maintenance-configuration.md?toc=/azure/virtual-machines/linux/toc.json&bc=/azure/virtual-machines/linux/breadcrumb/toc.json
731+
- name: Move Maintenance Control configuration resources to another region
732+
href: ../move-region-maintenance-configuration-resources.md?toc=/azure/virtual-machines/linux/toc.json&bc=/azure/virtual-machines/linux/breadcrumb/toc.json
729733
- name: Migrate AWS and on-premises VMs
730734
href: ../windows/on-prem-to-azure.md?toc=/azure/virtual-machines/linux/toc.json&bc=/azure/virtual-machines/linux/breadcrumb/toc.json
731735
items:
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: Move resources associated with a maintenance configuration to another region
3+
description: Learn how to move resources associated with a VM maintenance configuration to another Azure region
4+
services: virtual-machines
5+
author: shants123
6+
7+
ms.service: virtual-machines
8+
ms.topic: article
9+
ms.tgt_pltfrm: vm
10+
ms.date: 03/04/2020
11+
ms.author: shants
12+
#Customer intent: As an admin responsible for maintenance, I want move resources associated with a Maintenance Control configuration to another Azure region.
13+
---
14+
15+
16+
# Move resources in a Maintenance Control configuration to another region
17+
18+
Follow this article to move resources associated with a Maintenance Control configuration to a different Azure region. You might want to move a configuration for a number of reasons. For example, to take advantage of a new region, to deploy features or services available in a specific region, to meet internal policy and governance requirements, or in response to capacity planning.
19+
20+
Maintenance control, with customized maintenance configurations, allows you to control how platform updates are applied to [Windows](https://docs.microsoft.com/azure/virtual-machines/maintenance-control-cli?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json) and [Linux](https://docs.microsoft.com/azure/virtual-machines/maintenance-control-cli?toc=%2Fazure%2Fvirtual-machines%2Flinux%2Ftoc.json&bc=%2Fazure%2Fvirtual-machines%2Flinux%2Fbreadcrumb%2Ftoc.json&view=azure-java-stable) VMs, and to Azure Dedicated Hosts. There are a couple of scenarios for moving maintenance control across regions:
21+
22+
- To move the resources associated with a maintenance configuration, but not the configuration itself, follow this article.
23+
- To move your maintenance control configuration, but not the resources associated with the configuration, follow [these instructions](move-region-maintenance-configuration.md).
24+
- To move both the maintenance configuration and the resources associated with it, first follow [these instructions](move-region-maintenance-configuration.md). Then, follow the instructions in this article.
25+
26+
## Prerequisites
27+
28+
Before you begin moving the resources associated with a Maintenance Control configuration:
29+
30+
- Make sure that the resources you're moving exist in the new region before you begin.
31+
- Verify the Maintenance Control configurations associated with the Azure VMs and Azure Dedicated Hosts that you want to move. Check each resource individually. There's currently no way to retrieve configurations for multiple resources.
32+
- When retrieving configurations for a resource:
33+
- Make sure you use the subscription ID for the account, not an Azure Dedicated Host ID.
34+
- CLI: The --output table parameter is used for readability only, and can be deleted or changed.
35+
- PowerShell: The Format-Table Name parameter is used for readability only, and can be deleted or changed.
36+
- If you use PowerShell, you get an error if you try to list configurations for a resource that doesn't have any associated configurations. The error will be similar to: "Operation failed with status: 'Not Found'. Details: 404 Client Error: Not Found for url".
37+
38+
39+
## Prepare to move
40+
41+
1. Before you start, define these variables. We've provided an example for each.
42+
43+
**Variable** | **Details** | **Example**
44+
--- | ---
45+
$subId | ID for subscription containing the maintenance configurations | "our-subscription-ID"
46+
$rsrcGroupName | Resource group name (Azure VM) | "VMResourceGroup"
47+
$vmName | VM resource name | "myVM"
48+
$adhRsrcGroupName | Resource group (Dedicated hosts) | "HostResourceGroup"
49+
$adh | Dedicated host name | "myHost"
50+
$adhParentName | Parent resource name | "HostGroup"
51+
52+
2. To retrieve the maintenance configurations using the PowerShell [Get-AZConfigurationAssignment](https://docs.microsoft.com/powershell/module/az.maintenance/Get-AzConfigurationAssignment?view=azps-3.5.0) command:
53+
54+
- For Azure Dedicated Hosts, run:
55+
```
56+
Get-AzConfigurationAssignment -ResourceGroupName $adhRsrcGroupName -ResourceName $adh -ResourceType hosts -ProviderName Microsoft.Compute -ResourceParentName $adhParentName -ResourceParentType hostGroups | Format-Table Name
57+
```
58+
59+
- For Azure VMs, run:
60+
61+
```
62+
Get-AzConfigurationAssignment -ResourceGroupName $rgName -ResourceName $vmName -ProviderName Microsoft.Compute -ResourceType virtualMachines | Format-Table Name
63+
```
64+
3. To retrieve the maintenance configurations using the CLI [az maintenance assignment](https://docs.microsoft.com/cli/azure/ext/maintenance/maintenance/assignment?view=azure-cli-latest) command:
65+
66+
- For Azure Dedicated Hosts:
67+
68+
```
69+
az maintenance assignment list --subscription $subId --resource-group $adhRsrcGroupName --resource-name $adh --resource-type hosts --provider-name Microsoft.Compute --resource-parent-name $adhParentName --resource-parent-type hostGroups --query "[].{HostResourceGroup:resourceGroup,ConfigName:name}" --output table
70+
```
71+
72+
- For Azure VMs:
73+
74+
```
75+
az maintenance assignment list --subscription $subId --provider-name Microsoft.Compute --resource-group $rsrcGroupName --resource-name $vmName --resource-type virtualMachines --query "[].{HostResourceGroup:resourceGroup, ConfigName:name}" --output table
76+
```
77+
78+
79+
## Move
80+
81+
1. [Follow these instructions](https://docs.microsoft.com/azure/site-recovery/azure-to-azure-tutorial-migrate?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json) to move the Azure VMs to the new region.
82+
2. After the resources are moved, reapply maintenance configurations to the resources in the new region as appropriate, depending on whether you moved the maintenance configurations. You can apply a maintenance configuration to a resource using [PowerShell](../virtual-machines/maintenance-control-powershell.md) or [CLI](../virtual-machines/maintenance-control-cli.md).
83+
84+
85+
## Verify the move
86+
87+
Verify resources in the new region, and verify associated configurations for the resources in the new region.
88+
89+
## Clean up source resources
90+
91+
After the move, consider deleting the moved resources in the source region.
92+
93+
94+
## Next steps
95+
96+
Follow [these instructions](move-region-maintenance-configuration.md) if you need to move maintenance configurations.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Move a maintenance configuration to another Azure region
3+
description: Learn how to move a VM maintenance configuration to another Azure region
4+
services: virtual-machines
5+
author: shants123
6+
ms.service: virtual-machines
7+
ms.topic: article
8+
ms.tgt_pltfrm: vm
9+
ms.date: 03/04/2020
10+
ms.author: shants
11+
#Customer intent: As an admin responsible for maintenance, I want move a Maintenance Control configuration associated with Azure resources to another Azure region.
12+
---
13+
14+
15+
# Move a Maintenance Control configuration to another region
16+
17+
Follow this article to move a Maintenance Control configuration to a different Azure region. You might want to move a configuration for a number of reasons. For example, to take advantage of a new region, to deploy features or services available in a specific region, to meet internal policy and governance requirements, or in response to capacity planning.
18+
19+
Maintenance control, with customized maintenance configurations, allows you to control how platform updates are applied to [Windows](https://docs.microsoft.com/azure/virtual-machines/maintenance-control-cli?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json) and [Linux](https://docs.microsoft.com/azure/virtual-machines/maintenance-control-cli?toc=%2Fazure%2Fvirtual-machines%2Flinux%2Ftoc.json&bc=%2Fazure%2Fvirtual-machines%2Flinux%2Fbreadcrumb%2Ftoc.json&view=azure-java-stable) VMs, and to Azure Dedicated Hosts. There are a couple of scenarios for moving maintenance control across regions:
20+
21+
- To move your maintenance control configuration, but not the resources associated with the configuration, follow the instructions in this article.
22+
- To move the resources associated with a maintenance configuration, but not the configuration itself, follow [these instructions](move-region-maintenance-configuration-resources.md).
23+
- To move both the maintenance configuration and the resources associated with it, first follow the instructions in this article. Then, follow [these instructions](move-region-maintenance-configuration-resources.md).
24+
25+
## Prerequisites
26+
27+
Before you begin moving a maintenance control configuration:
28+
29+
- Maintenance configurations are associated with Azure VMs or Azure Dedicated Hosts. Make sure that VM/host resources exist in the new region before you begin.
30+
- Identify:
31+
- Existing maintenance control configurations.
32+
- The resource groups in which existing configurations currently reside.
33+
- The resource groups to which the configurations will be added after moving to the new region.
34+
- The resources associated with the maintenance configuration you want to move.
35+
- Check that the resources in the new region are the same as those associated with the current maintenance configurations. The configurations can have the same names in the new region as they did in the old, but this isn't required.
36+
37+
## Prepare and move
38+
39+
1. Retrieve all of the maintenance configurations in each subscription. Run the CLI [az maintenance configuration list](https://docs.microsoft.com/cli/azure/ext/maintenance/maintenance/configuration?view=azure-cli-latest#ext-maintenance-az-maintenance-configuration-list) command to do this, replacing $subId with your subscription ID.
40+
41+
```
42+
az maintenance configuration list --subscription $subId --query "[*].{Name:name, Location:location, ResGroup:resourceGroup}" --output table
43+
```
44+
2. Review the returned table list of configuration records within the subscription. Here's an example. Your list will contain values for your specific environment.
45+
46+
**Name** | **Location** | **Resource group**
47+
--- | --- | ---
48+
Skip Maintenance | eastus2 | configuration-resource-group
49+
IgniteDemoConfig | eastus2 | configuration-resource-group
50+
defaultMaintenanceConfiguration-eastus | eastus | test-configuration
51+
52+
53+
3. Save your list for reference. As you move the configurations, it helps you to verify that everything's been moved.
54+
4. As a reference, map each configuration/resource group to the new resource group in the new region.
55+
5. Create new maintenance configurations in the new region using [PowerShell](../virtual-machines/maintenance-control-powershell.md#create-a-maintenance-configuration), or [CLI](../virtual-machines/maintenance-control-cli.md#create-a-maintenance-configuration).
56+
6. Associate the configurations with the resources in the new region, using [PowerShell](../virtual-machines/maintenance-control-powershell.md#assign-the-configuration), or [CLI](../virtual-machines/maintenance-control-cli.md#assign-the-configuration).
57+
58+
59+
## Verify the move
60+
61+
After moving the configurations, compare configurations and resources in the new region with the table list you prepared.
62+
63+
64+
## Clean up source resources
65+
66+
After the move, consider deleting the moved maintenance configurations in the source region, [PowerShell](../virtual-machines/maintenance-control-powershell.md#remove-a-maintenance-configuration), or [CLI](../virtual-machines/maintenance-control-cli.md#delete-a-maintenance-configuration).
67+
68+
69+
## Next steps
70+
71+
Follow [these instructions](move-region-maintenance-configuration-resources.md) if you need to move resources associated with maintenance configurations.

articles/virtual-machines/windows/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,10 @@
703703
href: ../../site-recovery/azure-to-azure-tutorial-migrate.md?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json
704704
- name: Move to an availability zone
705705
href: ../../site-recovery/move-azure-vms-avset-azone.md?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json
706+
- name: Move Maintenance Control configurations to another region
707+
href: ../move-region-maintenance-configuration.md?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json
708+
- name: Move Maintenance Control configuration resources to another region
709+
href: ../move-region-maintenance-configuration-resources.md?toc=/azure/virtual-machines/windows/toc.json&bc=/azure/virtual-machines/windows/breadcrumb/toc.json
706710
- name: Migrate AWS and on-premises VMs
707711
href: on-prem-to-azure.md
708712
items:

0 commit comments

Comments
 (0)