Wednesday, March 7, 2012

Hyper-V Replica by example (part one)

Hyper-V Replica by example

One of the major game changer of a feature in Hyper-V 3.0 is called «Hyper-V Replica».
To get a jump start on this feature, read Aidan`s blog post here.
Since this unique individual has already documented the fun bits (the technical stuff), I won`t do it again (as other people seems to do, copy him:-) ), but rather focus on the setup.

In my lab I have a Hyper-V Cluster running Windows Server “8” Beta in my datacenter site.
I also have a stand-alone Windows Server “8” running Hyper-V. Every server has running VMs on them, and should be ideal for a proof of concept.

Let`s start with our datacenter.



1.       In Failover Cluster Manager, right click Roles and configure roles

2.       Select Hyper-V Replica Broker


3.       Complete the wizard and type the required information like IP address and name for this object.


4.       Once this is done, you can see the Hyper-V Replica Broker alive and kicking in this particular cluster


5.       After the creation, right click the Hyper-V Replica Broker in Failover Cluster Manager and configure replication.


6.       For the sake of demonstration, I have selected Kerberos, port 80 and allow replication from every authenticated server (AD authentication via Kerberos), and specified the location on one of my Clustered Shared Volumes.



7.       Once this is done, you`d probably like to configure the firewall to allow communication on the dedicated port. I selected port 80 since this port is free and available in my environment for these cluster nodes, and allows communication using this simple line of command: netsh advfirewall firewall add rule name=”HVReplica” dir=in action=allow protocol=TCP localport=80

Remember to run this cmd on every node that is a part of this cluster. What? Of course you could use PowerShell as well, yes.

Next, we have to configure replication on the VMs we want to replicate to this Hyper-V cluster, on our stand-alone Hyper-V server. (Note: you can also configure the stand-alone Hyper-V server to receive replication too, but you do this in Hyper-V Manager on Hyper-V settings, and configure the same settings as in step 6 above.


1.       Right click the VM and click Enable Replication.

2.       Type the name of the Hyper-V Replica Broker you`ve created earlier


3.       Specify the connection parameters and if you want to compress the data that is transmitted over the network. The connection parameters should represent the initial configuration you entered during the setup of the replica broker.


4.       Select which virtual hard disks you want to replicate. In this example, this particular VM has only one virtual hard disk associated with it.


5.       Configure recovery history. If you have needs to have additional recovery points available (for example on your LOB applications that’s runs in a VM) you can configure it here. In addition, you can replicate incremental snapshot using the known VSS service and define the frequency these snapshots are taken.


6.       How would you start the initial replication? Either over the network or using external media. Since I`m several hundred miles from the actual datacenter and the branch office for instance, I will replicate this over the network. But it`s a good idea to use external media so you`re not overloading your network if this is a big VM or several VMs. You can also use existing VM on the replicate server as the initial copy if  you have restored a copy of this VM.


7.       Check the overview of the configuration and finish.


8.       If the communication is allowed and the configuration is completed in a sufficient manner, you`re good to go.

Follow this blog for part two.
Cheers.




3 comments:

virtualization said...

Currently I work for Dell and thought your article on virtualization is quite impressive. I think virtualization, in computing, is the creation of a virtual (rather than actual) version of something, such as a hardware platform, operating system, a storage device or network resources.

Anonymous said...

Hi.
I did setup this over wan between to standalone hyper-v servers and it worked great. But i had to rename the name of the computer to the exact name of my external dns.
For instance if my server was located at Microsoft and was called srv, i had to name it srv.microsoft.com, create a ssl certificate called srv.microsoft.com AND make a record in my external dns named srv.microsoft.com . I also had to do this on the other server, which f.ex was called srv2.contoso.com

Is this really necessary?

Kristian Nese said...

You should be able to setup this environment as you would With anything else using SSL certificates and aliases.
It`s more related to Your DNS settings and domain name than HVR itself.