Azure Site Recovery: Hyper-V to Azure part – 5

In this series of articles, I would show how to make Azure Site Recovery work with Hyper-V- step by step.

This is part 5 of the series.

Now it’s time to test the failover.

At this point of time, we have enabled on-premise virtual machine to be protected during times of disaster. The relevant metadata, virtual machine configuration and vhd has been replicated to azure storage created for this purpose. There is no Virtual machine created during this point of time on Azure for this on-premise virtual machine. Only at the time of disaster, a new virtual machine would be provisioned on Azure as a replica of the original on-premise virtual machine. The on-premise virtual machine keeps sending its current state every 30 second/5 min/30 min as part of continuous replication.

When we start the process of testing the failover, a new cloud service and virtual machine is created on Azure and then the same can be accessed by the users.

Under Protection group | Proddrprotectiongroup | Virtual machines, select the DRVM virtual machine and click on “Test Failover” button available at the bottom of the page.


On the resultant popup, select none for network since we did not create any network and click complete button. This would start the process of testing the failover.


Following are the steps undertaken by Azure site recovery service to test the failover.


And now if we navigate to the virtual machine section, we will find that a new virtual machine named “DRVM-test” is being provisioned.


And within the same storage account provisioned earlier, a new container created storing containing the vhd blob for the test virtual machine. This is shown below.


We can also see that a cloud service is created to host our test virtual machine.


Now, we can work with this new virtual machine the same way we would have worked with on-premise virtual machine. However appropriate endpoints needs to be opened for making this work.

After you have tested the virtual machine comprehensively it time to complete the test.

TO complete the failover test, navigate to the job specific to failover test from Azure site recovery service -> jobs and click on “Compete test” button when status is shown as “waiting for action” for complete testing step.


This would popup another window asking whether clean up should happen as part of completing the test. If we mark yes for this checkbox, the cloud service, virtual machine, storage container and blob file created earlier would be deleted and azure would be back to its original state. During the entire failover test process, the on-premise virtual machine can continue to run without any downtime.


The end status after completion of test should look like below


In next part (part-6), we will continue with the step by step guide and perform an actual failover.

stay tuned!



Azure Site Recovery : Hyper-V to Azure Part – 4

In this series of articles, I would show how to make Azure Site Recovery work with Hyper-V- step by step.

This is part 4 of the series.

Now, it’s time to create the azure storage. Click on link “Create Storage account”.


On the window that slides out from bottom, provide the storage name i.e. “proddrstorage” and also location and redundancy. The location is “east asia” to maintain location consistency. This is shown below. Click on “create storage account” button. This would create a new storage account for our disaster recovery VHD and VM configuration.


Details of the storage account can be viewed by navigated to storage account as shown below.


Now, it’s time to create a protection group. Click on “Create Protection Group” from the dashboard.


This will take you to “Protected items” tab. Click on “Protected Groups” sub tab and “Create Protection Group” link as shown on below screen.


In the resultant popup window, provide Protection group name i.e. “proddrprotectiongroup” and also select the previously created hyper-v site “ProductionDRsite”.


Additional dropdown boxes would appear for selecting appropriate subscription and storage account. We should choose the same storage account that we created earlier.


Click on the complete arrow to go to next wizard window.

Select the values as shown in below screen.


Click on the complete button and the result should look like below.


The above screenshot shows that proddrprotectiongroup has been created and configured with 0 protected items. This is because we have not yet added any virtual machine to this protection group. In next step, we will be adding virtual machine to the protection group.
Also, if we navigate to Servers | Hyper-V sites, we should see below “productionDRSite” that the server on which we installed the provider and agent is visible with connected state.


Now, it’s time to add virtual machines to protection group and protect them during times of disaster.

I already have a virtual machine on my on-premise server name DRVM. It is shown below here.


It is this Virtual machine that would be used for disaster recovery. In this Virtual machine I have install IIS and have modified the start.htm page to reflect my name on it. When I browse the start.htm file, it looks like below. Notice that is shows my name.


Goto Recovery services | Protected Items | Protected Groups | proddrproductiongroup and click on it

On the resultant page, within “virtual machines” tab click on “Add virtual machines” link


On the resultant Popup window, names of all virtual machines on the on-premise server would be shown. We have just one VM DRVM and that should be visible as shown below.


Selecting the name of the virtual machine should bring more controls on the screen including the operating system type and operating system disk as shown below.


Since, DRVM is based on Windows operating system, Windows is chosen and there is only one disk so by default it is assumed as operating system disk. If there are multiple disk attached to the virtual machine, we should choose appropriate disk containing the operating system. Click on the complete button. This will start the process of protecting the DRVM virtual machine.


This is a time consuming job and consists of multiple steps as shown below.


Also, a quick look into Hyper-v manager would show that the replication has been initiated.


A new container is created within the storage account created earlier to store all the relevant virtual machine information.


Navigating to this storage container will show all the files needed to provision a virtual machine during a disaster at on-premise datacenter.


Once all the above steps are complete the protection is enabled. Starting initial replication takes a long time and is dependent on the size of your Virtual machine.

When you add a virtual machine to protection group, a lot of activities take place behind the scene. The entire configuration from protection group is sent to the Azure site recovery agent on the on-premise server and are applied to the virtual machine. The virtual machine is enabled for replication. It is provided configuration details of the replica server which in this case is Azure. All the other relevant details like copy frequency, retain recovery points, re-synchronization and more are set. The details that are set can be viewed by navigating to Virtual machine replication properties.


This completes the configuration of Azure Site recovery and our VM would still be available at the time of disaster.

In next part (part-5), we will continue with the step by step guide and test the failover.

stay tuned!


Azure Site Recovery: Hyper-V to Azure Part – 3

In this series of articles, I would show how to make Azure Site Recovery work with Hyper-V- step by step.

This is part 3 of the series.

Goto the file location where the AzureSiteRecoveryProvider.exe was download and double click on it to launch and install it on the server.

Select on for Windows update on the resultant wizard window.


Select the installation location or leave the default one and click on install button.


This would install two components

1. Azure Recovery Services Agent and
2. Azure Site Recovery Provider.


Click on Continue button to configure them.

On the resultant “Internet connection” windows, check the appropriate option button. There is no proxy server in my environment and hence I selected “Connected directly without a proxy”. The windows should show that it is connected to internet.


Click on next button and select the previously downloaded vaultcredentials file by clicking the Browse button. This would result in filling the other inputboxes. The wizard queries the Azure vault with the certificate and key data available in the vaultcredentials file for verification. The vault name should reflect productionvault and Hyper-v site should reflect productionDRsite both created earlier.


Click on next button. Now the registration process starts. The certificate information is extracted from the vaultcredentials file and installed into the local computer certificate store. If there are no error, the below screen should be visible.


Click on finish button. With this the provider is successfully installed on the hyper-v server.

In next part (part-4), we will continue with the step by step guide and create the storage account along with protection groups.

stay tuned!


Azure Site Recovery : Hyper-V to Azure Part -2

In this series of articles, I would show how to make Azure Site Recovery work with Hyper-V- step by step.

This is part 2 of the series.

Now time to get back to making azure site recovery work.

Login on to the server that has Hyper-v role enabled and have virtual machines in it.

Login to the Azure subscription and navigate to the “productionvault” dashboard. It should like shown below.


Now, it time to create a Hyper-V site.

Click on “Create Hyper-v site” link as shown on above screenshot. A popup window appears. Provide “productionDRsite” for name input and click on complete button. Again it take a while to get the Hyper-v site created.


After the Hyper-v site is provisioned, it would be appearing within the server tab as shown below.


Click on the cloud icon beside the dashboard tab as shown below to follow the next steps.


Click on “Download a registration key” link to download the vault credentials and keys.


This would pop up a window displaying the site name along with download link. Click on download link and download the vault credential file and save it on file system i.e. “C:\ASR” folder location.



Click on “Download the provider” to download the provider.


And save it to the same location at that of vaultcredentials file.


In next part (part-3), we will continue with the step by step guide and configure the downloaded provider, create the storage account and protection groups.

stay tuned!


Azure Site Recovery : Hyper-V to Azure – Part 1

In this series of articles, I would show how to make Azure Site Recovery work with Hyper-V- step by step.

This is part 1 of the series.

Login to the Azure Subscription and click on “Recovery Services” and then “New” button available below the left menu. It would slide out the option to create a new Vault for Site Recovery. This is shown in below screen


Click on “Site Recovery Vault” -> “Quick Create to create a new vault for Site Recovery. This is shown below.


Provide name and choose and appropriate nearest location. In this case, the name is “ProductionVault” and region is “East Asia”. Click “Create Vault” to actually get the process of creating the vault get-going. Even if you provide the name with upper case letters, they would eventually be converted into lower case ones. It will take around 30 seconds to a minute to create the vault.

Ensure that a Green check is shown against the name inputbox to ensure a valid name is used for the vault. The result should like below. I already have created a vault but the vault of importance is “ProductionVault”.


Click on “ProductionVault” to view all of its configuration details.

The first time you get into the details of a vault by clicking on its name, a pop up window appears which would ask the user to provide details about “User Type”, “Purpose of Vault”, what does the source environment and target environment looks like. This is user to setup default values to some of vault configuration settings.

Choose “Enterprise” for Usertype, “Evaluating Azure Site Recovery” as purpose of vault, “Hyper-V Site” as Source environment and “Azure Site” as Target environment. This is because we want Azure to act as out Disaster Recovery site and click the “Complete” button.


Following screen showing the dashboard would be displayed on the screen.


Note that Setup Recovery is already set to “Between an on-premises Hyper-V site and Azure”.

If not shown by default, select this option from Setup Recovery dropdown list as shown below.


Overall, there are multiple steps are needed to be performed in more or less as a sequence to make Azure Site recovery work. The steps are mentioned below:

1. Create Azure Site Recovery Vault – this step is already performed above.
2. Create a Azure Site
3. Choose Appropriate Setup Recovery type and download the Registration Key.
4. Download the appropriate Provider on the server with hyper-v Virtual machines running
5. Install and configure the provider.
6. Create a storage account for storing the replicated VM’s storage and configuration.
7. Create a virtual network though this step is optional.
8. Create a Protection group
9. Add Virtual Machines to the Protection group.

Before, we move ahead with configuring Azure Site Recovery it is important to understand some of its concepts and terminology.

Vault signifies a secure storage of confidential information. Vault is a container that has data encrypted within it such that it is accessible only to the privileged and that nobody can decipher the content of it.

Azure Site represents a collection of Hyper-v servers and virtual machines from these servers are replicated to same azure site.

Azure Site Recovery Provider is the client side agent installed on Hyper-v servers. They are connected to Azure Vault and are responsible for sending Virtual Machine Metadata, VHD content, coordination between azure and Hyper-v server for failover and failback and other activities like whether the server is connected or not etc.

Protection Group represents a container with similar security and other configurations.

In next part (part-2), we will continue with the step by step guide and configure, Hyper-V Site, download Registration Key and provider.

stay tuned!