Windows Server 2012 Hyper-V Cluster – Part 4: Setup

With all the hosts in place, it’s time to tie them together in the Hyper-V Cluster grand setup!

Sander BerkouwerMVP By Sander Berkouwer - Thu, September 19, 2013 - 0 comments

Sander Berkouwer is a Microsoft Certified Professional and a Microsoft Most Valuable Professional (MVP) with over a decade of experience in IT.

Articles in this series

Windows Server 2012 Hyper-V cluster

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…).

Task 5: Configure the cluster

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:

  1. Click Manage in the grey pane at the top of Server Manager. Select Add Roles and Features.
  2. Click Next on the Before you begin screen.
  3. Select Role-based or feature-based installation on the Select installation type screen. Then, click Next.
  4. Click Next on the Select destination server screen, since the local host will be selected by default.
  5. Click Next on the Select server roles screen.
  6. On the Select features screen, scroll down through the list of available features until you reach Remote Server Administration Tools (Installed).
  7. 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.
  8. Next, expand the Feature Administration Tools and Failover Clustering Tools. Select Failover Cluster Management Tools and then click Next.
    Failover Cluster Management Tools
  9. Click Install on the confirm installation selections screen.
  10. Click Close when installation is done.

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.

Create the cluster

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:

  1. On the Before You Begin screen, click Next.
    Create Cluster 1
  2. On the Select Servers screen, browse for your cluster nodes and add them to the list of selected servers. Click Next when done.
    Create Cluster 2
  3. On the Validation Warning screen, select whether to test your cluster and click Next.
    Create Cluster 3
    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.
  4. On the Summary screen, after testing, you can View Report… in Internet Explorer and/or click Finish.
    Create Cluster 4
  5. 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.
    Create Cluster 5
  6. 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.
    Create Cluster 6

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.

  1. In the left pane, expand the cluster name, then expand Storage and expand Disks.
  2. In the right pane, click Add Disk.
  3. 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:

  1. Start the Failover Cluster Manager MMC Snap-in.
  2. In the left pane, right-click the cluster name, select More Actions, and then select Configure Cluster Quorum Settings.
  3. Click Next on the Before You Begin screen.
    Configure Cluster Quroum
  4. Select Use typical settings (recommended) on the Select Quorum Configuration Option screen and click Next afterwards.
  5. Click Next on the Confirmation screen.
  6. 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.

Enabling this feature, luckily, is quite simple in Windows Server 2012:

  1. Start the Failover Cluster Manager MMC Snap-in.
  2. In the left pane, expand the cluster name, then expand Storage and expand Disks.
  3. Select the 100 GB Cluster Disk (scroll to the right to see the disk sizes).
  4. 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:

  1. Open the Hyper-V Manager MMC Snap-in.
  2. 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.
  3. Click Virtual Switch Manager… in the right pane.
  4. 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.
  5. Give the virtual switch a meaningful name (like “External”) and click OK.
  6. 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.
    Pending changes will disrupt network connectivity

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.

Task 6: Create a highly available virtual machine

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:

  1. Start the Failover Cluster Manager MMC Snap-in.
  2. Right-click the cluster name in the left pane. Select Virtual Machines… from the context menu. Then, select New Virtual Machine.
  3. On the New Virtual Machine window, pick a Hyper-V cluster node on which to install the virtual machine. Click OK.
    Create New Virtual Machine 1
  4. Click Next on the Before You Begin screen.
  5. 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.
    Create New Virtual Machhine 2
  6. On the Specify Memory screen, specify a reasonable amount of memory for the new virtual machine. Then, click Next.
    Create New Virtual Machhine 3
  7. On the Configure Networking screen, select the external switch you created earlier, and click Next.
    Create New Virtual Machhine 4
  8. Click Next on the Connect Virtual Hard Disk screen when all the default settings apply.
    Create New Virtual Machhine 5
  9. 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.
    Create New Virtual Machhine 6
  10. Click Finish on the Completing the New Virtual Machine Wizard screen
  11. 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:

  1. Place the Windows Server 2012 DVD in the physical tray of the Hyper-V cluster node on which you created the virtual machine.
  2. Open the Failover Cluster Manager MMC Snap-in.
  3. Select Roles in the left pane.
  4. Select the newly created virtual machine in the main pane.
  5. Right-click the virtual machine and select Connect from the context menu.
  6. Press the green button, labeled Start, in the command bar on top of the Hyper-V Virtual Machine Connection window.
    Start virtual machine

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.

Task 7: Live migrate the virtual machine

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:

  1. Open the Failover Cluster Manager MMC Snap-in.
  2. Select Roles in the left pane.
  3. Select the virtual machine in the main pane.
  4. Right-click the virtual machine and select Settings… from the context menu.
  5. On the Settings screen, in the left pane, select the DVD drive connected to IDE Controller 1.
    Select the DVD drive connected to IDE Controller 1
  6. Select None.
  7. 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:

  1. Open the Failover Cluster Manager MMC Snap-in.
  2. Select Roles in the left pane.
  3. Select the virtual machine in the main pane.
  4. Right-click the virtual machine and select Move from the context menu, select Live Migration, and then select Select Node….
  5. Select the other Hyper-V cluster node, and click OK.
    Move virtual machine

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.

Further steps

In this series, we’ve created a simple Hyper-V failover cluster based on iSCSI. We’ve also used the #1 benefit of this setup: the ability to live migrate virtual machines.

Of course, this kind of cluster setup might not suit your needs 100%, but it can provide the solid foundation you need.

Series NavigationWindows Server 2012 Hyper-V Cluster – Part 3: Shared Storage -

-1+1 - Rate this post
Loading ... Loading ...
Your question wasn't answered? Ask in the new 4sysops forum!
===Leave a Comment===

Login

Lost your password?