In the previous article of this section, you learned how to get use Failover Cluster Manager to validate, build, and connect to clusters. The exploration of that tool will continue here with the emphasis shifting to its largest Hyper-V-related functionality: the Roles section.
Each highly available virtual machine is considered a role in Failover Clustering terminology. A role includes the protected item itself as well as a set of resources used by Failover Clustering for configuration and state data about the protected item. There are a great many control points for these resources, all in a single location.
Use Failover Cluster Manager to Work with Hyper-V Virtual Machines
The very first tree item underneath a cluster item in Failover Cluster Manager’s left pane is Roles. Note that if you’re working with a new cluster, you’ll need to visit the Networking and Storage nodes first, but those are the subjects of the next section. Use the Roles node to configure and view items that the cluster is protecting. Any roles that are already configured will appear in the center pane.
How to Convert an Existing Virtual Machine to High Availability Mode
In order to add a clustered role (in this case, a virtual machine), use the Configure Role item that appears on the context menu for the Roles node. This will open the High Availability Wizard, which is a very short series of pages:
- Like other wizards in these tools, the first page is simply informational with the option to permanently dismiss it.
- The second page asks you which type of resource you wish to make highly available. Failover Clustering is not specific to Hyper-V, so you’ll find a great many options. Virtual machines and a replica broker are the only roles that are supported in a cluster of Hyper-V hosts. Replica is not being covered here, but this is where you’d go to begin setting that up. Since you’re setting up a virtual machine for this discussion, select Virtual Machine and click Next.
- The next screen will display all non-highly available virtual machines present on all nodes in the cluster. The wizard does not validate their eligibility for high availability at this time. Check the boxes for any that you wish to convert. It does not matter what the Status of the virtual machine is. This process will not interrupt a running guest. Click Next when ready.
- This is a fairly simple process, so the only thing on the Confirmation screen is a list of the virtual machines that you’ve selected to make highly available.
- The wizard will show the conversion progress and then automatically bring you to the Summary screen. Like other wizards in this tool, it includes a View Report button so you can review the status of the conversion.
If you view the report, you’ll find detailed steps that were part of the conversion. If there were any problems, they’ll be highlighted.
The virtual machine in the above image, win7, was converted while it was still on the host’s local storage. Failover Cluster Manager marked it as highly available and created all the necessary resources, but the virtual machine cannot fail over from its current node because the other node does not have access to that storage location. Take care to check the outcome of each virtual machine that you convert to high availability mode to ensure that you catch problems such as this.
The following screenshot shows Failover Cluster Manager opened to the Roles node with a virtual machine role selected. Notice how the center pane now has a lower section with information about the virtual machine. Also notice the context menu to the right.
Roles – Virtual Machine Context Menu
As with Hyper-V Manager, there is a large context menu associated with virtual machine objects in Failover Cluster Manager. However, they are not the same. The virtual machine object in Failover Cluster Manager is not exactly the same thing as the object in Hyper-V Manager because it includes additional components that make the virtual machine highly available. Failover Cluster Manager does not use a dynamic context menu so all items are always visible. If an action isn’t available, it will be grayed out. The items are presented here in order of appearance:
- Connect opens vmconnect.exe, just as it does in Hyper-V Manager. Refer to the previous section if you require more information.
- Start does what it says; it starts a virtual machine from a stopped or saved state.
- Save places the virtual machine in a Saved State.
- Shut Down attempts to perform a graceful shutdown of the guest operating system through Integration Services.
- Turn Off stops the virtual machine immediately without notifying the guest operating system.
- Settings opens the same Settings dialog as Hyper-V Manager. Refer to that section for information on the contents of that dialog.
- Manage opens Hyper-V Manager so you can perform any operations that Failover Cluster Manager does not support.
- Replication opens the Replication sub-menu, which won’t be discussed here.
Move gives you three options.
- Live Migration transfers the guest to another host in the cluster without interrupting the guest operating system. There is a brief networking interruption as the network adapters are registered in the new location. If you choose this option, you can either pick Best Possible Node, in which the cluster service will determine the best host (besides the one that it is currently running on) to move the guest to. You can pick Select Node instead if you wish to manually determine which host the guest will move to. You cannot perform a Live Migration on a virtual machine that isn’t running.
- Quick Migration saves the virtual machine if it is on and transfers ownership to another node in the cluster. As with Live Migration, you can allow the cluster to choose or you can choose yourself. You can Quick Migrate a virtual machine in any state.
- Virtual Machine Storage allows you to move the files for a virtual machine while leaving it on its current node. If the cluster has any shared LUNs connected as cluster disks or Cluster Shared Volumes, these will automatically appear as targets. You can also use the Add Share button to specify an SMB 3 or later share on another server as a transfer destination. If a cluster disk has been assigned to a virtual machine, it will also appear in this section. Once the storage locations appear in the lower left pane, you can drag and drop the entire virtual machine or individual components from the top pane to place the files. You do not need to place all files in the same location. Once you’ve placed a component, its new location will appear in the Destination Folder Path column. Press Start when you’re ready for the transfer to begin.
- Cancel Live Migration stop any Live Migration in process. This is a non-disruptive process.
- Change Startup Priority presents a sub-menu with options that change how the cluster service prioritizes a guest. This is a relative setting; multiple virtual machines will have the same settings and they will all be prioritized above any virtual machines with lower settings. Your choices are High, Medium, Low, and No Auto Start. Be aware that this setting only takes effect in response to cluster actions, such as a failover event. It is not the same as the Automatic Start Action in Hyper-V Manager. Be aware that if you set a virtual machine’s priority to Low or below, it will be Quick Migrated during a Drain (explained in the next chapter) or host shut down rather than Live Migrated.
- Information Details will become available if a recent command to the virtual machine has resulted in an error. The Information column in the center pane should contain some brief text that indicates that further information is available. Click to see a dialog with the error code and message.
- Show Critical Events opens a dialog that contains any recent critical events for the virtual machine’s cluster resource.
- Add Storage allows you to assign one or more cluster disks directly to a virtual machine. Cluster disks will be discussed more thoroughly in the upcoming section on storage. Upon clicking this item, you’ll be presented with the following dialog if any cluster disks are available:
Check the disks(s) to attach to the virtual machine and click OK.
- Add Resource has no functionality related to virtual machines. Its purpose is to add non-virtual machine resources to the cluster, which is not useful in a Hyper-V-only cluster.
More Actions opens a sub-menu with several rarely-used items.
- Show Dependency Report displays an HTML report showing the dependency of the role’s components. Virtual machines will always show a dependency upon their configuration resource.
- Configure Monitoring allows you to set up a watch on one or more services inside the guest. If the service fails, the virtual machine will be restarted. If that does not solve the issue, the virtual machine is Live Migrated. For prerequisites and other details, please refer to the following TechNet blog post: http://blogs.msdn.com/b/clustering/archive/2012/04/18/10295158.aspx
- Start Role has the same effect on a virtual machine that Start does with the addition of attempting to start its attendant Virtual machine configuration resource.
- Stop Role takes the cluster-controlled cluster offline action on the virtual machine and its Virtual machine configuration resource.
- Delete Saved State discards the saved state of a virtual machine, which deletes the saved state files and otherwise has the effect of performing a hard Turn Off operation on the virtual machine.
- Pause is the same thing as pausing the virtual machine in Hyper-V Manager; I/O, memory, and CPU operations are suspended but the virtual machine is otherwise unaffected.
- Resume reverses a Pause.
- Reset acts like a physical reset button for the virtual machine; it is sent a hard Turn Off command and then immediately turned back on.
- Remove deletes the Virtual machine configuration resource for the virtual machine, making it no longer highly available. It is then removed from all Failover Cluster Manager displays. All failover clustering data for the virtual machine is completely lost. This operation is non-disruptive to the virtual machine itself.
- Properties opens Failover Cluster Manager’s standard properties sheet for the virtual machine object. This dialog is almost identical in appearance and function to the cluster’s properties dialog, which was discussed in the previous chapter. Refer to that for instructions on how to set the virtual machine’s Preferred Owners, Failover, and Failback settings. The item that is unique to this dialog is the Priority setting on the General tab. This has the same functionality as the Change Startup Priority option on the context menu, explained above.
- Help opens the MMC help dialog with the basic Failover Cluster Manager help.
Roles Section – Lower Center Pane
Many uncommon but advanced configuration options for the virtual machine role are tucked away in the lower pane of the Roles section.
When you first access the Roles node and select a virtual machine, it will show the Summary tab as seen in the above screenshot. This contains quite a bit of useful at-a-glance information.
The only control available on this pane while the Summary tab is visible is the Preferred Owners link. If there are no particular nodes set as preferred for this virtual machine, the link will display the text Any node. If any or all node are selected as preferred, the link will display User settings. Clicking the link will bring up the Properties dialog for the virtual machine which was discussed earlier in this section and more thoroughly for the entire cluster in the previous chapter.
At the very bottom left side of this pane, you’ll find the tab controls to change the view. By default, the Summary tab is shown. The Resources tab contains controls that you can manipulate to control the high availability features of the virtual machine.
In the above screenshot, the virtual machine object has been expanded to expose its Virtual Machine Configuration object. This contains the configuration information that the cluster uses to track and control this particular virtual machine. While it has a number of settings of its own, it’s not recommended to change them. There are several redundant settings between the two items, and the most restrictive settings will apply so there is no need to change both. The Virtual machine object has more settings and is easier to locate and work with.
The first thing to be aware of is that clicking the virtual machine object in the Resources tab does change the context menu. It is similar to the context menu for the same virtual machine in the upper pane, but not all of the same menu items are available. There are two new items and one changed item. The first new item is Simulate Failure. Clicking this will cause the virtual machine to crash and then it will be handled according to the resource’s failure policies, which are outlined below. The second new item is More Actions -> Assign to Another Role. Its appearance here may have been unintentional; the interface will allow you to assign it to another role but all that happens is that the virtual machine is placed in a saved state.
The changed item is Properties. Clicking this brings up the following dialog:
On the General page, you can change the name of the resource as it appears in Failover Clustering’s resource lists. This does not affect the virtual machine in any way.
The Dependencies tab should list the virtual machine configuration resource as the only dependency. It is not advised to make any changes on this tab.
The Policies tab gives you control over how resource failures are handled. This is different from the failover process. A failover event occurs in response to an issue that is completely external to the virtual machine and its constituent resources. This tab deals with problems with the resource itself. Use the items on this dialog to configure how the cluster will respond to resource failures.
Also on this dialog is the Pending timeout section. While this setting’s applicability to virtual machines is not documented, observation seems to indicate that if a virtual machine has been issued an orderly shutdown command, this timeout is not enforced. However, it is likely enforced for Start and Turn Off actions.
The Advanced Policies tab has several unrelated settings. The first is the Possible Owners section. Each selected node is an allowed destination for a migration operation. If a node is not selected, it is not possible to use any cluster tools, manual or automatic, to migrate the virtual machine to that node. This includes drain operations and Cluster Aware Updating. The two health check interval sections allow you to override the defaults for the Virtual Machine role that were shown on the cluster’s properties dialog in the previous chapter. The final option, Run this resource in a separate Resource Monitor, is not typically of any use in Hyper-V cluster administration. It has been historically used to troubleshoot problems with Live Migration, but no such issues should exist in 2012 R2.
The Settings tab is used to control how the cluster’s automated processes interact with the virtual machine. The first, Cluster-controlled offline action, indicates to the cluster how it should handle the virtual machine when the cluster goes offline, either because someone issued a Shut Down Cluster command or because the cluster lost quorum. The default option is Save. Others are Shut Down, Shut Down (Forced), and Turn Off. The Shut Down (Forced) option waits for a length of time and then shuts the guest down if it has not shut down on its own. The wait duration is not documented.
The Virtual machine resource option allows you to choose how the virtual machine resource (which is the cluster’s representation of the virtual machine, not the VM itself) is handled when some external problem takes the virtual machine offline. This can include a failure of a monitored service. You can simply have the cluster mark it offline or you can indicate to the cluster that you want its resource to appear as failed, which will cause the cluster to attempt to fail it over to another node.
The last section is the Heartbeat setting group, which contains two options for heartbeating. The master option allows you to enable or disable the heartbeat service. This periodically verifies that the guest operating system is functional via Integration Services. The second option allows the cluster to respond to monitored services.
Next up, we’ll wrap up the tour of Failover Cluster Manager with coverage of the rest of the interface.