Do you want to implement Microsoft virtualization but on less than a shoestring budget? Do you need high availability for your virtual machines (VMs) but can't afford Microsoft's System Center Virtual Machine Manager (VMM)? Never fear, because a Hyper-V environment that supports high availability is possible for essentially no extra cost -- if you're willing to deal with a few extra manual steps.
First, some background: Microsoft's architecture for Hyper-V takes a layered approach to adding capabilities. With the Hyper-V role at its core, high availability is added by installing the Windows Failover Clustering feature. Integrated backups are added through the Windows Server Backup feature. If you want integrated management, put VMM right over the top.
The benefit of this layered approach is that upgrading a single-server environment to something more powerful can be done by simply adding new features. You can easily start small and later work up to a fully featured environment as you grow in experience, budget and comfort with the technology.
Microsoft VMM not required
Microsoft's VMM is often seen as a requirement for managing a Hyper-V environment. But this couldn't be further from the truth. Although VMM automates many common tasks for virtual environment management --and is a useful tool as an environment grows-- in reality, it is just another layer atop existing Hyper-V functionality. If you're willing to spend more time on management tasks, you can save a few dollars.
One task that requires more effort without VMM's automation is creating highly available virtual machines. This process is slightly more complex with Hyper-V alone because of the multiple steps required with native tools.
Let's assume that you've already created a set of clustered Hyper-V hosts. In a clustered Hyper-V environment, managing VMs requires the coordination of two different consoles.
To create a new highly available virtual machine, the first step is to create that VM in the Hyper-V management console. This process is the same as for creating any virtual machine on a single host: Click New > Virtual Machine, and follow the instructions in the New Virtual Machine wizard. One critical difference here is that the disk files for a new virtual machine must be stored on a shared storage disk that can be accessed by both members of the cluster. In the wizard's screen titled "Specify Name and Location," remember to check the box marked "Store the virtual machine in a different location" and select a location on shared storage.
Once the virtual machine is created, its disk files are now cluster-ready. But the virtual machine itself has not yet been made highly available. The separate Failover Cluster Management console has the resources for configuring and managing that virtual machine for high availability. Power down the virtual machine. Microsoft's Quick Migration (and Live Migration in Windows Server 2008 R2) can migrate running virtual machines, but getting them into the cluster requires them to start in the powered-down state.
To begin the process, right-click on Services and Applications, and select Configure a Service or Application. In the resulting drop-down list, select Virtual Machine and click Next. The resulting screen will present a list of all the configured virtual machines on the host. Some virtual machines cannot be configured for high availability, such as those that are not running on shared disks or that have not been powered down. Select a virtual machine, and click the Next button.
After confirming your selection, the Failover Cluster Management console will create the necessary resources to make your VM highly available. This includes resources for the virtual machine cluster, its disk and networking. Once complete, you can power on the virtual machine and operate it normally.
You'll quickly notice that it is possible to interact with highly available virtual machines using both the Failover Cluster Management and the Hyper-V Manager consoles. VMs will disappear from one host's Hyper-V Manager console when they're failed over to the other host. Once VMs have been made highly available, they may be easier to manage from within the Failover Cluster Management console than the Hyper-V console. Your mileage may vary.
To protect against the loss of a host, you should enable virtual machines for high availability . Note that additional settings can define where those VMs fail over to when that event occurs. In part two of this series, I'll describe a few of the important settings, especially as the count of hosts in a cluster grows beyond two.
About the author
Greg Shields is an independent author, instructor, Microsoft MVP and IT consultant based in Denver. He is a co-founder of Concentrated Technology LLC and has nearly 15 years of experience in IT architecture and enterprise administration. Shields specializes in Microsoft administration, systems management and monitoring, and virtualization. He is the author of several books including Windows Server 2008: What's New/What's Changed, available from Sapien Press.