Azure Site Recovery can help you protect important services by coordinating the automated replication and recovery of System Center private clouds at a secondary location. The ongoing asynchronous replication of each VM is provided by Windows Server 2012 Hyper-V Replica and is monitored and coordinated by Azure Site Recovery. In the event of a site outage at the primary datacenter, VMs can be brought up in an orchestrated fashion to help restore service quickly. This process can also be used for testing recovery, or temporarily transferring services.
Now you can replicate virtual machines from your primary site directly to Azure, instead of your own secondary site. In the event of an outage at the primary site, the service orchestrates the recovery of virtual machines in Azure.
As there is already Azure Recovery manager using Azure to protect you VM between two VMM Servers. and now there is in a preview a new option Failover to Azure.
This is a great new option and will open the door to new options for your private cloud.
You can use Azure Site Recovery in the following scenarios:
- On-premises to cloud: Replicate Hyper-V virtual machines on a source VMM server or cluster to another VMM server or cluster located in the same datacenter or in a different site. You can also replicate between clouds on a single physical or virtual VMM server.
- On-premises to cloud: Replicate Hyper-V virtual machines on a source VMM server or cluster to Azure storage.
In this step by step I show you what steps to take for a working situation.
We need a VMM Server and An Azure Account with the Site Recovery Preview.
When opening the ASR ( azure Site Recovery ) We can select the recovery option. Lets pick hyper-v to Azure Recovery.
If you do not have a Certificate in place already below is the line to create a Self signed certificate.
This Certificate us needed to talk to and from the VMM Server to Azure.
makecert.exe -r -pe -n CN=Certmvpvmm12 -ss my –sr localmachine -eku 184.108.40.206.220.127.116.11.2 -len 2048 -e 01/01/2016 c:Certmvpvmm12.cer
Now that we have created the Certificate We import this in the Azure portal , On manage Certificate we can import the Cer file
Import the Cer file
I already did the Hyper-v vs Hyper-v See my blog post.
but now we pick Hyper-v to Azure. In the Dashboard step 2 there is a link for downloading the Recovery Provider for VMM
Download Microsoft Azure Site Recovery Provider and install it on VMM servers
We are installing this on the VMM Server!
After downloading we kick the setup and as we do not read all the text, I need to stop the VMM services!
So there is downtime keep this in mind VMM can also takedown your Windows Azure Pack
The setup does not need many words it is a basic next next finish setup.
However we need to use the certificate that we created and imported in Azure in the first step. I have already multiple Certs in my VMM I just need to pick the right one. So naming convention is important!
After Selecting the Key we need a vault key ! this key is in Azure generated and can be copied from azure to the VMM server.
In the Azure portal in Step 1 there is a line get your vault key
We copy the Key and past the key in the setup an Next.
I pick enable encryption just to make sure I do have a secure line.
Pick the VMM server name in FQDN
And your VMM server is ready make sure the services is started again.
The next step would be install the Microsoft Azure Recovery Services Agent on your Hyper-v Server
You can download this in step 3
Download the Microsoft Azure Recovery Services Agent, and install it on Hyper-V host servers.
The installation is just a quick install no screens to capture or things to do.
The next step is Configure a cloud that needs the protection Selecting the Vault and the Protection name as you can see the current status is not configured
Select Configure Protection
here we can select a target and we pick Microsoft Azure
A new screen with lots of settings opens
The copy Frequency is the Hyper-v Replica between Hyper-v and Azure In windows Server 2012R2 there is the option 30sec,5&15 minutes Azure is not changing this. pick any option you want but In my case I use 15 min that is more enough for me.
one this is really nice that is the Replication time most thing are starting just wen you press enter ;-( but here you pick a scheduler.
Pick any time you want but I pick do this now, there is a 60GB VM that needs to get uploaded to Azure.
Now the Cloud is Configured We enable protection for My VM’s.
Select the Name and we pick enable protection in the Virtual Machines
When selecting this option and you will see no VM’s you did something wrong ! think…
Yes you are protecting a Cloud so your VM must be in a cloud on this VMM server I have only one cloud and in this cloud are 3 vm’s
and you can see this 3 vm’s here in azure
I’ll pick the MVPAZU2 VM and again I’ll wait until Azure is finishing it process.
After this the window will show you the VM and unprotected.
You can select more VM’s but for this demo I’ll use just one VM.
When selecting the VM we can adjust the CPU and Memory in Azure
I’ll pick medium and hit the save button at the bottom!
In the Resources of the Vault we need to link the Networks. If you don’t have a network in azure you will need to create one.
Pick the VMM server as Source and the Target is Azure. The screen will list all your networks that are connected
Pick the network from the Protected network and link it to the Azure network. In my case the azure network is connected with a S2S VPN to my private network So I’ll use this network. the IP stack is showing.
As I picked Immediately as replication lets see Oh ok it is running
In the Hyper-v Manager you can see the progress. It would be nice to have it also in Azure.
My internet connection is a 1 GB but the internal routers and the networking on my Hyper-v Server needs some attention.
And if we are checking in VMM the Recovery Settings it is set to 15 minutes just as we set in Azure.
And we need to wait until the replication is done from Hyper-v To Azure this can take some time It all depends on your Internet connection
After the Replication is ready You can see that there is one VM protected and we can create a recovery plan.
Now that we have created a recovery plan this is just a step to link the VM to a recovery plan from or to Azure and what VM.
Now that the Recovery Plan is is ready we can test this with a test failover.
As we check the test failover a popup ask me on witch network the VM should connect.
In the Job status you can see a step by step overview and for completing you have to check the complete option on the bottom.
a Popup is shown where you can put in comments and set the checkbox complete. After this step the test will continue
With these Easy steps you can use Microsoft Azure As your failover DataCenter and even With One Hyper-v Server you can be always up.
If you need more info then go to the MSDN site see below for the URL
The walkthrough consists of the following steps:
- Deployment prerequisites: On-premises to Azure. Check deployment requirements, and complete the planning steps before you begin deployment.
- Step 1: Create and configure an Azure Site Recovery vault: On-premises to Azure— Create a vault and specify a vault key. Upload a management certificate (.cer) to the vault.
- Step 2: Install the Azure Site Recovery Provider: On-premises to Azure— Install the Hyper-V Recovery Manager agent on the VMM servers you want to register in the vault.
- Step 3: Install the Azure Recovery Services Agent: On-premises to Azure— Install the Azure Recovery Services agent on Hyper-V host servers located in the VMM source clouds you’re protecting.
- Step 4: Configure protection settings for VMM clouds: On-premises to Azure— Specify protection settings for the cloud, including source and target settings, recovery points and snapshots, and initial replication settings.
- Step 5: Configure network mapping: On-premises to Azure—Create mappings between VM networks on the source VMM server and destination Azure networks.
- Step 6: Enable protection for virtual machines: On-premises to Azure— Enable protection for virtual machines.
- Step 7: Create and customize recovery plans: On-premises to Azure—Create and customize recovery plans that specify how virtual machines should be grouped and failed over.