Azure Site Recovery test step

The Azure Site Recovery test step starts and stops an ASR recovery plan in test failover mode. It is always added to the step list as a pair of test steps, one for starting the recovery plan and one for stopping it. Other steps between the start and stop steps can be used to test the virtual machines in the recovery plan.

Warning Virtual machines started by the recovery plan generate Wenenu usage charges. See our pricing page for the details. A virtual machine started for the same protected item multiple times in the same monthly billing period generates charges only once.

When the start step is executed, the selected recovery plan is started in test failover mode with the given recovery point type using the selected virtual network as a target.

Users can select subnets in the target virtual network to instruct Wenenu to start test agent virtual machines in those subnets. The started test agents can be used as an execution point for subsequent test steps. The test agent virtual machines run Ubuntu 18.04-LTS and they are Standard_D2_v3 size with a single NIC and OS disk. They will be placed in the resource group of the recovery plan with the name of wenenu-testagent-<identifier>.

When the stop step is executed, Wenenu first deletes the test agent virtual machines in the previously selected subnets. Then it stops the test failover of the ASR recovery plan.

The step uses an Azure Service Principal service connector to communicate with the Azure ARM API. The service principal must have the appropriate Azure rights to start the recovery plan in test failover mode as well as to start and stop test agent VMs if necessary.

Note This test step is executed by special Wenenu agents, it is not required to specify a test agent for the place of execution. This way the credentials of the used service connector never leave our secure environment.
Important The created cloud resources generate Azure charges. Wenenu implements a robust retry mechanism to ensure the cleanup of the Azure resources, but despite all of our efforts, errors, for example, network segregation or hardware failure can prevent the cleanup of resources. As a best practice, users should check whether the Azure resources are cleaned up if a start or stop step ends with failure.

Service connector Azure permissions

The service connector used by the test step must have the following Azure built-in roles for the different cloud resources. Alternatively, users can create custom roles with the listed permissions for more fine-grained access control.

Without placing Wenenu test agent

Resource Built-in role Custom role permissions

Recovery vault

Site Recovery Operator

Microsoft.RecoveryServices/Vaults/read
Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read
Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action
Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action
Microsoft.RecoveryServices/vaults/replicationJobs/read

Virtual network

Reader

Microsoft.Network/virtualNetworks/read

With placing Wenenu test agent

Resource Built-in role Custom role permissions

Recovery vault

Site Recovery Operator

Microsoft.RecoveryServices/Vaults/read
Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read
Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action
Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action
Microsoft.RecoveryServices/vaults/replicationJobs/read

Virtual network

Network Contributor

Microsoft.Network/virtualNetworks/read
Microsoft.Network/networkInterfaces/write
Microsoft.Network/virtualNetworks/subnets/join/action

Resource group
(of the recovery vault)

Virtual Machine Contributor

Microsoft.Compute/virtualMachines/read
Microsoft.Compute/virtualMachines/write
Microsoft.Network/networkInterfaces/write
Microsoft.Network/networkInterfaces/join/action
Microsoft.Compute/virtualMachines/delete
Microsoft.Compute/disks/delete
Microsoft.Network/networkInterfaces/delete
Microsoft.Compute/virtualMachines/runCommand/action

UI settings

Azure Site Recovery step UI settings
Figure 1. Azure Site Recovery step UI settings

1

Arbitrary name of the test step up to 64 characters

2

List of the available Azure Service Principal service connectors. Selecting one populates the available subscriptions.

3

List of the available subscriptions to which the selected service connector has access. After selecting one, the available recovery vaults are populated.

4

List of the available recovery vaults in the selected subscription to which the service connector has access. After selecting one, the available recovery plans are populated.

5

List of the available recovery plans in the selected recovery vault. The selected recovery plan will be started in a test failover mode when the test step is executed.

6

Recovery point type that will be used to start the recovery plan in test failover mode.

7

List of Azure virtual networks that can be used as the target for the recovery plan test failover. After selecting one, the list of subnets in the virtual network is shown.

8

List of Azure subnets in the selected virtual network. Users can select subnets and Wenenu will start a test agent virtual machine in the selected subnets when the step is executed.

JSON

Example JSON object of an Azure Site Recovery start step:

{
  "displayName": "ASR test step", 1
  "type": "asr", 2
  "id": "0a3ebada-9a1a-41a4-9083-d7900d208a08", 3
  "endStepId": "55808630-8329-48d6-9674-108365366dc9", 4
  "serviceConnectorId": "8b2ef41a-3a12-4b24-b9cc-6ffca8f51fe3", 5
  "recoveryPlanId": "/Subscriptions/c0748b16-3a1a-45fa-acbd-dc0f684fbe84/resourceGroups/wenenu-tutorial/ providers/Microsoft.RecoveryServices/vaults/wenenu-tutorial/replicationRecoveryPlans/web", 6
  "vnetId": "/subscriptions/c0748b16-3a1a-45fa-acbd-dc0f684fbe84/resourceGroups/wenenu-tutorial-asr/providers/Microsoft.Network/virtualNetworks/wenenu-tutorial-vnet-asr", 7
  "recoveryPointType": "LatestProcessed", 8
  "subnetIds": [ 9
    "/subscriptions/c0748b16-3a1a-45fa-acbd-dc0f684fbe84/resourceGroups/wenenu-tutorial-asr/providers/Microsoft.Network/virtualNetworks/wenenu-tutorial-vnet-asr/subnets/web"
  ]
}
1 Arbitrary name of the test step up to 64 characters
2 Type of the test step, must be 'asr'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 Version 4 unique identifier of step that stops the ASR recovery plan
5 Wenenu identifier of the Azure Service Principal service connector that is used to communicate with the Azure API
6 Azure identifier of the ASR recovery plan that will be started in test failover mode
7 Azure identifier of the virtual network that will be the target for the recovery plan
8 The recovery point type that will be used to start the recovery plan
9 List of the Azure subnet identifiers of the target virtual network in which Wenenu will place a test agent VM

Example JSON object of an Azure Site Recovery stop step

{
  "displayName": "ASR test step", 1
  "type": "stopasr", 2
  "id": "55808630-8329-48d6-9674-108365366dc9", 3
  "startStepId": "0a3ebada-9a1a-41a4-9083-d7900d208a08" 4
}
1 Arbitrary name of the test step up to 64 characters
2 Type of the test step, must be 'stopasr'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 Version 4 unique identifier of step that starts the ASR recovery plan