«

»

Nov 27

Set up two standalone Hyper-V 2012R2 servers as replication partners

I needed to set up two physical servers, as Hyper-v servers that host replicas of eachothers Virtual machines. They do not have a shared disk resource so “Hyper-V replicas” is a way to get some safety against hardware failiures.
(I use Windows server 2012R2 standard edition because the customer wants a GUI to manage the servers)

As usual Google is my friend,  and i found a couple of articles that at least helped my accomplish this in my lab.
I am going to implement this at a customers site later on and i will update this article after that 🙂

These serveres are not joined in a domain so the replication has to be set up with certificate-based authentication.
To create certificates i use a tool called makecert.exe that is a part of Windows SDK, you can download it here :

http://msdn.microsoft.com/en-us/windows/hardware/bg162891.aspx (also works for Win Server 2012) .

So lets get to the configuration:

  1. Install the Hyper-V role on both servers
  2. Edit the host file on both servers so they can find eachother (if you can’t register the names in DNS)
  3. Create Root and server certificates with the makecert tool. (see this article http://blog.powerbiz.net.au/hyperv/how-to-create-self-signed-certificates-for-hyper-v-replication/)
    – I had to type in this commands to get it to work, copy-paste via notepad did not 🙁
    – I also edited the registry With Regedit instead of using the command i bulletpoint 5 in the article.
  4.  Configure the “Replication Configuration” in Hyper-v settings on both servers. (see this article http://www.msserverpro.com/configuring-hyper-v-replica-in-windows-server-2012-r2/)
    – Just use certificate-based authentication instead og kerberos and remember to enable the “Hyper-v Replica HTTPS listener” rule in Windows firewall.
  5. Enable replication for the vitual machines (also explanied in the article above)

Thats it ! Easy Peasy … 🙂