In the following two articles I will show you how to make a copy of virtual machines from Hyper-V to Azure and thus set up a Disaster Recovery with VM replication. How cool is that? :)
Requirements:
- Only for VMs in Windows Server 2008 R2 or higher;
- For this scenario it will be necessary a Virtual Machine with Virtual Machine Manager 2012 R2 installed (VMM) and Hyper-V 2012 R2;
- Node(s) in the Hyper-V and VMM must have access to the Internet (ports 80 and 443), so we can replicate information;
- You can create a Site-to-Site VPN for Azure DR so that there is communication between On-Premises and DR VMs (Optional);
- Like previuos point, you can create a Point-to-site network so that users can access Azure DR VMs (Optional);
- Geo-Redundant storage for VMs replicas.
Setup process:
- VPN Site-to-Site and Point-to-Site (Optional);
- Configure Storage in Azure with some specifications;
- DR settings in Azure;
- VMM and Hyper-V Settings;
- Virtual Machines Replicas;
- Test failover and failback. (PART2)
Notes:
- The replica is always carried out by Internet Connection (it does not use the VPN Site-to-Site, if any);
- In this example we have configured a Windows Server 2012 with VMM 2012 R2 that controls the communications with Azure. However, it is available the Hyper-V Replica communicating directly with Azure without requiring the VMM;
- The failback between Azure and On-Premises will fail if the original VM does not exist. That is, in case of total disaster and all VMs On-Premises are lost, it is required to download the VMs (for example);
- After adding VMs in the VMM Cloud we can not change the replication times.
VPN
Site-to-Site/Point-to-Site (Optional)
- Virtual Network Creation:
- On-Premises and Public IP networks Association:
- Create DNS servers:
- Point-to-Site Network Configuration (This is the range of addresses that VPN clients will get):
- Virtual Azure Network Configuration. In this example we have the Subnet 10.0.16.0/27 available for virtual machines:
- After all the settings are configured, we have Site-to-Site communication and clients can be connected (after we configure the VPN and certificates on the Workstation/Laptop). In this example, in On-Premises side I set up a Windows Server 2012 R2 with RRAS and the settings were generated by an Azure Script.
Configure Storage
- Creation of a new Geo-Redundant Storage (in case that the primary is not geo-redundant)
Disaster Recovery
Settings in Azure
- Click on the Azure Site Recovery (Recovery Services) and check the existing options:
- On-Premises Hyper-V to Azure (VMM Required);
- There is now a new option where we can use On-Premises Hyper-V and Azure, without using the VMM with less functionality.
- On-Premises Hyper-V to Azure to Hyper-V;
- VMware On-Premises to Azure to VMware;
- On-Premises Hyper-V with Array Replication.
The option that we will use on this Step By Step, is the first One!
- Create a new service (in this example is TesteDR)
- Generate a Key for TesteDR Vault:
- In the Dashboard click on the desired setting:
- The requirements for this:
- Click on Generate Registration Key File and Save it:
- Download the VMM Provider and install on the On-Premises VMM server:
- Browse to the file that contains the credentials that you previously downloadedand it Will appear the Vault name. In this case its TesteDR:
- Wait for the installation:
- Success:
- VMM Server will now appear on Azure as registered:
VMM and Hyper-V Settings
- Create a new Cloud in VMM:
- Select the Hosts that contain VMs for replication:
- The On-Premises networks that are visible to Azure:
- Storage for VMs:
- Profiles for this Cloud:
- The created Cloud in VMM appears on Azure as Protected Item. It's in this group where the VMs replicate are:
- Change the properties of replication before adding VMs:
- Download the Provider for Hyper-V and install it on all Hyper-V servers On-Premises:
- Insert the file of the TesteDR Vault Credentials:
- Full Registration:
- Map the On-Premises and Azure networks:
Virtual Machine Replicas
- Start Replicating VMs. There are two On-Premises VMs that will replicate in this case:
- Change to Enable:
- Both VMs will appear in Azure and will begin to replicate. After the initial replic, there are only synchronizations in intervals of 15 minutes:
- By default the Azure puts the replicated VM with a similar type (CPU + Memory) to the existing On-Premises VM, but that can be changed at any time:
- You can create Recovery Plans where we can put scripts, Multiple VMs, etc.
- The Hyper-V settings:
- The number of replicas and the status:
In the following PART of this article, I will continue with some of the VMM and Hyper-V Settings and the most importante of all, Failovers and Failbacks of some Virtual Machines!
See you!
See you!
Azure disaster recovery plan is essential for data backup recovery of lost data from the system. This blog provide very good information on data recovery
ReplyDelete