Okay, time to get this series started again. Sorry for the delay, but it turns out moving to a new apartment took a bit more time and energy than expected 🙂 On the other hand, I have fiber at home now, so ASR will be way quicker 😉 This post will focus on what you need to prepare Hyper-V environments, that are *not* managed by VMM.
Links to other posts in this series:
Azure Site Recovery – Part 1 – Introduction
Azure Site Recovery – Part 2 – Getting Started with Recovery Services Vault
Azure Site Recovery – Part 3 – Hyper-V to Azure (this post)
Azure Site Recovery – Part 4 – VMM to Azure (next post)
Overview
When our Hyper-V hosts are not managed by VMM, we have to add them individually to Azure Site Recovery. Before adding the hosts, we have to create a Hyper-V Site in ASR. A Hyper-V Site contains all the Hyper-V hosts, within a given location. In the example below, I create a site named Buegaarden (my home), and after that, I add a host to an existing site named Tonsbakken (the office).
Prerequisites
- A server with Hyper-V role installed and configured
- A Recovery Services Vault
Create Hyper-V Site
First we need to define a Hyper-V Site, which is a location where we have Hyper-V hosts. This could be your datacenter, a branch office or anywhere else you have servers.
Go to your Recovery Services Vault, select Settings, and then Site Recovery Infrastructure:
From there, select Hyper-V Sites and +Hyper-V site in the top:
As you can see above, I already have site defined, which is the street name of our office. In the Name field, type the name of your location. I this case I’m adding my home street and click OK.
The site will quickly show up, but there not much information – yet:
To create a new Hyper-V site using PowerShell, the following commands will help you:
[powershell]
$rgName = "CloudpuzzlesASR"
$vaultName = "Cloudpuzzles"
$siteName = "Tonsbakken"
$vault = Get-AzureRmRecoveryServicesVault -ResourceGroupName $rgName -Name $vaultName
Set-AzureRmSiteRecoveryVaultSettings -ARSVault $vault #Connect to vault
New-AzureRmSiteRecoverySite -Name $siteName
Get-AzureRmSiteRecoveryJob #Check job status
[/powershell]
Add Hyper-V host
Now we can start adding hosts to our site. To do this we need to install an agent on the host. Go to Hyper-V Hosts in the Site Recovery Infrastructure blade, and select +Server:
Click the Download button in step 3. to download the agent. We also need a registration key to register the host with our vault. Select the Hyper-V site to use, and click Download (which is behind the drop-down menu…):
Copy the two files to your host. Then run AzureSiteRecoveryProvider.exe. In the first screen, I recommend turning on updates throuogh Microsoft Update:
In case you want to change the install location, do it on the next page:
Let the setup complete, and then click Register:
On the first page of the Registration Wizard, make sure you have internet connectivity. If not, then check your proxy settings etc.
On the Vault Settings page, browse to the vault key file we downloaded previously, and check that it matches the correct Hyper-V site etc.
When you click next, the registration process will start. This includes creating certificates, configuring and registering with the vault etc:
If you open up Certificate management for the local computer, you can see the certificate under PersonalCertificates:
In the Azure portal, you should also see the server added (nevermind HV01, that’s for another post):
And if you click it, you can see it’s configuration, refresh the server, and renew the certificate.
Scripting the installation and registration goes as follows (make sure you have downloaded the provider to the path in $path variable):
[powershell]
#Install provider
cd $path
.AzureSiteRecoveryProvider.exe /x:C:tempasr /q
.ASRsetupdr.exe /i
#Register provider with vault
cd "C:Program FilesMicrosoft Azure Site Recovery Provider"
.DRConfigurator.exe /r /FriendlyName $hostName /Credentials $vaultFile.FilePath
[/powershell]
That’s it for now, next post will look into VMM configuration! 🙂
Images did not show up properly on this page
LikeLike
Yeah, I’m trying to fix that, thanks for pointing out. Meanwhile, you can right click and open the picture in new tab (in Chrome at least).
LikeLike