Lab answer key: Implementing Azure-based recovery services
Note: An interactive lab simulation is available that allows you to click through this lab at your own pace. You may find slight differences between the interactive simulation and the hosted lab, but the core concepts and ideas being demonstrated are the same.
Note: You may need to install the latest version of the Microsoft Edge browser. To update the Microsoft Edge browser, select the three dots (ellipsis) icon in the upper-right corner of the window. Select Help and feedback from the dropdown menu, then select About Microsoft Edge. Edge will automatically check for updates and download any available updates, once the update is downloaded, click on the Restart
Exercise 1: Creating and configuring an Azure Site Recovery vault
Task 1: Create an Azure Site Recovery vault
- Connect to SEA-SVR2, and if needed, sign in as CONTOSO\Administrator with the password Pa55w.rd.
- On SEA-SVR2, start Microsoft Edge, go to the Azure portal at
https://portal.azure.com/
, and sign in by using the credentials of a user account with the Owner role in the subscription you’ll be using in this lab. - In the Azure portal, in the Search resources, services, and docs text box, on the toolbar, search for and select Recovery Services vaults, and on the Recovery Services vaults page, select + Create.
-
On the Basics tab of the Create Recovery Services vault page, specify the following settings (leave others with their default values) and select Review + create:
Setting Value Subscription the name of the Azure subscription you will be using in this lab Resource group the name of a new resource group AZ801-L0501-RG Vault name az801l05a-rsvault Location the name of an Azure region where you can create an Azure Recovery Services vault and is close to the location of the lab environment -
On the Review + create tab of the Create Recovery Services vault page, select Create.
Note: Wait until the Recovery Services vault is provisioned. This should take about 2 minutes.
Note: By default, the Storage Replication type of the vault is set to Geo-redundant (GRS), as well as Soft Delete and Security Features are enabled. You will change these settings in the lab to simplify deprovisioning, but you should ensure they are enabled in your production environments.
Task 2: Configure the Azure Site Recovery vault
-
On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, on the deployment page, select Go to resource.
Note: This will automatically display the az801l05a-rsvault page.
- On the az801l05a-rsvault page, on the vertical menu on the left side, in the Settings section, select Properties.
-
On the **az801l05a-rsvault Properties** page, select the Update link under the Backup Configuration label. -
On the Backup Configuration page, set Storage replication type to Locally-redundant, select Save and close the Backup Configuration page.
Note: Storage replication type cannot be changed after you implement protection.
-
On the **az801l05a-rsvault Properties** page, select the Update link under the Security Settings label. - On the Security and soft delete settings page, disable Enable soft delete for cloud workloads, disable Enable soft delete and security settings for hybrid workloads, select Update, and then close the Security and soft delete settings page.
Exercise 2: Implementing Hyper-V VM protection by using Azure Site Recovery vault
Task 1: Implement an Azure recovery site
- On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, use the Search resources, services, and docs text box in the toolbar to search for and select Virtual networks, and on the Virtual networks page, select + Create.
-
On the Basics tab of the Create virtual network page, specify the following settings (leave others with their default values) and select IP Addresses:
Setting Value Subscription the name of the Azure subscription you are using in this lab Resource group the name of a new resource group AZ801-L0502-RG Name az801l05-dr-vnet Region the name of the Azure region into which you deployed the Recovery Services vault earlier in this lab -
On the IP addresses tab of the Create virtual network page, select the ellipsis symbol (…) next to the + add a subnet button, from the dropdown list select Delete address space, select Add an IP address space.
-
On the Add an IP address space page, specify the following settings (leave others with their default values) and select Add:
Setting Value Starting Address 10.5.0.0 Address space size /22 (1024 Addresses) - On the IP addresses tab of the Create virtual network page, select + Add a subnet.
-
On the Add a subnet page, specify the following settings (leave others with their default values) and select Add:
Setting Value Name subnet0 Starting Address 10.5.0.0 Subnet size /24 (256 Addresses) - Back on the IP addresses tab of the Create virtual network page, select Review + create.
- On the Review + create tab of the Create virtual network page, select Create.
- On SEA-SVR2, in the Azure portal, browse back to the Virtual networks page and select + Create.
-
On the Basics tab of the Create virtual network page, specify the following settings (leave others with their default values) and select IP Addresses:
Setting Value Subscription the name of the Azure subscription you are using in this lab Resource group AZ801-L0502-RG Name az801l05-test-vnet Region the name of the Azure region into which you deployed the Recovery Services vault earlier in this lab -
On the IP addresses tab of the Create virtual network page, select the ellipsis symbol (…) next to the + add a subnet button, from the dropdown list select Delete address space, select Add an IP address space.
-
On the Add an IP address space page, specify the following settings (leave others with their default values) and select Add:
Setting Value Starting Address 10.5.0.0 Address space size /22 (1024 Addresses) Note: Ignore the warning regarding the overlapping IP address space. This is intentional, so the IP address space of the test environment matches the IP address space of the disaster recovery environment.
- On the IP addresses tab of the Create virtual network page, select + Add a subnet.
-
On the Add a subnet page, specify the following settings (leave others with their default values) and select Add:
Setting Value Name subnet0 Starting Address 10.5.0.0 Subnet size /24 (256 Addresses) - Back on the IP addresses tab of the Create virtual network page, select Review + create.
- On the Review + create tab of the Create virtual network page, select Create.
- On SEA-SVR2, in the Azure portal, use the Search resources, services, and docs text box in the toolbar to search for and select Storage accounts, and on the Storage accounts page, select + Create.
-
On the Basics tab of the Create storage account page, specify the following settings (leave others with their default values):
Setting Value Subscription the name of the Azure subscription you are using in this lab Resource group AZ801-L0502-RG Storage account name any globally unique name between 3 and 24 in length consisting of letters and digits, starting with a letter Region the name of the Azure region into which you deployed the Recovery Services vault earlier in this lab Performance Standard Redundancy Locally redundant storage (LRS) - On the Basics tab of the Create storage account page, select the Data protection tab.
-
On the Data protection tab of the Create storage account page, clear the Enable soft delete for blobs and Enable soft delete for containers checkboxes and select Review.
Note: These settings must be disabled when using the storage account for Azure Site Recovery.
- On the Review tab of the Create storage account page, select Create.
Task 2: Prepare protection of a Hyper-V virtual machine
- On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, use the Search resources, services, and docs text box in the toolbar to search for and select Recovery Services vaults, and on the Recovery Services vaults page, select the az801l05a-rsvault entry.
- On the az801l05a-rsvault page, on the vertical menu on the left side, in the Getting started section, select Site Recovery.
- On the az801l05a-rsvault | Site Recovery page, in the Hyper-V machines to Azure section, select 1. Prepare infrastructure.
- On the Deployment planning tab of the Prepare infrastructure page, in the Deployment planning completed? drop-down list, select Yes, I have done it and select Next.
- On the Source settings tab of the Prepare infrastructure page, next to the Are you Using System Center VMM to manage Hyper-V hosts label, select the No option.
- On the Source settings tab of the Prepare infrastructure page, select the Add Hyper-V site link.
- On the Create Hyper-V Site page, in the Name text box, enter az801l05-site and select OK.
- In Windows Start, search and open the Group Policy Management Editor and edit the following policy. Select Default Domain Policy, and then right-click and Edit.
- Select Computer Configuration/Policies/Administrative Templates/Windows Components/Windows Update. Select the policy Configure Automatic Updates.
- In the Computer Updates page, select Enabled, and then click OK.
-
Open Windows PowerShell, run the following commands to update Group Policy and update Windows Update services:
Invoke-GPUpdate -Force Get-Service wuauserv | Set-Service -StartupType Manual Get-Service wuauserv | Start-Service
- Switch back to the Microsoft Edge window displaying the Azure portal, on the Source settings tab of the Prepare infrastructure page, select the Add Hyper-V server link.
-
on the Add Server page, select the Download link in step 3 of the procedure for adding on-premises Hyper-V hosts in order to download the installer for Microsoft Azure Site Recovery Provider.
Note: If you receive the Microsoft Edge notification that AzureSiteRecoveryProvider.exe can’t be downloaded securely, move the cursor over the right side of the message to reveal the ellipsis symbol (…), select it, in the drop-down menu, select Copy download link, open another tab in the same Microsoft Edge window, paste the link you copied, and then press Enter.
- In the download notification, select Open file. This will start the Azure Site Recovery Provider Setup (Hyper-V server) wizard.
- On the Microsoft Update page, select Off and select Next.
- On the Provider installation page, select Install.
- Switch to the Microsoft Edge window displaying the Azure portal, and in the Add Server page, select the Download button in step 4 of the procedure for registering on-premises Hyper-V hosts in order to download the vault registration key.
- Switch to the Provider installation wizard and select Register. This will start the Microsoft Azure Site Recovery Registration Wizard.
- On the Vault Settings page of the Microsoft Azure Site Recovery Registration Wizard, select Browse.
- In the Open window, browse to the Downloads folder, select the vault credentials file, and select Open.
- Back on the Vault Settings page of the Microsoft Azure Site Recovery Registration Wizard, select Next.
- On the Proxy Settings page of the Microsoft Azure Site Recovery Registration Wizard, accept the default settings and select Next.
-
On the Registration page of the Microsoft Azure Site Recovery Registration Wizard, select Finish.
Note: In case the registration fails, select Start. On the Start menu, select the Azure Site Recovery Services Provider folder. In the folder, select Azure Site Recovery Configurator and re-run the registration procedure.
- Switch back to the Microsoft Edge window displaying the Azure portal, close the Add Server page, and refresh the page. When prompted, select Reload.
-
Back on the **az801l05a-rsvault Site Recovery** page, in the Hyper-V machines to Azure section, select 1. Prepare infrastructure. - On the Deployment planning tab of the Prepare infrastructure page, in the Deployment planning completed? drop-down list, select Yes, I have done it and select Next.
- On the Source settings tab of the Prepare infrastructure page, next to the Are you Using System Center VMM to manage Hyper-V hosts label, select the No option. Verify that the Hyper-V site and Hyper-V servers settings are set correctly and select Next.
- On the Target settings tab of the Prepare infrastructure page, accept the default settings and select Next.
- On the Replication policy tab of the Prepare infrastructure page, select Create new policy and associate.
-
On the Create and associate policy page, specify the following settings (leave others with their default values) and select OK:
Setting Value Name az801l05-replication-policy Copy frequency 30 seconds - Back on the Replication policy tab of the Prepare infrastructure page, wait until the site has been associated with the policy and select Next.
- On the Review tab of the Prepare infrastructure page, select Prepare.
Task 3: Enable replication of a Hyper-V virtual machine
- On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, on the az801l05a-rsvault | Site Recovery page, in the Hyper-V machines to Azure section, select 2. Enable replication.
- On the Source environment tab of the Enable replication page, in the Source location drop-down list, select az801l05-site and select Next.
-
On the Target environment tab of the Enable replication page, specify the following settings (leave others with their default values) and select Next:
Setting Value Subscription the name of the Azure subscription you are using in this lab Post-failover resource group AZ801-L0502-RG Post-failover deployment model Resource Manager Storage account the name of the storage account you created in the first task of this exercise Azure network Configure now for selected machines Virtual network az801l05-dr-vnet Subnet subnet0 (10.5.0.0/24) - On the Virtual machine selection tab of the Enable replication page, select the SEA-CORE1 checkbox and select Next.
- On the Replication settings tab of the Enable replication page, in the Defaults row and OS type column, select Windows from the drop-down list and select Next.
- On the Replication policy tab of the Enable replication page, accept the default settings and select Next.
- On the Review tab of the Enable replication page, select Enable replication.
Task 4: Review Azure VM replication settings
- On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, back on the az801l05a-rsvault | Site Recovery page, on the vertical menu on the left side, select Replicated items.
-
On the az801l05a-rsvault | Replicated items page, ensure that there is an entry representing the SEA-CORE1 virtual machine and verify that its Replication Health is listed as Healthy and that its Status is listed as either Enabling protection or displaying a current percentage of synchronization progress.
Note: You might need to wait a few minutes until the SEA-CORE1 entry appears on the az801l05a-rsvault | Replicated items page.
- On the az801l05a-rsvault | Replicated items page, select the SEA-CORE1 entry.
-
On the SEA-CORE1 replicated items page, review the Health and status, Failover readiness, Latest recovery points, and Infrastructure view sections. Note the Planned Failover, Failover and Test Failover toolbar icons.
Note: Wait until the status changes to Protected. The time required for this to take place depends on the available bandwidth of the connection between the lab environment and the Azure region hosting the Recovery Services vault. You will need to refresh the browser page for the status to be updated.
- On the SEA-CORE1 replicated items page, select Latest recovery points and review Latest crash-consistent and Latest app-consistent recovery points.
Task 5: Perform a failover of the Hyper-V virtual machine
- On SEA-SVR2, in the browser window displaying the Azure portal, on the SEA-CORE1 replicated items blade go to the Compute and Network setting and review the virtual machine size. Validate that the size is set to A1_v2, if not edit the size to be A1_v2.
-
Go back to the overview and initiate Test failover with the following settings (leave others with their default values) and select OK:
Setting Value Choose a recovery point the default option Azure virtual network az801l05-test-vnet -
In the Azure portal, browse back to the az801l05a-rsvault page, and on the vertical menu on the left side, in the Monitoring section, select Site Recovery jobs. Wait until the status of the Test failover job is listed as Successful.
Note: The time required for the test failover to complete depends on the available bandwidth of the connection between the lab environment and the Azure region hosting the Recovery Services vault. You will need to refresh the browser page for the status to be updated.
Note: While waiting for the test failover to complete, proceed to Exercise 3, and after you finish it, step through the remaining portion of this exercise.
-
In the Azure portal, use the Search resources, services, and docs text box in the toolbar to search for and select Virtual machines and, on the Virtual machines page, note the entry representing the newly provisioned virtual machine.
Note: Initially, the virtual machine will have the name consisting of the asr- prefix and randomly generated suffix, but will be renamed eventually to SEA-CORE1-test.
- In the Azure portal, browse back to the SEA-CORE1 replicated item page and select Cleanup test failover.
- On the Test failover cleanup page, select the Testing is complete. Delete test failover virtual machine(s) checkbox and select OK.
-
After the test failover cleanup job completes, refresh the browser page displaying the SEA-CORE1 replicated items page and note that you have the option to perform planned and unplanned failover (the latter is labeled as Failover).
Note: The unplanned failover option is labeled as Failover.
- On the SEA-CORE1 replicated items page, select Planned failover.
- On the Planned failover page, note that the failover direction settings are already set and not modifiable.
- Close the Planned failover page without initiating a failover, and on the SEA-CORE1 replicated items page, select Failover.
- On the Failover page, note that you have the option to choose a recovery point.
- Close the Failover page without initiating a failover.
Exercise 3: Implementing Azure Backup
Task 1: Set up the Azure Recovery Services agent
Note: In general, the same vault can be used to implement Azure Site Recovery and Azure Backup functionality. When choosing the Azure region to host the vault for the purpose of disaster recovery and backup, you should take into account recovery objectives, including the range of impact of a regional disaster as well as network latency considerations. In this lab, you will use the same vault for site recovery and backup to minimize the number of duplicate steps.
Note: To implement Azure Backup, you will be installing the Azure Recovery Services agent on SEA-SVR2, which already serves as the Microsoft Azure Site Recovery Provider. To eliminate dependency issues, you will start by uninstalling the existing installation of Azure Recovery Services agent.
- On SEA-SVR2, select Start, and on the Start menu, select the Settings app.
- In the Settings app, select Apps.
- In the Apps & features pane, select Microsoft Azure Recovery Services Agent, select Uninstall, and follow the prompts to uninstall it.
Note: If you are getting an error message that says the installation has failed, then restart the VM and try again.
- On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, on the az801l05a-rsvault Recovery Services vault page, on the vertical menu on the left side, in the Getting started section, select Backup.
-
On the az801l05a-rsvault |Backup page, specify the following settings:
Settings Value Where is your workload running? On-premises What do you want to back up? Files and folders - On the az801l05a-rsvault |Backup page, select Prepare infrastructure.
- On the Prepare infrastructure page, select the Download Agent for Windows Server or Windows Client link.
-
After the download completes, in the Downloads notification of Microsoft Edge, select the Open file link.
Note: This will start the Microsoft Azure Recovery Services Agent Setup Wizard, which, in this case, will launch automatically the Register Server Wizard.
- On the Installation Settings page of the Microsoft Azure Recovery Services Agent Setup Wizard, accept the default settings and select Next.
- On the Proxy Configuration page of the Microsoft Azure Recovery Services Agent Setup Wizard, accept the default settings, and then select Next.
- On the Installation page of the Microsoft Azure Recovery Services Agent Setup Wizard, select Install.
- After the installation completes, on the Installation page of the Microsoft Azure Recovery Services Agent Setup Wizard, select Proceed to Registration. This will launch the Register Server Wizard.
- Switch to the Microsoft Edge window displaying the Azure portal, on the Prepare infrastructure page, select the Already downloaded or using the latest Recovery Server Agent checkbox , and select Download.
- When prompted, whether to open or save the vault credentials file, select Save. This will save the vault credentials file to the local Downloads folder.
- Switch back to the Register Server Wizard, and on the Vault Identification page, select Browse.
- In the Select Vault Credentials dialog box, browse to the Downloads folder, select the vault credentials file you downloaded, and then select Open. Then select Next to open the Encryption Setting page.
- On the Encryption Setting page of the Register Server Wizard, select Generate Passphrase.
- On the Encryption Setting page of the Register Server Wizard, select the Browse button next to the Enter a location to save the passphrase drop-down list.
- In the Browse For Folder dialog box, expand This PC node, select the Documents subfolder, and then select OK.
-
Select Finish, review the Microsoft Azure Backup warning, select Yes, and wait for the registration to complete.
Note: In a production environment, you should store the passphrase file in a secure location other than the server being backed up.
- On the Server Registration page of the Register Server Wizard, review the warning regarding the location of the passphrase file, ensure that the Launch Microsoft Azure Recovery Services Agent checkbox is selected, and then select Close. This will automatically open the Microsoft Azure Backup console.
Task 2: Schedule Azure Backup
- On SEA-SVR2, in the Microsoft Azure Backup console, in the Actions pane, select Schedule Backup.
- In the Schedule Backup Wizard, on the Getting started page, select Next.
- On the Select Items to Backup page, select Add Items.
- In the Select Items dialog box, browse to the C:\Windows\System32\drivers\etc\ folder, select hosts, and then select OK.
- On the Select Items to Backup page, select Next.
- On the Specify Backup Schedule page, ensure that the Day option is selected, in the first drop-down list box below the At following times (Maximum allowed is three times a day) box, select 4:30 AM, and then select Next.
- On the Select Retention Policy page, accept the defaults, and then select Next.
- On the Choose Initial Backup type page, accept the defaults, and then select Next.
- On the Confirmation page, select Finish. When the backup schedule is created, select Close.
Task 3: Perform an on-demand backup
Note: The option to run backup on demand becomes available after you create a scheduled backup.
- In the Microsoft Azure Backup console, in the Actions pane, select Back Up Now.
- In the Back Up Now Wizard, on the Select Backup Item page, ensure that the Files and Folders option is selected and select Next.
- On the Retain Backup Till page, accept the default setting and select Next.
- On the Confirmation page, select Back Up.
- When the backup is complete, select Close.
- On SEA-SVR2, switch to the Microsoft Edge window displaying the Azure portal, browse back to the az801l05a-rsvault Recovery Services vault page and select Backup items.
- On the az801l05a-rsvault | Backup items page, select the Azure Backup Agent entry.
- On the Backup Items (Azure Backup Agent) page, verify that there is an entry referencing drive C of sea-svr2.contoso.com.
Task 4: Perform file recovery by using Azure Recovery Services agent
- On SEA-SVR2, open File Explorer, browse to the C:\Windows\System32\drivers\etc\ folder and delete the hosts file.
- Switch to the Microsoft Azure Backup window and select Recover data. This will start the Recover Data Wizard.
- On the Getting Started page of the Recover Data Wizard, ensue that This server (sea-svr2.contoso.com) option is selected and select Next.
- On the Select Recovery Mode page, ensure that Individual files and folders option is selected, and select Next.
-
On the Select Volume and Date page, in the Select the volume drop-down list, select C:\, accept the default selection of the available backup, and select Mount.
Note: Wait for the mount operation to complete. This might take about 2 minutes.
- On the Browse And Recover Files page, note the drive letter of the recovery volume, select Browse, and review the tip regarding the use of Robocopy.
- Select Start, expand the Windows System folder, and then select Command Prompt.
-
From the Administrator: Command Prompt window, run the following to copy the restore the hosts file to the original location (replace the
<recovery_volume>
placeholder with the drive letter of the recovery volume you identified earlier):robocopy <recovery_volume>:\Windows\System32\drivers\etc C:\Windows\system32\drivers\etc hosts /r:1 /w:1
-
From the Administrator: Command Prompt window, run the following to verify that the file has been restored:
dir C:\Windows\system32\drivers\etc\hosts
- Switch back to the Recover Data Wizard, and on the Browse and Recover Files page, select Unmount, and when prompted to confirm, select Yes.
Exercise 4: Deprovisioning the Azure lab environment
Task 1: Remove the protected items
- On SEA-SVR2, switch to the Microsoft Edge window displaying the Backup Items (Azure Backup Agent) page of the Azure portal and select the entry referencing drive C of sea-svr2.contoso.com.
- On the C:\ on sea-svr2.contoso.com page, select the sea-svr2.contoso.com link.
- On the sea-svr2.contoso.com page, select Delete.
-
On the Delete page, specify the following information, select the There is backup data of 1 backup items associated with this server. I understand that clicking “Confirm” will permanently delete all cloud backup data. This action cannot be undone. An alert may be sent to the administrators of this subscription notifying them of this deletion checkbox, and then select Delete:
Settings Value Type the server name sea-svr2.contoso.com Reason Decommissioned Comments Decommissioned -
On SEA-SVR2, in the Microsoft Edge displaying the Azure portal, browse to the **az801l05a-rsvault Replicated items** page, and select the SEA-CORE1 entry. - On the SEA-CORE1 replicated items page, select the ellipsis in the toolbar, and from the drop-down menu, select Disable replication.
- On the Disable replication page, ensure that the Disable replication and remove (Recommended) entry appears in the Remove replicated items drop-down list, select I don’t want to provide feedback checkbox, and then select OK.
Task 2: Delete the lab resource groups
- On SEA-SVR2, in the Microsoft Edge window displaying the Azure portal, open the Azure Cloud Shell pane by selecting the Cloud Shell button in the Azure portal.
-
If prompted to select either Bash or PowerShell, select PowerShell.
Note: If this is the first time you’re starting Cloud Shell and you’re presented with the You have no storage mounted message, select the subscription you are using in this lab, and then select Create storage.
-
From the Cloud Shell pane, run the following to list all resource groups you created in this lab:
Get-AzResourceGroup -Name 'AZ801-L050*'
Note: Verify that the output contains only the resource group you created in this lab. This group will be deleted in this task.
-
From the Cloud Shell pane, run the following command to delete all resource groups created throughout this lab:
Get-AzResourceGroup -Name 'AZ801-L050*' | Remove-AzResourceGroup -Force -AsJob
Note: The command executes asynchronously (as determined by the -AsJob parameter), so while you will be able to run another PowerShell command immediately after within the same PowerShell session, it will take a few minutes before the resource groups are actually removed.