Thursday, December 17, 2015

Creating a Hyper-V Guest Cluster using SCVMM - Part 2

In part one of the series, we went over creating a Service Template using System Center Virtual Machine Manager for the purpose of creating a virtual guest cluster using Shared VHDX. In part two, we'll be going over provisioning the virtual servers from the Service Template. This process will create two virtual servers based on the settings we specified in the Service Template. When we are complete, you'll have two fully functional virtual servers utilizing Shared VHDX files, that you can then use to create a failover cluster.

Deploying The Service

Now that the Service Template has been created, you’ll want to deploy the new service. This process will provision the virtual machines specified in the Service Template. In SCVMM, right-click the Service Template and select Configure Deployment.

Give the Service a name (the name of the cluster works well) and specify where to deploy the service. Then click OK.

Tuesday, December 15, 2015

Improved Remote Desktop Connection Broker Performance with Windows Server 2016 and Windows Server 2012 R2 Hotfix (KB3091411)

Microsoft recently released a new hotfix for the RD Connection Broker role in Server 2012 R2 that significantly increases performance when brokering connections. It changes some of the algorithms that the Connection Broker role uses to process redirection requests, as well as modifies how the broker talks to the SQL database in an HA mode deployment.

At the recommendation of one of Microsoft's Premier Field Engineers, I installed this hotfix in my test RDS environment a few days ago, and have not run into any issues so far.

From the article for KB3091411:

This hotfix contains the following improvements:
  • Improves the number of successful user connections when many user connections are coming in (especially in peak logon periods).
  • Decreases CPU usage on SQL Server that's used in a High Availability-based Connection Broker deployment.
  • Optimizes the number of SQL calls that are invoked by Connection Broker when it processes RD user connections.
This hotfix improves the overall performance of the Connection Broker by being able to scale more user connections that typically occur during peak logon periods. 
This hotfix applies to both RD Session Host and Virtual Desktop Infrastructure (VDI)-based deployments.

The announcement on MSDN includes some additional metrics to help quantify some of the performance improvements:

Logon Storm
100% connection success with initial burst of 100 connections at a rate of 2 connections per second
0.2 second average connection time through RD Connection Broker, down from over a minute 
RDSH Add/Restart
100% success adding/restarting servers at rate of 1 server per second with 5 sessions per server
2 second average add/restart time, down from over thirty minutes 
MSTSC End to End
100% connection success at a rate of 100 connections per minute
25 second average connection time, down from over seven minutes
Link to the MSDN announcement - http://blogs.msdn.com/b/rds/archive/2015/12/15/improved-remote-desktop-connection-broker-performance-with-windows-server-2016-and-windows-server-2012-r2-hotfix-kb3091411.aspx

Link to KB3091411 for Windows Server 2012 R2 - https://support.microsoft.com/en-us/kb/3091411

Wednesday, December 9, 2015

Creating a Hyper-V Guest Cluster using SCVMM - Part 1

One of the really cool features that was added to Hyper-V in Windows Server 2012 R2 is something called Shared VHDX. Basically, this feature allows you to share a VHDX file between multiple guest VM's. With this, you can create a failover cluster between the guest VM's, using the Shared VHDX file as your shared storage for the cluster.

There are many great guides and articles out on the Internet for how to setup a Shared VHDX for your Hyper-V guests. Some even go so far as showing how to setup the failover cluster once the Shared VHDX is in place. However, most of these guides and blogs describe how to set this up using only Failover Cluster Manager.

If you have a larger Hyper-V implementation and are using System Center Virtual Machine Manager to help manage your Hyper-V environment, there is a caveat you need to be aware of when using Shared VHDX. If you setup a Shared VHDX outside of SCVMM, you'll be unable to use SCVMM to manage your guest VM's, as SCVMM will throw error 23317 anytime you try to modify the properties of the guest VM's.

SCVMM Error 23317 when using Shared VHDX
SCVMM Error 23317 when using Shared VHDX
Of the blog posts that mention this error, the common solution is to make your changes using PowerShell instead. While this is certainly valid, it's not always practical depending on the change you wish to make. There must be a better way...

And there is! Service Templates allow you to define an entire “service” that could consist of multiple servers and multiple tiers of servers (i.e. database tier, application tier, webserver tier, etc.). Using the SCVMM services functionality, we can create our guest cluster and Shared VHDX from directly within SCVMM, rather than using Failover Cluster Manager. Once we do this, SCVMM is now fully aware of the Shared VHDX and can continue to manage the VM's like normal.