Bougiefever

Sharing my technical journey

Azure Site Recovery

Azure Site Recovery (ASR) is a disaster recovery service for Azure VMs. In the event of a disaster, you can failover your VMs to a different Azure region. ASR will recreate your Virtual Network, and create the new VMs using point-in-time recovery points. For some applications, it is important to failover certain VMs together as a set. For example, if you have several VMs that are each nodes for a service, they need to failover as a group. In addition, you may have a requirement that the VMs be brought back online in a certain order. ASR can handle all of that.

Set up a test environment

First, let’s set up a couple of VMs so we can see how it works.

Create a resource group

  1. Go to the Azure portal and click the green plus in the upper left corner to create a new item.
  2. Type “Resource” and press enter. Select “Resource Group” to create a new resource group. Click the “Create button” in the blade that opens up.
  3. Fill in the new resource group name, subscription, and region. Items in the resource group can be located in a different region. This is simply a logical grouping of resources.

Create Virtual Network

We will create just one virtual network that will contain all of our assets.

  1. In the resource group you just created, click the “Add” button.
  2. Define the name, address space, and subnet information.
    1. Name of virtual network
    2. Address space in CIDR notation
    3. Select your subscription
    4. Select the resource group you just created
    5. Select a region. All of the other assets should also be created in this region
    6. Name your subnet or accept the name “default”
    7. Select the address space for the subnet. You can accept the default.

Create VMs

We will create a couple of VMs to test with. 1. Click the green “Add a resource” button in the upper left corner of the Azure portal and select “Compute”. Click on “See all” to get an expanded list of available VMs in the Azure Marketplace.

2. You can narrow the selection by operating system.
2. Fill out the basic information for a new VM.

  1. Select your subscription
  2. Select your resource group
  3. Give the VM a name that will be unique in your virtual network
  4. Select the same region as your resource group
  5. Make sure the image selected is the one you want
  6. You can change the size of the VM by clicking “Change size”
  7. Select “Password” for authentication type, and fill in the username and password you want to use. Make a note of it since you won’t be able to view the password later.
  8. Open up the SSH port so you can log into your VM using SSH.

  9. Select OS disk type
  10. Add any data disks
  11. Select the virtual network you created earlier
  12. Select the subnet
  13. Accept the name for the public IP address
  14. Click “Review + create” to validate your selections
  15. On the final screen, make sure you see “Validation passed”, and then click “Create”

After a few minutes, you should see “Your deployment is complete”. Set up a second VM similar to the first one so we can test failing over a group of VMs together.

Setting up Azure Site Recovery

We will set up Azure Site Recovery to test failing over our VMs. To test the VM failover,

Create a Recovery Vault


Share