Tag: Cluster

How to configure Availability Sets in Virtual Machine Manager

System Center Logo

Microsoft first introduced Availability Sets in Windows Azure and with System Center 2012 SP1 this feature also came to the Private Cloud. Availability Sets are used to keep virtual machines separate from each other so they do not run on the same physical host. This works via anti-affinity rules inside a Hyper-V host cluster, but with System Center Virtual Machine Manager allows you to do this even with standalone hosts, which makes really sense since you can move virtual machines without downtime in your whole datacenter via Shared Nothing Live Migration..

If you create an Availability Set in Virtual Machine Manager for two different virtual machines, Virtual Machine Manager will attempt to keep those virtual machines on separate hosts and avoid placing them together on the same host whenever possible. This helps to improve service update for these virtual machines, especially if you run a guest cluster for example SQL server, Exchange or even an IIS web server farm behind load balancers.

If you have configured anti-affinity rules inside a Hyper-V cluster you know that the only way to do this is via Windows PowerShell and it’s not really straightforward as we maybe wish. And as already mentioned anti-affinity rules do only work inside a cluster.

In Virtual Machine Manager (System Center 2012 SP1 or System Center 2012 R2) this is quite easy. First you open the properties of one of the virtual machines you want to include in the availability set. Select the Hardware Configuration tap and go to Availability. As you can see in my screenshot this is a non clustered virtual machine and I still can configure availability sets (Of course this would work with clustered VMs as well). Click on “Manage availability sets”.

Virtual Machine Manager Availability Sets VM Config

Now create a new availability set for your service (virtual machines). It makes sense to choose a good name for that.

Create Virtual Machine Manager Availability Set

After you have created the availability set the set will automatically be assigned to the virtual machine.

Assign  Virtual Machine Manager Availability Set

After you saved the configuration of the first virtual machine you can edit the second virtual machine and assign the same Availability set, which you have already created.

Assign  Virtual Machine Manager Availability Set

Virtual Machine Manager will attempt to keep those two virtual machines on separate hosts if possible.

Recommended Hotfixes and Updates for Windows Server 2012 Failover Clusters

Windows Server 2012 Logo

Back in March I posted links to two TechNet Wiki Pages where all the available Failover Cluster and Hyper-V hotfixes were listed (List of Hyper-V and Failover Cluster Hotfixes for Windows Server 2012). Now the Microsoft Cluster team created an offical knowledge base article (KB2784261) for recommended hotfixes and updates for Windows Server 2012-based Failover Clusters. Make sure you check this list of hotfixes before you go in production with your Windows Server 2012 cluster.

There are some really important fixes especially if you are running a Windows Server 2012 Hyper-V cluster and you are using Cluster Shared Volumes.

You can find more information on KB2784261 – Recommended hotfixes and updates for Windows Server 2012-based Failover Clusters.


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.