Three options exist to create and configure your cluster. You can use the Failover Cluster Command line tool (cluster.exe) on the console of your Hyper-V Server 2008 R2 boxes. The other two options relate to remote setups and include the Graphical Failover Cluster Manager and the Failover Cluster PowerShell Management Cmdlets.

We’ll use the graphical Failover Cluster Manager, since it’s a lot easier to use and less error-prone than the other two options (me and my thick fingers…).

Install the Failover Cluster Manager and Hyper-V Manager

As stated before, I will be reusing my Active Directory domain controller as a management box. This means I will be installing a couple of the management consoles. To install the Failover Cluster Manager, you need to install the Failover Cluster feature.

To install this feature in Server Manager, perform these steps:

Click Manage in the grey pane at the top of Server Manager. Select Add Roles and Features.

Click Next on the Select destination server screen, since the local host will be selected by default.

Click Next on the Select server roles screen.

On the Select features screen, scroll down through the list of available features until you reach Remote Server Administration Tools (Installed).

Expand this category, and then expand the Role Administration Tools (installed). Select Hyper-V Management Tools from the list to select both the Hyper-V GUI Management Tools and the Hyper-V Module for Windows PowerShell. Click Next.

You can start the Failover Cluster Manager from Start. The Failover Cluster Manager, the Cluster-Aware Updating, the Hyper-V Manager, and the Hyper-V Virtual Machine Connection MMC snap-ins have been added to the far right side of Start.

Now we need to perform a couple of distinct actions within the Failover Cluster Manager to make your Hyper-V failover cluster work. The first thing we’ll do is create a cluster configuration. As of Windows Server 2008, this is a simple process. After clicking the Create Cluster… hyperlink in the main pane of Failover Cluster Manager, simply click through the following screens:

On the Before You Begin screen, click Next.

On the Select Servers screen, browse for your cluster nodes and add them to the list of selected servers. Click Next when done.

On the Validation Warning screen, select whether to test your cluster and click Next. When you select to validate your cluster, click Next on the Before You Begin screen, select the tests you want to run (default is all tests), click Next on the Testing Options screen, and click Next on the Confirmation screen.

On the Summary screen, after testing, you can View Report… in Internet Explorer and/or click Finish.

On the Access Point for Administering the Cluster screen, type a name for the cluster in the Cluster Name: field and specify an IP address for each network connected to your cluster nodes. In my setup, I chose to call my Hyper-V failover cluster HVCluster and give it the 10.8.2.3 address. Clicking the Next button unlocks the next screen.

The Confirmation screen displays the key pieces of information regarding your failover cluster. Review the information and click Next. After you click this button, the cluster will be created. When creation is successfully completed, you can click the Finish button on the Summary screen.

Add disks to the cluster

Now, we can add the iSCSI targets as disks to the cluster. Perform these steps:

Start the Failover Cluster Manager MMC Snap-in.

In the left pane, expand the cluster name, then expand Storage and expand Disks.

In the right pane, click Add Disk.

Make sure both iSCSI-connected disks are selected and click OK.

Configure cluster Quorum settings

As a next step, we’ll need to configure the correct Quorum settings for our two-node failover cluster.

Perform these actions:

Start the Failover Cluster Manager MMC Snap-in.

In the left pane, right-click the cluster name, select More Actions, and then select Configure Cluster Quorum Settings.

Click Next on the Before You Begin screen.

Select Use typical settings (recommended) on the Select Quorum Configuration Option screen and click Next afterwards.

Click Next on the Confirmation screen.

Click Finish on the Summary screen.

Your cluster will now be configured with Node and Disk majority, using the 512 MB cluster disk as the Quorum (or Storage Witness) disk.

Enable cluster shared volumes

One of the cool new features in Windows Server 2008 R2 Hyper-V and Hyper-V Server 2008 R2 was a feature called Cluster Shared Volumes. This feature allows for multiple highly available virtual machines on one LUN (or target, in iSCSI terms), compared to Windows Server 2008 Hyper-V’s limit of one virtual machine per LUN.

In the left pane, expand the cluster name, then expand Storage and expand Disks.

Select the 100 GB Cluster Disk (scroll to the right to see the disk sizes).

Right-click the cluster disk and select Add to Cluster Shared Volumes from the context menu.

The label of the disk will now change to Cluster Share Volume.

The 100 GB Cluster Disk is now available to both cluster nodes as Cluster Shared Volume at C:\ClusterStorage\Volume1.

Configure the Hyper-V virtual networks

By default, a Hyper-V host does not offer a virtual network. Of course, you’d want your virtual machines to be able to communicate with the rest of the network, so we’ll need to create some virtual networks on our Hyper-V cluster nodes. We’ll use the graphical Hyper-V Manager from our domain controller to achieve this:

Open the Hyper-V Manager MMC Snap-in.

In the left pane, right-click Hyper-V Manager and select Connect to Server… from the context menu. Type the name of your first Hyper-V cluster node and then click OK on the Select Computer screen.

Click Virtual Switch Manager… in the right pane.

On the Virtual Switch Manager for <Hyper-V Node 1> screen, select External from the list of virtual switch types and then click Create Virtual Switch.

Give the virtual switch a meaningful name (like “External”) and click OK.

You will be warned that creating the virtual switch on the same Network Interface Card (NIC) as the one used for remote management will cause disrupted network connectivity. Click Yes.

Now, add the second Hyper-V cluster node to the Hyper-V Manager MMC Snap-in and create a virtual switch with exactly the same name. When done, close the Hyper-V Manager MMC Snap-in.

It’s time to put some highly available virtual machines in our newly created cluster!

Create the virtual machine

To create a highly available Hyper-V virtual machine, we need to perform these actions:

Start the Failover Cluster Manager MMC Snap-in.

Right-click the cluster name in the left pane. Select Virtual Machines… from the context menu. Then, select New Virtual Machine.

On the New Virtual Machine window, pick a Hyper-V cluster node on which to install the virtual machine. Click OK.

Click Next on the Before You Begin screen.

On the Specify Name and Location screen, give the highly available virtual machine a meaningful name. Next, select the Store the virtual machine in a different location option and make sure the newly created virtual machine will be stored in C:\ClusterStorage\Volume1. In my case, I’m creating a second domain controller to work around the dependency of the entire environment on the one domain controller. Click Next when you’re happy with your choice.

On the Specify Memoryscreen, specify a reasonable amount of memory for the new virtual machine. Then, click Next.

On the Configure Networking screen, select the external switch you created earlier, and click Next.

Click Next on the Connect Virtual Hard Disk screen when all the default settings apply.

On the Installation Options screen, we need to pay a little attention. While this screen offers the ability to install the operating system (OS) for the new virtual machine from a network-based installation server, an image file, or a physical CD/DVD, only the last option is something we can work with in this simple environment. Note that you will have to insert the OS installation media in the physical tray of the Hyper-V cluster node selected in step 3. Afterwards, click Next.

Click Finish on the Completing the New Virtual Machine Wizard screen

After the virtual machine is configured, click Finish on the Summary screen.

Install the virtual machine

Now, let’s install Windows Server on this new virtual machine. Perform these steps:

Place the Windows Server 2012 DVD in the physical tray of the Hyper-V cluster node on which you created the virtual machine.

Open the Failover Cluster Manager MMC Snap-in.

Select Roles in the left pane.

Select the newly created virtual machine in the main pane.

Right-click the virtual machine and select Connect from the context menu.

Press the green button, labeled Start, in the command bar on top of the Hyper-V Virtual Machine Connection window.

Now, follow the Windows Server setup, as laid out in Part 2 of this series, as part of the installation steps to create a domain controller.

To prove to ourselves that we have created a highly available virtual machine, we are going to live migrate the virtual machine between the two Hyper-V cluster nodes.

Prepare the virtual machine

After installation of the virtual machine, we can prepare the virtual machine for live migration. Since we have installed the virtual machine from a physical DVD, we need to detach it, since it’s local to the Hyper-V node.

Perform these steps:

Open the Failover Cluster Manager MMC Snap-in.

Select Roles in the left pane.

Select the virtual machine in the main pane.

Right-click the virtual machine and select Settings… from the context menu.

On the Settings screen, in the left pane, select the DVD drive connected to IDE Controller 1.

Select None.

Click OK.

The virtual machine does not need to be restarted for this.

Live migrate the virtual machine

Now, we can live migrate the virtual machine without problems:

Open the Failover Cluster Manager MMC Snap-in.

Select Roles in the left pane.

Select the virtual machine in the main pane.

Right-click the virtual machine and select Move from the context menu, select Live Migration, and then select Select Node….

Select the other Hyper-V cluster node, and click OK.

The virtual machine will now live migrate between the two Hyper-V cluster nodes. This means the computing power of the other Hyper-V cluster node will be used from this moment on.