Tuesday, March 21, 2017

Get hands-on with Azure Site Recovery (ASR) and learn to failover an enterprise application to Azure

Get hands-on with Azure Site Recovery (ASR) and learn to failover an enterprise application to Azure


Lab Overview

Time Estimate

90 minutes
NOTE: Before completing this lab you must set up your Azure Account
In this exercise you will:
  • Set up your Azure Account

Scenario:  To perform this lab, you must have an Azure account set up that you can modify.  To set up up this account, use the promotional code visible in the Content tab of the lab interface.  This exercise will walk you through the steps for redeeming the code.

Note:  If you already have an Azure subscription (MSDN/Internal) that you can use for this hands-on lab, you can skip this exercise.
  1. Sign In
If necessary, sign in using the following credentials: Admin, password:  Passw0rd!  On the Network prompt, click No.
  1. Obtain Microsoft Account
You will need a Microsoft account (@outlook.com or @live.com, etc).  This account must NOT have an Azure subscription associated with it.  If you do not have an appropriate Microsoft account, please acquire one before continuing this lab. You can obtain an account from the following site:  http://www.microsoft.com/en-us/account.
  1. Open Site (Azure Pass)
Open the Edge or IE browser, and navigate to http://microsoftazurepass.com.
  1. Submit Promo Code
Choose from the country drop-down “United States”.  Enter the promotional code (given to you in the lab Content tab) in the Promo Code field.  Click on the Submit button.
  1. Complete Account Request
Click on the Sign in button to enter your MSA account (@outlook.com/@live.com etc.) Follow any additional instructions to complete the process.
Congratulations!

You have successfully:
  • Set up your Azure Account

Click Continue to advance to the next exercise.

Exercise 1: Validate connectivity to Ubuntu01

1.      Within the Learn on Demand environment, select Hyper-V1 and click Ctrl+Alt+Del. Log on with the credentials provided.
2.      Click on the Windows button then in the start screen click on the Search icon. In the search window enter Hyper-V.
3.      In the resulting list, click on Hyper-V Manager
4.      Right-click on the virtual machine ubuntu01 and click Start. Allow the VM a minute or so to start up.
5.      Within the Learn on Demand environment, select MgmtServer1 and click Ctrl+Alt+Del. Log on with the credentials provided.
6.      On the desktop of MgmeServer1 double-click Putty to open this application.
7.      Within the Putty interface enter 192.168.0.102 in the Host Name (or IP address) section. Click Open.

8.      At the login prompt enter the following credentials:
a.      admin_user
b.      Password~1
You should receive a confirmation of a successful login.

Exercise 2: Set up Azure prerequisites for ASR protection of Hyper-V

Task 1: Create a Virtual Network

1.      If you are not logged in to the Azure portal, launch a browser and navigate to https://portal.azure.com and login using the credentials for your Azure subscription.
2.      Click on the + New link on the main Azure menu, then click Networking, then Virtual Network.
3.      On the Virtual Network marketplace page, ensure the deployment model is set to Resource Manager, then click Create.
4.      On the Create virtual network blade, enter the following information, then click Create.
a.      Name: DRVnet
b.      Address space: 10.10.0.0/16
c.      Subnet name: DR
d.      Subnet address range: 10.10.1.0/24
e.      Subscription: Choose your subscription
f.       Resource group: Create new – DRVNetRmRG
g.      Location: Azure region closest to you (remember your selection)

Task 2: Create a Storage Account

1.      Click on the New link on the main Azure menu, then Data + Storage, then Storage account.
2.      On the Create storage account blade enter the following and click Create:
a.      Name: opsdrsa0432
NOTE: The storage account name has to be unique. In order to ensure my storage account name was unique, I used the last 4 digits of my mobile number at the end of the text. Another recommendation is to use your initials in the name as well.


b.      Deployment model: Resource manager
c.      Account kind: General purpose
d.      Performance:  Standard
e.      Replication: Geo-redundant storage (GRS)
f.       Subscription: Select your subscription
g.      Resource group: Click Create new and enter DRRmRG
h.      Location: Use the same Azure region that you used in the creation of your virtual network

3.      Return to the Azure Dashboard after this is complete.

Task 3: Provision the Recovery Services Vault

1.      On the main Azure menu click on New, then in the find dialog enter recovery, then in the options that emerge below the dialog choose Backup and Site Recovery (OMS).
2.      On the Everything blade click on Backup and Site Recovery (OMS).
3.      On the resulting Backup and Site Recovery (OMS) marketplace blade, click Create.
4.      On the Recovery services vault blade enter the following and click Create:
a.      Name: DRVault
b.      Subscription: Choose your subscription
c.      Resource group: Click Use existing and select DRRmRG.
d.      Location: Use the same Azure region that you used in the creation of your virtual network

Exercise 3: Ensure your Hyper-V host meets the prerequisites

1.      The Hyper-V host in this lab meets all of the prerequisites, but you should review them for future configurations. They can be found here: https://azure.microsoft.com/en-us/documentation/articles/site-recovery-hyper-v-site-to-azure/#on-premises-prerequisites

Exercise 4: Configure Recovery Services Vault

Task 1: Prepare the Infrastructure

Note – Carry out these steps from Hyper-V1 in the Learn on Demand environment.
1.      Navigate to https://portal.azure.com and log on with the credentials you have been using during this lab.
2.      Within the Azure portal open the Recovery services vault by clicking on More Services, entering recovery in the find dialog, then clicking on Recovery Services vaults.
3.      Click on DRVault to open its Essentials and Settings bladesThen on the Settings blade, under Getting started, click on Site Recovery.
4.      In the resulting Site Recovery blade click on Step 1: Prepare Infrastructure.
5.      Beside the resulting Prepare infrastructure blade, the Protection goal blade opens. Configure this as follows, then click OK:
a.      Where do you want to replicate your machines to? Azure
b.      Are your machines virtualized? Yes, with Hyper-V
c.      Are you using System Center VMM to manage your Hyper-V hosts? No
6.      On the Prepare source blade click to add a Hyper-V Site.
7.      In the Create Hyper-V site blade enter the name LoD Hyper-V Site. Click OK.
8.      Click on the Notifications link and monitor the status of this operation. It should finish in less than a minute.
9.      Back on the Prepare source blade click to add a Hyper-V Server.
10.   On the Add Server blade click Download on step number 4. This will download the registration key file.
11.   A dialog opens at the bottom of the browser. Choose Save. The file will be placed in the Downloads folder by default. You will need the location of the file in a later step.
12.   Back within the Azure portal, on the Add Server blade click Download on step number 3.
13.   A warning is displayed concerning the file download. Click on Run to continue.
14.   The Azure Site Recovery Provider Setup (Hyper-V server) opens. Click On (recommended) on the Microsoft Update screen., then click Next.
15.   On the Provider Installation screen click Install.
16.   Once the installation completes, click on Register.
17.   The Microsoft Azure Site Recovery Registration Wizard screen opens. Click More Services and browse to the folder where you downloaded the registration key. Click to select the key, then click Open.
18.   All of the values are provided in the vault settings dialog. Click Next.
19.   On the Proxy Settings window, leave the default selection intact and click Next.
20.   You should receive a confirmation that the server was registered successfully. Click Finish.
21.   Back in the Azure portal, close the Add server and Prepare source blades. Within 5-10 minutes, click on Source Prepare on the Prepare infrastructure blade once more. You should see that the Hyper-V server has been added. Click OK.
22.   The Target blade opens. All options on this blade should already be completed (the storage account and virtual network created in a previous lab). Ensure the blade has the information reflected below, then click OK.
23.   On the Replication policy blade click Create and Associate.
24.   On the Create and associate blade enter the name HyperVReplPolicy. Leave the remaining options set to their defaults and click OK.
25.   Monitor the status of the policy creation and association on the Replication policy blade.
26.   On the Capacity planning blade select I will do it later on the Have you completed capacity planning? option. Click OK.
27.   On the Prepare infrastructure blade click OK.
 

Task 2: Replicate the Servers/Applications

Note – Carry out this step from any Internet connected computer.
1.      Within the Azure portal and back on the Site Recovery tab, click on Step 2: Replicate Application.
2.      The Enable replication and Source blades open. On the Source blade leave the default site selection intact and click OK.
3.      On the Target blade ensure the settings match those in the below screen shot. Once confirmed, click OK.
4.      On the Select virtual machines blade select ubuntu01 then click OK.
5.      On the Configure properties blade, in the OS Type column select Linux beside ubuntu01. Click OK.
6.      On the Configure replication settings blade ensure the HyperVReplPolicy is selected then click OK.
7.      Back on the Enable replication blade click Enable replication.
8.      Monitor the Enabling protection job by clicking on it in the Notifications area.
1.      Once the job completes successfully, navigate back to the DRVault Recovery Services vault by clicking on More Services, entering recovery in the find dialog, then clicking on Recovery Services vaults.
9.      Click on DRVault to open its Essentials and Settings blades.
10.   On the Settings blade, under Protected items click on Replicated items.
11.   On the Replicated items blade notice the replication health of ubuntu01. Click on the server’s name.
12.   On the replicated item’s Essentials blade you can see information such as the series and size of VM this will become if failed over.
13.   The VM size to be used at failover can be changed by clicking on Compute and Network on the Settings blade. You can also change the target network to use here.

Exercise 5: Perform a test failover

1.      Within the Settings blade of the DRVaultRecovery Services vault, click  on Replicated Items.
2.      On the Replicated items blade, ensure ubuntu01 shows a Health of OK and Status of Protected. Click on ubuntu01.
3.      On the ubuntu01 replicated item blade click on Test Failover.
4.      On the Test failover blade, notice that the direction is from the Hyper-V site to Azure. Select the DRVnet virtual network then click OK.
5.      Open the Notifications area and click on the status of the test failover job.
6.      This opens the Site Recovery job window. Monitor the progress until the job is at the Complete testing step. Here the process stops until a person validates functionality and continues the test.
7.      Within the Azure portal click on Resource groups.
8.      Notice the presence of a new resource group called ubuntu01-test. Click on this resource group.
9.      Notice that a VM was provisioned (ubuntu01-test) with a network interface. Click on the network interface.
10.   Once open, click on the IP Configuration item under SETTINGS.
11.   Click on the IP Configuration of the NIC.
12.   Once this opens, click on Enabled for Public IP address settings.
13.   Then on Configure required settings click on it and the + Create new and accept the defaults.
14.   Click OK.
15.   Then click the Save icon to save the changes.
16.   Once it is saved, make note of your PUBLIC IP ADDRESS.
NOTE: Your Public IP address will be different than the referenced address above. This one is just used as an example.
17.   Within the Learn on Demand environment, log onto MgmtServer1.
18.   On the desktop open Putty.
19.   In the Host Name (or IP address) section enter the public IP of ubuntu01-test running in Azure. Click OK.
20.   At the security alert window click Yes.
21.   Login with the following credentials:
a.      admin_user
b.      Password~1
22.   Ensure you receive a successful login message.

23.   Now we need to remove the public IP address we manually entered. When doing this in production, you would have connectivity to Azure and would be able to connect to a Private IP address and this process would work without the need for a manual Public IP Address configuration.
24.   Click on IP configuration, then the IP Configuration option, change the Public IP Address to Disabled and click Save.
25.   After disabling the Public IP, wait for the notification to occur that the network interface is saved.

26.   Now browse back to the ubuntu01-test resource group.

27.   Find the Public IP Address that was created manually.
28.   Click on it, then click Delete when the settings overview opens.
29.   Confirm the prompt with Yes.
30.   Wait for the notification that the public IP address has been deleted.
31.   Back within the Azure portal, click in the Notifications area and click on the test failover job (waiting on user input).
32.   On the Test failover Site Recovery Job blade click on Complete Test.
33.   On the Complete Test Failover blade enter notes indicating a successful test. Check the box beside The test failover is complete. Clean up the test environment. Click OK.
34.   Monitor the status of the remaining tasks in the failover job.
35.   Click on Resource Groups and validate that the ubuntu01-test 
You have successfully configured Azure Site Recovery to protect a Linux server running on Hyper-V, and performed a test failover into Azure.

No comments: