Skip to content

Commit eb1bc2c

Browse files
authored
Merge pull request #110069 from davidsmatlak/ds-asrdocfix03
Copyedits and fixes Markdown
2 parents bcae537 + ab638de commit eb1bc2c

File tree

1 file changed

+69
-64
lines changed

1 file changed

+69
-64
lines changed

articles/site-recovery/azure-to-azure-autoupdate.md

Lines changed: 69 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,73 @@
11
---
2-
title: Automatic update of the Mobility service in Azure Site Recovery
2+
title: Automatic update of the Mobility service in Azure Site Recovery
33
description: Overview of automatic update of the Mobility service when replicating Azure VMs by using Azure Site Recovery.
44
services: site-recovery
5-
author: rajani-janaki-ram
5+
author: rajani-janaki-ram
66
manager: rochakm
77
ms.service: site-recovery
88
ms.topic: article
9-
ms.date: 10/24/2019
9+
ms.date: 04/02/2020
1010
ms.author: rajanaki
11-
1211
---
12+
1313
# Automatic update of the Mobility service in Azure-to-Azure replication
1414

15-
Azure Site Recovery uses a monthly release cadence to fix any issues and enhance existing features or add new ones. To remain current with the service, you must plan for patch deployment each month. To avoid overhead associated with each upgrade, you can instead allow Site Recovery to manage component updates.
15+
Azure Site Recovery uses a monthly release cadence to fix any issues and enhance existing features or add new ones. To remain current with the service, you must plan for patch deployment each month. To avoid the overhead associated with each upgrade, you can allow Site Recovery to manage component updates.
1616

17-
As mentioned in [Azure-to-Azure disaster recovery architecture](azure-to-azure-architecture.md), the Mobility service is installed on all Azure virtual machines (VMs) for which replication is enabled, while replicating VMs from one Azure region to another. When you use automatic updates, each new release updates the Mobility service extension.
18-
17+
As mentioned in [Azure-to-Azure disaster recovery architecture](azure-to-azure-architecture.md), the Mobility service is installed on all Azure virtual machines (VMs) that have replication enabled from one Azure region to another. When you use automatic updates, each new release updates the Mobility service extension.
1918

2019
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
2120

2221
## How automatic updates work
2322

24-
When you use Site Recovery to manage updates, it deploys a global runbook (used by Azure services) via an automation account, created in the same subscription as the vault. Each vault uses one automation account. The runbook checks for each VM in a vault for active auto-updates and upgrades the Mobility service extension if a newer version is available.
23+
When you use Site Recovery to manage updates, it deploys a global runbook (used by Azure services) via an automation account, created in the same subscription as the vault. Each vault uses one automation account. For each VM in a vault, the runbook checks for active auto-updates. If a newer version of the Mobility service extension is available, the update is installed.
2524

26-
The default runbook schedule recurs daily at 12:00 AM in the time zone of the replicated VM's geo. You can also change the runbook schedule via the automation account.
25+
The default runbook schedule occurs daily at 12:00 AM in the time zone of the replicated VM's geography. You can also change the runbook schedule via the automation account.
2726

2827
> [!NOTE]
29-
> Starting with Update Rollup 35, you can choose an existing automation account to use for updates. Prior to this update, Site Recovery created this account by default. Note that you can only select this option when you enable replication for a VM. It isn't available for a replicating VM. The setting you select will apply for all Azure VMs protected in the same vault.
30-
31-
> Turning on automatic updates doesn't require a restart of your Azure VMs or affect ongoing replication.
28+
> Starting with [Update Rollup 35](site-recovery-whats-new.md#updates-march-2019), you can choose an existing automation account to use for updates. Prior to Update Rollup 35, Site Recovery created the automation account by default. You can only select this option when you enable replication for a VM. It isn't available for a VM that already has replication enabled. The setting you select applies to all Azure VMs protected in the same vault.
29+
30+
Turning on automatic updates doesn't require a restart of your Azure VMs or affect ongoing replication.
3231

33-
> Job billing in the automation account is based on the number of job runtime minutes used in a month. By default, 500 minutes are included as free units for an automation account. Job execution takes a few seconds to about a minute each day and is covered as free units.
32+
Job billing in the automation account is based on the number of job runtime minutes used in a month. Job execution takes a few seconds to about a minute each day and is covered as free units. By default, 500 minutes are included as free units for an automation account, as shown in the following table:
3433

3534
| Free units included (each month) | Price |
3635
|---|---|
3736
| Job runtime 500 minutes | ₹0.14/minute
3837

3938
## Enable automatic updates
4039

41-
You can allow Site Recovery to manage updates in the following ways.
40+
There are several ways that Site Recovery can manage the extension updates:
41+
42+
- [Manage as part of the enable replication step](#manage-as-part-of-the-enable-replication-step)
43+
- [Toggle the extension update settings inside the vault](#toggle-the-extension-update-settings-inside-the-vault)
44+
- [Manage updates manually](#manage-updates-manually)
4245

4346
### Manage as part of the enable replication step
4447

4548
When you enable replication for a VM either starting [from the VM view](azure-to-azure-quickstart.md) or [from the recovery services vault](azure-to-azure-how-to-enable-replication.md), you can either allow Site Recovery to manage updates for the Site Recovery extension or manage it manually.
4649

47-
![Extension settings](./media/azure-to-azure-autoupdate/enable-rep.png)
50+
:::image type="content" source="./media/azure-to-azure-autoupdate/enable-rep.png" alt-text="Extension settings":::
4851

4952
### Toggle the extension update settings inside the vault
5053

51-
1. Inside the vault, go to **Manage** > **Site Recovery Infrastructure**.
52-
2. Under **For Azure Virtual Machines** > **Extension Update Settings**, turn on the **Allow Site Recovery to manage** toggle. To manage manually, turn it off.
53-
3. Select **Save**.
54+
1. From the Recovery Services vault, go to **Manage** > **Site Recovery Infrastructure**.
55+
1. Under **For Azure Virtual Machines** > **Extension Update Settings** > **Allow Site Recovery to manage**, select **On**.
56+
57+
To manage the extension manually, select **Off**.
5458

55-
![Extension update settings](./media/azure-to-azure-autoupdate/vault-toggle.png)
59+
1. Select **Save**.
5660

57-
> [!Important]
58-
> When you choose **Allow Site Recovery to manage**, the setting is applied to all VMs in the corresponding vault.
61+
:::image type="content" source="./media/azure-to-azure-autoupdate/vault-toggle.png" alt-text="Extension update settings":::
5962

63+
> [!IMPORTANT]
64+
> When you choose **Allow Site Recovery to manage**, the setting is applied to all VMs in the vault.
6065
61-
> [!Note]
62-
> Either option notifies you of the automation account used for managing updates. If you're using this feature in a vault for the first time, a new automation account is created by default. Alternately, you can customize the setting, and choose an existing automation account. All subsequent enable replications in the same vault use the previously created one. Currently the drop-down will only list Automation accounts that are in the same Resource Group as the vault.
66+
> [!NOTE]
67+
> Either option notifies you of the automation account used for managing updates. If you're using this feature in a vault for the first time, a new automation account is created by default. Alternately, you can customize the setting, and choose an existing automation account. All subsequent taks to enable replication in the same vault will use the previously created automation account. Currently, the drop-down menu will only list automation accounts that are in the same Resource Group as the vault.
6368
6469
> [!IMPORTANT]
65-
> The below script needs to be run in the context of an automation account
70+
> The following script needs to be run in the context of an automation account.
6671
For a custom automation account, use the following script:
6772

6873
```azurepowershell
@@ -92,45 +97,45 @@ $Timeout = "160"
9297
9398
function Throw-TerminatingErrorMessage
9499
{
95-
Param
100+
Param
96101
(
97102
[Parameter(Mandatory=$true)]
98103
[String]
99104
$Message
100-
)
105+
)
101106
102107
throw ("Message: {0}, TaskId: {1}.") -f $Message, $TaskId
103108
}
104109
105110
function Write-Tracing
106111
{
107-
Param
112+
Param
108113
(
109-
[Parameter(Mandatory=$true)]
114+
[Parameter(Mandatory=$true)]
110115
[ValidateSet("Informational", "Warning", "ErrorLevel", "Succeeded", IgnoreCase = $true)]
111-
[String]
116+
[String]
112117
$Level,
113118
114119
[Parameter(Mandatory=$true)]
115120
[String]
116121
$Message,
117122
118-
[Switch]
123+
[Switch]
119124
$DisplayMessageToUser
120-
)
125+
)
121126
122127
Write-Output $Message
123128
124129
}
125130
126131
function Write-InformationTracing
127132
{
128-
Param
133+
Param
129134
(
130135
[Parameter(Mandatory=$true)]
131136
[String]
132137
$Message
133-
)
138+
)
134139
135140
Write-Tracing -Message $Message -Level Informational -DisplayMessageToUser
136141
}
@@ -179,14 +184,14 @@ function Initialize-SubscriptionId()
179184
$Tokens = $VaultResourceId.SubString(1).Split("/")
180185
181186
$Count = 0
182-
$ArmResources = @{}
187+
$ArmResources = @{}
183188
while($Count -lt $Tokens.Count)
184189
{
185190
$ArmResources[$Tokens[$Count]] = $Tokens[$Count+1]
186191
$Count = $Count + 2
187192
}
188-
189-
return $ArmResources["subscriptions"]
193+
194+
return $ArmResources["subscriptions"]
190195
}
191196
catch
192197
{
@@ -203,7 +208,7 @@ function Invoke-InternalRestMethod($Uri, $Headers, [ref]$Result)
203208
{
204209
try
205210
{
206-
$ResultObject = Invoke-RestMethod -Uri $Uri -Headers $Headers
211+
$ResultObject = Invoke-RestMethod -Uri $Uri -Headers $Headers
207212
($Result.Value) += ($ResultObject)
208213
break
209214
}
@@ -249,7 +254,7 @@ function Invoke-InternalWebRequest($Uri, $Headers, $Method, $Body, $ContentType,
249254
}
250255
251256
function Get-Header([ref]$Header, $AadAudience, $AadAuthority, $RunAsConnectionName){
252-
try
257+
try
253258
{
254259
$RunAsConnection = Get-AutomationConnection -Name $RunAsConnectionName
255260
$TenantId = $RunAsConnection.TenantId
@@ -280,14 +285,14 @@ function Get-Header([ref]$Header, $AadAudience, $AadAuthority, $RunAsConnectionN
280285
281286
function Get-ProtectionContainerToBeModified([ref] $ContainerMappingList)
282287
{
283-
try
288+
try
284289
{
285290
Write-InformationTracing ("Get protection container mappings : {0}." -f $VaultResourceId)
286291
$ContainerMappingListUrl = $ArmEndPoint + $VaultResourceId + "/replicationProtectionContainerMappings" + "?api-version=" + $AsrApiVersion
287-
292+
288293
Write-InformationTracing ("Getting the bearer token and the header.")
289294
Get-Header ([ref]$Header) $AadAudience $AadAuthority $RunAsConnectionName
290-
295+
291296
$Result = @()
292297
Invoke-InternalRestMethod -Uri $ContainerMappingListUrl -Headers $header -Result ([ref]$Result)
293298
$ContainerMappings = $Result[0]
@@ -385,7 +390,7 @@ try
385390
try {
386391
$UpdateUrl = $ArmEndPoint + $Mapping + "?api-version=" + $AsrApiVersion
387392
Get-Header ([ref]$Header) $AadAudience $AadAuthority $RunAsConnectionName
388-
393+
389394
$Result = @()
390395
Invoke-InternalWebRequest -Uri $UpdateUrl -Headers $Header -Method 'PATCH' `
391396
-Body $InputJson -ContentType "application/json" -Result ([ref]$Result)
@@ -475,7 +480,7 @@ catch
475480
{
476481
$ErrorMessage = ("Tracking modify cloud pairing jobs failed with [Exception: {0}]." -f $_.Exception)
477482
Write-Tracing -Level ErrorLevel -Message $ErrorMessage -DisplayMessageToUser
478-
Throw-TerminatingErrorMessage -Message $ErrorMessage
483+
Throw-TerminatingErrorMessage -Message $ErrorMessage
479484
}
480485
481486
Write-InformationTracing ("Tracking modify cloud pairing jobs completed.")
@@ -487,7 +492,7 @@ Write-InformationTracing ("Modify cloud pairing jobs timedout: {0}." -f $JobsTim
487492
if($JobsTimedOut -gt 0)
488493
{
489494
$ErrorMessage = "One or more modify cloud pairing jobs has timedout."
490-
Write-Tracing -Level ErrorLevel -Message ($ErrorMessage)
495+
Write-Tracing -Level ErrorLevel -Message ($ErrorMessage)
491496
Throw-TerminatingErrorMessage -Message $ErrorMessage
492497
}
493498
elseif($JobsCompletedSuccessList.Count -ne $ContainerMappingList.Count)
@@ -502,44 +507,44 @@ Write-Tracing -Level Succeeded -Message ("Modify cloud pairing completed.") -Dis
502507

503508
### Manage updates manually
504509

505-
1. If there are new updates for the Mobility service installed on your VMs, you'll see the following notification: "New Site Recovery replication agent update is available. Click to install"
510+
1. If there are new updates for the Mobility service installed on your VMs, you'll see the following notification: **New Site Recovery replication agent update is available. Click to install.**
506511

507-
![Replicated items window](./media/vmware-azure-install-mobility-service/replicated-item-notif.png)
508-
2. Select the notification to open the VM selection page.
509-
3. Choose the VMs you want to upgrade, and then select **OK**. The Update Mobility service will start for each selected VM.
512+
:::image type="content" source="./media/vmware-azure-install-mobility-service/replicated-item-notif.png" alt-text="Replicated items window":::
510513

511-
![Replicated items VM list](./media/vmware-azure-install-mobility-service/update-okpng.png)
514+
1. Select the notification to open the VM selection page.
515+
1. Choose the VMs you want to upgrade, and then select **OK**. The Update Mobility service will start for each selected VM.
512516

517+
:::image type="content" source="./media/vmware-azure-install-mobility-service/update-okpng.png" alt-text="Replicated items VM list":::
513518

514519
## Common issues and troubleshooting
515520

516521
If there's an issue with the automatic updates, you'll see an error notification under **Configuration issues** in the vault dashboard.
517522

518-
If you couldn't enable automatic updates, see the following common errors and recommended actions:
523+
If you can't enable automatic updates, see the following common errors and recommended actions:
519524

520525
- **Error**: You do not have permissions to create an Azure Run As account (service principal) and grant the Contributor role to the service principal.
521526

522-
**Recommended action**: Make sure that the signed-in account is assigned as Contributor and try again. Refer to the required permissions section in [Use the portal to create an Azure AD application and service principal that can access resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-create-service-principal-portal#required-permissions) for more information about assigning permissions.
523-
524-
To fix most issues after you enable automatic updates, select **Repair**. If the repair button isn't available, see the error message displayed in the extension update settings pane.
527+
**Recommended action**: Make sure that the signed-in account is assigned as Contributor and try again. For more information about assigning permissions, see the required permissions section of [How to: Use the portal to create an Azure AD application and service principal that can access resources](/azure/azure-resource-manager/resource-group-create-service-principal-portal#required-permissions).
528+
529+
To fix most issues after you enable automatic updates, select **Repair**. If the repair button isn't available, see the error message displayed in the extension update settings pane.
525530

526-
![Site Recovery service repair button in extension update settings](./media/azure-to-azure-autoupdate/repair.png)
531+
:::image type="content" source="./media/azure-to-azure-autoupdate/repair.png" alt-text="Site Recovery service repair button in extension update settings":::
527532

528533
- **Error**: The Run As account does not have the permission to access the recovery services resource.
529534

530-
**Recommended action**: Delete and then [re-create the Run As account](https://docs.microsoft.com/azure/automation/automation-create-runas-account). Or, make sure that the Automation Run As account's Azure Active Directory application has access to the recovery services resource.
535+
**Recommended action**: Delete and then [re-create the Run As account](/azure/automation/automation-create-runas-account). Or, make sure that the Automation Run As account's Azure Active Directory application can access the recovery services resource.
531536

532-
- **Error**: Run As account is not found. Either one of these was deleted or not created - Azure Active Directory Application, Service Principal, Role, Automation Certificate asset, Automation Connection asset - or the Thumbprint is not identical between Certificate and Connection.
537+
- **Error**: Run As account is not found. Either one of these was deleted or not created - Azure Active Directory Application, Service Principal, Role, Automation Certificate asset, Automation Connection asset - or the Thumbprint is not identical between Certificate and Connection.
533538

534-
**Recommended action**: Delete and then [re-create the Run As account](https://docs.microsoft.com/azure/automation/automation-create-runas-account).
539+
**Recommended action**: Delete and then [re-create the Run As account](/azure/automation/automation-create-runas-account).
535540

536-
- **Error**: The Azure Run as Certificate used by the automation account is about to expire.
541+
- **Error**: The Azure Run as Certificate used by the automation account is about to expire.
537542

538-
The self-signed certificate that is created for the Run As account expires one year from the date of creation. You can renew it at any time before it expires. If you have signed up for email notifications, you will also receive emails when an action is required from your side. This error will be shown two months prior to the expiry date, and will change to a critical error if the certificate has expired. Once the certificate has expired, auto update will not be functional until you renew the same.
543+
The self-signed certificate that is created for the Run As account expires one year from the date of creation. You can renew it at any time before it expires. If you have signed up for email notifications, you will also receive emails when an action is required from your side. This error will be shown two months prior to the expiry date, and will change to a critical error if the certificate has expired. Once the certificate has expired, auto update will not be functional until you renew the same.
539544

540-
**Recommended action**: Click on 'Repair' and then 'Renew Certificate' to resolve this issue.
541-
542-
![renew-cert](media/azure-to-azure-autoupdate/automation-account-renew-runas-certificate.PNG)
545+
**Recommended action**: To resolve this issue, select **Repair** and then **Renew Certificate**.
543546

544-
> [!NOTE]
545-
> Once you renew the certificate, please refresh the page so that the current status is updated.
547+
:::image type="content" source="./media/azure-to-azure-autoupdate/automation-account-renew-runas-certificate.PNG" alt-text="renew-cert":::
548+
549+
> [!NOTE]
550+
> After you renew the certificate, refresh the page to display the current status.

0 commit comments

Comments
 (0)