In this post we are going to see how to setup ASR for VMM clouds. For this scenario I have used one VMM cloud called ASR Cloud that contains one Windows Server 2012 R2 Standard VM. Also I have another Linux VM in this cloud that is also protected using ASR.
Create the Azure Site Recovery Vault
- Login to the Azure Portal
- Click NEW
- Click Recovery Services
- Select Site Recovery Vault
- Give it a proper name and select your region of preference. Make sure you use the same region across all your ASR components to avoid sync issues.
Creating a storage account is pretty much straight forward. But make sure you select the same region as your ASR vault and Geo Redundant as the replication type.
- Click the Site Recovery Provider you just created and select “Between an on-premises site and Microsoft Azure” from the drop down list.
- Click generate Registration Key and save the registration key.
- In the Dashboard select and download the Microsoft Azure Site Recovery Provider for Installation VMM servers
- Double click the setup file and install the Provider.
- Select the check box to automatically restart VMM service after the installation.
- Opt out Windows Update if you don’t wish to proceed with the automatic ASR provider updates.
- If you have a proxy enabled for Internet connect specify the settings.
- Select the generated certificate so it will detect the vault automatically.
- Select Synchronize Cloud Meta data check box so that it will sync the metadata of your VMM clouds with ASR. This step is optional so consider this if it doesn’t conflict with your organizational policy. This happens only once and you can sync each cloud in your VMM individually in the cloud properties of VMM.
- Data Encryption option allows you to provide a SSL certificate that will be used in data decryption between On-premise to Azure. This needs to be kept safe as you will need it to perform a fail over from on-premise to cloud if you supplied one here.
- The ASR Provider is complete and the wizard will tell you if your VMM sever has been successfully registered with the ASR service or not.
- Click the Site Recovery Provider you just created and download the Agent for Hyper-V Hosts from the main page.
- Make sure pre-requisites are met before proceeding with the installation.
Configuring Cloud Protection
Now that you have successfully installed everything required it’s time to configure the protection settings for the cloud that you need to be protected by ASR.
- Click Set up protection for VMM clouds on the quick start page
- Click the cloud that you need to protect from Protected Items tab and then click Configure.
- Select Microsoft Azure as the target.
- Select the storage account you have created for ASR VMs.
- Turn off Encrypt stored data – whether data should be encrypted and then replicated between the on-premises site and Azure.
- Leave the default value for Copy frequency – This defines the replication frequency between the two sites. Once this has been set it can be only changed from here itself not from VMM.
- Leave the default value for Retain recovery point – Zero means that only the latest recovery point for a VM is stored on a replica host server.
- Leave the default value for Frequency of application-consistent snapshots. – This value defines how often you need to create snapshots for your VMs. If you supply a value here make sure it is always less than the number of recovery points specified earlier.
- Enter a value for Replication start time for the initial replication of data to Azure.
Once you click save it will start the initial replication between your on-premise VMM server to Azure. Note that this will take some time depending the size of the VHD. If you need to view the status of the replication you can click Jobs tab and see individual details for each job.
Configure Network Mapping
You can safely test the fail over in an isolated environment. However for a planned or unplanned fail-over to happen seamlessly you should map an Azure VM network with your on-premise VMM VM network. You can follow below two guides from Microsoft to setup Network Mapping.
Enable Protection on VMs
Now we can enable protection on VMs. Please note that some of the below screenshots refer the Linux machine I have on my VMM cloud but don’t worry steps are same for Windows server VMs as well.
- Select the VM from VMM and click properties
- Click Configure Hardware section
- Click Hyper-V Recovery Manager and click the Enable Hyper-V Recovery Manager protection for this VM check box.
- Select the desired Replication Frequency. This is defined in Protection settings of the Cloud in Azure portal.
- Click OK to update the configuration change on VM.
- Go to Azure portal and select the ASR Service, on the Virtual Machines tab in the cloud in which the virtual machine is located, click Enable protection and then select Add virtual machines.
- From the list of virtual machines in the cloud, select the one you want to protect.
Job progress can be viewed from Jobs section.
In the next post I’m going to demonstrate how to configure recovery plans, perform test, planned or unplanned failovers for your VMs.