Hyper-V Host Patching – Cluster Aware Updading vs. Virtual Machine Manager Fabric Patching

Windows Server 2012 Logo

In the past weeks I was giving a Windows Server 2012 Hyper-V workshop to customers and as we went to the Hyper-V host management I talked about how you can update your Hyper-V infrastructure and how you can automatically update your Hyper-V cluster.

If we do not think about System Center Orchestrator we have basically two solutions to fully upgrade our Hyper-V clusters first is the System Center Virtual Machine Manager Fabric Patching which is available since System Center 2012. The second one is a new one called Cluster Aware Updating which is included in Windows Server 2012.

Both solutions do basically the same thing and using the same concept:

  1. Scanning the Hyper-V host for updates
  2. Putting the first node in maintenance mode and pause the node in the cluster
  3. Moving all virtual machines to other nodes of the cluster
  4. Installing the patches
  5. rebooting the server
  6. checking if all services are up again
  7. stop the maintenance mode
  8. start doing the same with the next node

This is basically what both solutions are doing, but there are small differences between them and both have advantages and disadvantages.

Cluster Aware Updating (CAU)

  • Moving not only virtual machines to other nodes, it does also move other cluster roles and cluster disks to other nodes
  • Cluster Aware Updating can use different update sources (Windows Update, Microsoft Update, WSUS, SCCM,…)
  • You can apply hotfixes via CAU
  • Cluster Aware Updating has APIs for third party vendors
  • You can do driver or firmware updates via CAU
  • You can schedule it via Self-Updating mode
  • Run pre- and post-scripts
  • Update Approval process over WSUS or SCCM
  • Only supporting Windows Server 2012
  • Coordination via cluster role

System Center Virtual Machine Manager

  • Does only move virtual machines to other nodes
  • Needs a WSUS server where the updates come from
  • Only updates which can be installed via WSUS
  • Virtualization (Fabric) Administrator will create update baselines and approve updates
  • Not third-party integration
  • Log – logs which administrator approved the updates
  • Integration in System Center Operations Manager, sets host in maintenance mode on SCOM so no alerts are generated.
  • Role based update management
  • Supports Windows Server 2008, Windows Server 2008 R2 and Windows Server 2012 Hyper-V.
  • Coordination via Virtual Machine Manager

Both solution do a great job and can of course be extended by using Windows PowerShell, System Center Orchestrator or third-party products.

The two main differences are Windows Server 2012 Cluster Aware Updating is definitely the newer solution with extensibility for third-party solutions with support for other cluster roles not just Hyper-V. Where System Center Virtual Machine is the clear winner, is where you have security roles in place and you need logs and other security features. And System Center Virtual Machine Manager has also a connection to System Center Operations Manager which lets you set Hyper-V nodes to maintenance mode.

Migrate Hyper-V Cluster to Windows Server 2012 Hyper-V via Cluster Migration Wizard

Windows Server 2012 Logo

If you have already an existing Windows Server 2008 R2 Hyper-V cluster and you want to upgrade to Windows Server 2012 you have two options. The first one is by moving all virtual machines via System Center Virtual Machine Manager from the old Cluster into a new cluster. The second way to do it, is to use the Cluster Migration Wizard which is part of Windows Server 2012.

In my case I have two clusters one “old” Windows Server 2008 R2 Hyper-V cluster and my new Windows Server 2012 Hyper-V cluster. Both Clusters are fully configured and both have access to the same disks/LUNs. The disk and all the VMs are running on the old cluster.

On the new cluster you can start the Cluster Migration Wizard.

Failover Cluster Manager Migrate Roles

This will bring up the Cluster Migration Wizard. The wizard will ask you about the old cluster.

Cluster Migration Wizard Old Cluster

The Cluster Migration Wizard will scan the old cluster for CSVs and Cluster roles. You have to select the Cluster Shared Volume you want to migrate to the new cluster. Note: you can only migrate CSVs including all virtual machines running on this CSV and not just single virtual machines. If you want to migrate single virtual machines you could do a Hyper-V Export/Import or using System Center Virtual Machine Manager.

Cluster Migration Wizard Old Cluster Roles

Since the Cluster Migration Wizard detects the roles as Hyper-V virtual machines he also asks for the new Hyper-V Virtual Switch.

Cluster Migration Wizard Hyper-V Virtual Switch

You get a quick summary with all the information what the Migration Wizard will do, and you can migrate all roles. This means the Migration Wizard will create all cluster roles on the new cluster but will not take the existing VMs offline the VMs at this point are still running on the old cluster. You also get a Failover Cluster Migration Report at the end.

Failover Cluster Migration Report

This report also shows you what’s next:

All the clustered services and applications selected for migration were migrated successfully. You may now take the clustered services and applications offline in your old cluster. Also take offline Cluster Shared Volumes used by any migrated roles, as well as storage pools for virtual disks used by any migrated roles. Then these disks, Cluster Shared Volumes, and clustered services and applications can be brought online in your new cluster.

In the new cluster you can now see the roles which are all turned of because there are still running on the old cluster. And you can also see the CSV which is offline on the new cluster and online on the old cluster.

Failover Cluster Migration new roles

As already mentioned we had no downtime until now. Now you can go and shutdown all the virtual machines running on your old cluster and take the migrated CSV offline.

Failover Cluster Migration shutdown VMS

Take the CSV offline

Failover Cluster Migration take CSV offline

On the new cluster bring the CSV online

Failover Cluster Migration bring CSV online

Bring the virtual machines on the new cluster back online.

Failover Cluster Migration bring VMs back online

And this is more how you can migrate a cluster. Remember there are still some tasks left.

There is also a great video from Symon Perriman and Rob Hindman, a Program Manager on the Windows Server Clustering & High-Availability team, in which they explain how you can upgrade to Windows Server 2012 Hyper-V.

 

How to make an existing Hyper-V Virtual Machine Highly Available

Windows Server 2012 Logo

If you have a running Hyper-V Virtual Machine with is not part of a cluster you can make this virtual machine highly available via the Failover Cluster Manager. First of all the Virtual Machine has to be stored on a shared storage. In Windows Server 2008 R2 this means the Virtual Machine and the attached Virtual Disks had to be stored on a Cluster Shared Volume (C:\ClusterStorage\…), with Windows Server 2012 the VM could also be stored on a SMB 3.0 file share.

Windows Server 2008 R2 Make Virtual Machine Highly Available

And there is also a big difference in Windows Server 2008 R2 Hyper-V and in Windows Server 2012 Hyper-V. In Windows Server 2008 R2 the Virtual Machine had to be offline during you add the VM to the Cluster, and in Windows Server 2012 you can do this online.

First open the Failover Cluster Manager and right click on your Cluster Name in the menu select “Configure Role”

Windows Server 2012 Failover Cluster Manager Configure Role

This started the High Availability Wizard. First select the role you want to make high available, in the Hyper-V case this is “Virtual Machine”.

Windows Server 2012 Failover Cluster Manager High Availability Wizard

Now select the Virtual Machine you want to add to the cluster. Note: In Windows Server 2012 the Virtual Machine can be online, in Windows Server 2008 R2 the Virtual Machine had to be offline.

Select Virtual MachineAfter clicking next on the wizard, you the VMs will be added to the Failover Cluster.

Btw. thanks to Philipp Witschi (itnetx), who I now owe a dinner.

 

How to build a iSCSI Target Cluster on Windows Server 2012

Windows Server 2012 Logo

In Windows Server 2012 Microsoft introduced the new iSCSI Target which is now build in to Windows Server 2012 which allows you to connect to storage presented by your Windows Server.

There are a lot of new way how you can present storage to your servers especially for Hyper-V. With Windows Server 2012 Hyper-V you can use block storage like iSCSI or Fiber channel or the new introduced SMB 3.0 file storage as your shared storage for your Hyper-V Clusters. Now I am a huge fan of the new SMB 3.0 solutions which allows you to place Hyper-V virtual machines on a SMB file share, but there maybe other applications and scenarios where you need to present storage via iSCSI.

The new iSCSI Target which is build in to Windows Server 2012 is pretty cool. If you are interested to use the Windows Server 2012 iSCSI Target on a stand-alone host in your lab you should checkout my blog post: Create a Windows Server 2012 iSCSI Target Server 

However if you need to run the iSCSI Target in a production environment you will have a single point of failure and in this case you should cluster your iSCSI Target. To build a iSCSI Target Cluster is pretty simple, first install all the roles on both cluster nodes. After this create a new Failover Cluster as you would with Hyper-V or other applications.

If your cluster is up and running you can now add the iSCSI Target Server role.

iscsi Target Cluster 01

Setup the iSCSI Target with a IP address and a name.

iscsi Target Cluster 02

Choose the Cluster Storage which should be used for your iSCSI Target. Later you will setup VHDs on this shared Cluster Disk.

iscsi Target Cluster 03

After you have checked the summary the iSCSI Target Server role will be created.

iscsi Target Cluster 05

The iSCSI Target Server role has been created the storage you have added to the iSCSI Target will be assigned to it.

iscsi Target Cluster Storage

The ISCSI Target Server resource will be online. It’s also highly recommended that you use multiple NICs for you hosts and also use MPIO on the machines which will connect to your iSCSI Target.

iscsi Target Cluster iSCSI Target Server Role

The iSCSI Targets have to be created back in Server Manager. Connect to the cluster node where the iSCSI Target Server is running on.

iSCSI Virtual Disk Server Manager

Select the new space where your Virtual Disk should be placed. The wizard will automatically detected the Cluster role in my case “ISCSI02″ and the volume which is attached to this role in my case “Volume E:”

iSCSI Virtual Disk 02

After this is done you have to enter the name of the this and if you don’t have one already you have to create a iSCSI Target.

You can connect multiple disks to a iSCSI Target and you can create multiple iSCSI Targets on your iSCSI Target Server, and maybe you will create even multiple iSCSI Target Server on your cluster so you can create a “static” load balancing where the Target Server 1 is running on the first host and the Target Server 2 on the second host.

 

Failover Cluster Manager Error caused by KB2750149

Hans Vredevoort (MVP Virtual Machine) yesterday reported a issue with one of the January updates for Windows Server 2012. After he deployed the latest Windows Updates from January to the Windows Server 2012 Hyper-V Cluster it was not possible to view the roles of this Cluster and got the following error:

Windows Server 2012 Failover Cluster Error

The issue only affect the MMC with the Failover Cluster Manager. All roles on the Cluster still run fine and without any issues.

After he reported this problem, he got a quick note from the Microsoft cluster team that KB2750149 was the cause of this problem and that the current advice is to uninstall this update until further notice.

Thanks to Hans for reporting this issue.

Windows Server 2012 Hyper-V: VM Monitoring

Windows Server 2012 RC Logo

In Windows Server 2012 Failover Clustering Microsoft offers a new feature called VM Monitoring. This feature allows you to monitor the health of applications running inside the guest operating system of a Hyper-V Virtual Machine. Now how does this exactly work and what is happening in case a service is failing.

When a monitored service fails the Recovery features of the service will take action.

Service RecoveryIn this case for the first failure the service will be restarted by the Service Control Manager inside the guest operating system, if the service fails for a second time the service will again be restarted via guest operating system. In case of a third failure the Service Control Manager will take no action and the Cluster service running on the Hyper-V host will takeover recovery actions.

VM Monitoring - Application Monitoring

The Cluster Service monitors the service thought periodic health checks, when the Cluster Service recognizes a failed service he will change the status of the Virtual Machine to unhealthy. This will trigger some recovery actions.

  • A Event log entry with Event ID 1250 will be created on the host Event log. This event can be monitored by Monitoring software like System Center Operations Manager or other tools. This will also allow to run other action or trigger System Center Orchestrator Runbooks.
  • The Virtual Machine State will be changed to “Application in VM Critical”
  • And the Virtual Machine will be restarted on the same node if the service fails again the Virtual Machine will be restarted and failed over to another node in the cluster.

Of course you can configure the Recovery Settings in the Cluster.

VM Monitoring - Application Monitoring Recovery

How to setup VM Monitoring in the Failover Cluster Manager

Before you can setup VM Monitoring on the Failover Cluster Manager you have to check for some pre-requisites.

  • The Hyper-V Host operating system must be Windows Server 2012 or Microsoft Hyper-V Server 2012
  • The guest operating system inside the Virtual Machine must be Windows Server 2012 (for Application Monitoring) for VM heartbeat the Windows Server 2012 Hyper-V integration services need to be installed on the guest operating system.
  • The VM Guest operating system needs to be in the same or a trusted domain as the Hyper-V host
  • The administrator of the Hyper-V Cluster needs to have local administrator rights on the VM guest.
  • The VM guest firewall needs to allow Virtual Machine Monitoring.

You can configure the Firewall inside the guest via GUI

Virtual Machine Monitoring Firewall

or via Windows PowerShell

  Set-NetFirewallRule -DisplayGroup "Virtual Machine Monitoring" -Enabled True 

The configuration of VM Monitoring is very simple. Open the Failover Cluster Manager and right click on the Virtual Machine you want to configure monitoring, select “More Actions” and click on “Configure Monitoring…”.

Virtual Machine Monitoring Configure Monitoring

 

After that you will see a list of the services running inside of the Virtual Machine and you can now select the service which should be monitored by the Cluster service.

Virtual Machine Monitoring Select Service

The Virtual Machine Monitoring can also be enabled via Windows PowerShell.

 Add-ClusterVMMonitoredItem –VirtualMachine TestVM01 -Service spooler 

Important: Another great thing about VM Monitoring in Windows Server 2012 it the possibility that this feature can be extended by third party vendors.

 

You can find more information about VM Monitoring in Windows Server 2012 on the following sites:

 

Windows Server 2012 Hyper-V Component Architecture Poster and Companion References

Microsoft released a updated version of the Windows Server 2012 Hyper-V Component Architecture Poster.
Windows Server 2012 Hyper-V Component Architecture Poster
Windows Server 2012 Hyper-V Component Architecture Poster provides a visual reference for understanding key Hyper-V technologies in Windows Server 2012 and focuses on Hyper-V Replica, networking, virtual machine mobility (live migration), storage, failover clustering, and scalability.

You can download it from the Microsoft Download Center: Windows Server 2012 Hyper-V Component Architecture Poster and Companion References

via Maarten Wijsman from Hyper-V.nu.