How to create a Hyper-V-Cluster under Windows Server 2012 R2

It’s been a long time since my last post. The reason is I used windows-server-2012-r2.com mainly as a notebook for my training for 70-410 and 70-413. In the meantime I was busy with other thing.

Now I’m back. Main challenge for 2015 is upgrade the hyper-v-clusters in the company I work for from 2008 to 2012. And if I find the time, I will try 70-411 and 70-412. So will find some new articles here as well on my site Hyper-V-FAQ.com which is a german site.

Todays articles describes how to establish a Hyper-V-Cluster under Windows Server 2012 R2. It is nearly the same way like in 2008. Beside this you have other posiblities to establish fault taulerance environments in 2012 R2. Let’s begin.

Connect to the storage

Make shure that you have separate network for iSCSI when using it. Connecting over youre standard-connection will not work, not even in an lab environment. On the target side you need at least one for quorum (could be small i.e. 2 GB) and one for you data.

At first you have to connect to the storage. In my case it is a Server 2012 R2 which is configured as a iSCSI-Target. On the client side you have to enable the iSCSI intiator service.

Remember that your cluster nodes have to be domain-members. In some bigger environments IT Pros often establish a separate Domain for the cluster.

Simply click “initiator” on the start page.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Click “Yes” on the following screen.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Enter the Target-Adress and click on “Quick Connect”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Click on “Done” in the next screen.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Change to the TAB “Volumes and Devices” and click on “Auto Configure”. The configured devices should appear on the screen and click “OK”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Repeat the above steps on all your nodes.

Mount the volumes on one node (in disk management) and format them.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

To mount them rightclick on the Disk-Icon and click online. Right click again and choose “Initalise disk”. Click “Ok” to Continue.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Click on the volume, choose “New simple volume” and follow the wizard.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Don’t forget to add the Hyper-V-Role on all nodes like I did the first time while writing this down. (Server-Manager – Add Roles and Features – Hyper-V-Role). And don’t choose the iSCSI-Network for you’re virtual switch.

Setting up the cluster

With “Adding roles and features” in Server Manager add the feature Failover Clustering on all nodes

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Start Failover Cluser Manager on one node. Select “Create Cluster”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Select “Next”

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Select all nodes for the cluster in the next screen and then click “Next”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

It is strongly recommended to run all the validation tests. Only a successfull validated cluster is supported by microsoft. So just leave every option as it is in the next screen and click “Next”.

One more “Next” in the next screen and then choose “Run all tests”.

Click on “Next” in the next screen so that the validation begins.

Select all nodes for the cluster in the next screen and then click “Next”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

The validation takes time. When it is finsihed, you see a screen like this:

Select all nodes for the cluster in the next screen and then click “Next”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

If I remember right, I had never a case, where validation finish without a warning. In this case it was because of the iSCSI-NICs and that there is only one lan for cluster communication. On production environment, you would connect the cluster with a fault tolerant LAN-Connection and you would design different LANs for Live-Migration and Heartbeat.

After checking the Report click “Next”. You have to give your cluster a name and a IP.

Select all nodes for the cluster in the next screen and then click “Next”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

Click “Next”, check the summary and click again on “Next”. The cluster will be created and you should get a screen like this one:

Select all nodes for the cluster in the next screen and then click “Next”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

What is next with your Hyper-V-Cluster?

Next step is to add the storage to the cluster shared volume. Go to

  • Storage
  • Disks
  • Mark your storage volumes (note the quorum)
  • Click “Add to cluster shared volumes” on the right”

Select all nodes for the cluster in the next screen and then click “Next”.

Establish a Hyper-V-Cluster under Windows Server 2012 R2

What happens now is that you can access the volumes under C:ClusterStorage.

Why is this so important? Before inventing Cluster Shared Volumes (I think in Windows Server 2008 R2), only one node can access a volume at the same time. So you had to place only one VM on each volume. With Cluster Shared Volumes you can put more than one machine in the Volume, can access them simultaneously and from the same path from every node.

Next important thing is that you have to create all VMs now from the Failover Cluster:

  • Roles
  • Virtual Machines
  • New Virtual Machine

The form Hyper-V Manger well known wizard appears. You have to bear in mind that you have to put alle files on C:ClusterStorageVolumen. If you do not so, Live-Migration will fail.

If everything went right you can i.e. livemigrate a VM with the move option. Simply try it out. Most common beginner error for a failure is, that you overlooked a dependency to a non clustered ressource. This could be that you left the configuration files, or the ISO-Files in another path then C:ClusterStorage. Alway remind, that you have to put everything in there.

Did you like the article? Then I'm happy if you like and share it.
Thank you!

Leave a Reply

Your e-mail address will not be published. Required fields are marked *