In this post I will create a Windows Server 2016 Datacenter and then do an automatic failover to another region with Azure Site Recovery. Azure Site Recovery is part of the AZ-303 exam for becoming an Azure Solution Architect.
Watch Azure Site Recovery in preparation for the AZ-303 exam
I have already created a Windows Server 2016 Datacenter in Azure. Checkout a previous post about how to Create a Windows Server 2016 Datacenter VM. After that we need the IIS Server. Here is how you can do this: Installing Internet Information Service (IIS).
I will first make a minor change in the IIS Server so we are sure that we did a correct failover later.
I make a minor text change and add ` - DR` in the title.
Minor html change in IIS Server
I took the public IP address that we can see in the overview of the virtual machine. If you don’t have a public IP address, you can watch the Video about Azure Site Recovery where I will walk through this. Everything works fine.
Testing changed IIS server
Switch now over to the Azure portal and select your virtual machine. In the menu you’ll find Disaster Recovery where you can choose the target region. It’s the region that Azure will use to deploy a failover VM for you.
Target region for failover of Azure Site Recovery
Set your target settings. Target settings
The Cache storage account is where the source VM data will be stored.
Storage settings for Azure Site Recovery
Replication Settings is where you tell Azure what Recovery Vault Service you would like to use.
Replication Settings for Azure Site Recovery
I also set Extension settings with an Azure Automation Account so the entire failover flow will be managed by Azure.
Extension settings for Azure Site Recovery
Now when we take a look in the Backup Service Vault that we use, we see that an initial job for replication is in progress.
Enable replication for Azure Site Recovery
Enable replication for Azure Site Recovery takes time, in my case 25 minutes. I will now go over to my VM and initiate a test failover.
Start test failover
You will get asked to set the virtual network. Remember that we do a test failover and it might be a good idea to choose a different virtual network the current region.
After some while, the test failover VM is ready to test. What’s still missing is a public IP address. Follow the Video about Azure Site Recovery where I will walk through this.
VM with private IP address
VM with public IP address
Finally I test the failover VM with the new IP address.
Test of failover VM