Thursday 19 February 2015

Setting up a Hyper-V Replication Cluster with Server 2012 R2

The below outlines how to setup a basic three member failover cluster (including a file share witness.)

Hardware Setup:
-          x2 8GB Servers w/ 120GB Disk. (VHOST01 and VHOST02)
-          x1 8GB Server /w 500GB Disk (SAN)

Firstly we will enabled Virtualization Extensions on both VHOST01 and VHOST02 from the BIOS and restart the servers. A Hyper-V cluster requires an active directory so we will install ADDS and setup a new forest on VHOST01 and then join VHOST02 to the domain.
Now we can install the Hyper-V role (including the management tools) on both servers and proceed to setup the cluster. We will need to install the Cluster feature:
Install-WindowsFeature –Name Failover-Clustering –IncludeManagementTools

We will create a new VSwitch for our replication traffic (on it's own network) and one for the management network: 

New-VMSwitch “DEVNET” –NetAdapterName “Ethernet 2” –AllowManagementOS:$True

** It is also worth noting that once this command is run, Hyper-V creates a virtual switch using the “Hyper-V Extensible Virtual Switch” module that is used on the physical NIC – while disabling IPv4, IPv6 etc – all of these are enabled / routed to the virtual NIC instead.
Let’s use the subnet mask of for the network, so we can have up to 6 hosts in the cluster – although for this example we will only be using two nodes in the cluster.

Make sure that both nodes of the cluster have the same NIC names / exact setup!
Verify the consistency of the adapters using “Get-NetAdapter” and confirming with the Hyper-V switch manager.

We can run a cluster test as follows:

Test-Cluster -Node,

Once the cluster has been provisionally approved it we can proceed to create it:

New-Cluster –Name DEVNETCLUSTER01 –Node, –StaticAddress

We can then complete our quorum by adding our File Share Witness:

Set-ClusterQuorum –Cluster DEVNETCLUSTER01 –NodeAndFileShareMajority \\FILESERVER01\WitnessShare    


Post a Comment