Windows Server How-To

How to Make Hyper-V Virtual Machines Highly Available

Here's how to use the Failover Cluster Manager to make virtual machines fault tolerant or to create new virtual machines.

One of the biggest disadvantages to running Hyper-V on standalone virtualization host servers is that the physical server can become a single point of failure. If a Hyper-V host server were to fail, then all of the virtual machines that are running on that server will also fail. Since a single host server typically runs numerous virtual machines, the failure of a single host server can lead to a major outage.

The solution to this problem is to make your virtual machines fault tolerant by clustering your Hyper-V host servers. I have written a separate column describing how you can set up failover clustering, so I am not going to be repeating that process here. Instead, I am going to focus on some aspects of failover clustering that are unique to Hyper-V.

Host Server Requirements
If you have ever live migrated a virtual machine then you know that in order for the live migration process to succeed there have to be similarities between the host servers. For example, the source and destination host must have similar processor architectures. Similarly, the destination host must have a virtual switch that has the same name as the virtual switch that the virtual machine is already using. Otherwise, the live migration process will ask you to connect the virtual machine to one of the virtual switches that exists on the destination host.

These same sort of limitations also come into play when you are clustering Hyper-V servers. If you read my column on setting up failover clustering then you know that the Failover Clustering Feature requires you to run a series of validation tests when setting up a failover cluster. If Hyper-V is installed on the failover clustering nodes then the validation tests will check to make sure that the nodes are configured in such a way that virtual machines can fail over from one node to another.

Perhaps the most common cause of validation test failures is a virtual switch mismatch. If a Hyper-V host contains a virtual switch then every other host in the cluster must have a virtual switch with the same name. Otherwise the validation tests will fail. Similarly, if you create a virtual SAN on a Hyper-V host then every other host in the cluster must be configured with an identical virtual SAN. Otherwise the validation tests will fail.

Making Hyper-V Virtual Machines Fault Tolerant
One of the common misconceptions about failover clustering is that the act of setting up a failover cluster for your Hyper-V hosts automatically makes your virtual machines fault tolerant. However, the Failover Clustering feature requires you to manually specify the virtual machines that you wish to make fault tolerant. Fault tolerant virtual machines are treated as clustered roles.

To make a virtual machine fault tolerant, open the Failover Cluster Manager (by choosing the Failover Cluster Manager command from the Server Manager's Tools menu) and then expand your cluster and select the Roles container. Click on the Configure Role command, found in the Actions pane, as shown in Figure 1.

[Click on image for larger view.]  Figure 1. Click on the Configure Role link.

At this point, Windows will launch the High Availability Wizard. Click Next to bypass the Wizard's Welcome screen and you will be taken to the role selection screen. Select the Virtual Machine role, as shown in Figure 2.

[Click on image for larger view.]  Figure 2. Select the Virtual Machine role.

Click Next and then select the virtual machines that you want to make fault tolerant, as shown in Figure 3. Click Next and you will be asked to confirm your selection. Click Next again and you will be taken to a summary screen confirming that the virtual machine has been made fault tolerant, as shown in Figure 4. Click Finish and the virtual machine will be listed in the Roles container, as shown in Figure 5.

[Click on image for larger view.]  Figure 3. Select the virtual machines that you wish to make fault tolerant.

 

[Click on image for larger view.]  Figure 4. You should see a confirmation that the virtual machine has been added to the cluster.

 

[Click on image for larger view.]  Figure 5. The virtual machine should be listed in the Roles container.

As you can see, it is relatively easy to make a virtual machine fault tolerant. However, you can also create brand new virtual machines directly through the Failover Cluster Manager. If you look at the figure above, you will notice that there is a Virtual Machines option in the Actions pane. Clicking this option allows you to create a brand new virtual machine without having to use the Hyper-V Manager.

About the Author

Brien Posey is a seven time Microsoft MVP with over two decades of IT experience. As a freelance writer, Posey has written many thousands of articles and written or contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and healthcare facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. When He isn't busy writing, Brien Posey enjoys exotic travel, scuba diving, and racing his Cigarette boat. You can visit his personal Web site at: www.brienposey.com.

comments powered by Disqus
Upcoming Events

Redmond Tech Watch

Sign up for our newsletter.

I agree to this site's Privacy Policy.