Part 1 of this blog post series is about basic Windows Server 2016 TP5 installation, which is downloaded through the TechNet Evaluation Center. Now that you understand basic Windows Server installation, this blog post will take a more advanced approach by highlighting a Windows Server 2016 new feature: Cluster OS Rolling Upgrades. As you may know, many Server 2016 features are designed to improve your Hyper-V Server experience. This Part 2 blog post explains the exact steps you’ll need to take to get your Hyper-V Cluster updated. Keep in mind that within Technical Preview 5, both Hyper-V and Scale-Out File Server Clusters are able to perform Cluster OS Rolling Upgrades.
NOTE: Running any type of production workload based on technical software previews is NEVER recommended.
Always use best practices when possible
Upgrading Windows Server versions has been highly unadvisable in the past and is still considered to be frowned upon by the Windows Server community. In previous versions of Windows Server, it was necessary to build a separate environment with the new version of Hyper-V and Windows Server installed and ready to receive VMs. The ability to do this was allowed by Windows Server 2012 R2, unlike Cluster type (2012 or 2008 R2 -> 2012 R2) Live Migrations. While IT pros were able to upgrade an environment with zero downtime, the downside was that extra hardware needed to be utilized or purchased. Windows Server 2016 has completely changed this process by permitting different Windows Server versions to exist within the same cluster at a given time, which is known as a Mixed-OS Mode.
Now I’d like to take a closer look at what this means in a real environment.
Upgrading the nodes of a Hyper-V failover cluster
Before I dive into this actual process, you’ll need to understand a few key concepts. Prior to entering the transition state of the cluster, the cluster only contains Windows Server 2012 R2 nodes running the Hyper-V role. Once you add a Windows Server 2016 TP5 node, the cluster begins its transition, during this period all actions are FULLY REVERSIBLE. The Cluster Functional Level 8 represents Windows Server 2012 R2, while Cluster Functional Level 9 represents the Windows Server 2016 Technical Preview.
To check your Cluster Functional Level execute:
Get-Cluster -Name localdemo.demo.local | select ClusterFunctionalLevel
The above illustration shows that the environment’s Cluster Functional Level is at Windows Server 2012 R2 level, which means that only features specific to Windows Server 2012 R2 are available and that all actions taken to this point are FULLY REVERSIBLE.
To begin the upgrade process, you first need to make sure that you have good backups of all the cluster nodes, VMs and application data within VMs. Appropriate capacity planning and HA within the Hyper-V hosting environment will allow you to place Nodes into maintenance mode by using the Hyper-V Cluster’s Pause and Drain Roles feature. Follow these steps, which are documented by Microsoft:
- Back up cluster database
- Back up workload data
- Check if Cluster Aware Updating is applying updates to the cluster
- Pause the Cluster Node(s) and Drain Roles
- Evict the Node from the Cluster
- Clean the Windows Server 2016 Installation (See the Part 1 blog post in this series for details).
- Add the Failover Clustering Role to Node
- Configure Network and Storage
- Add the Node to Failover Cluster
- Add the Hyper-V Role to Node
- VM and Workload Test
- VM and Workload Placement
- Rinse and repeat!
These actions can be taken through Windows Failover Cluster Manager or via PowerShell. I’m a fan of PowerShell and the automation abilities it provides. Failover Cluster Manager, shown in the image below, is a method for placing hosts in a Paused state.
When the hosts are Paused and their VM Roles are drained, it is time to Evict the nodes from the Failover Cluster. Again, this can be done through Failover Cluster Manager or PowerShell. PowerShell Commands are:
Get-Cluster -Name ClusterName | Get-ClusterNode -Name ServerName | Remove-ClusterNode
When all of the appropriate nodes are evicted from the Hyper-V Failover Cluster, you can now install a fresh copy of Windows Server 2016. Be sure to delete the previous Windows Server partition within the OS Install Wizard. Otherwise, you’ll end up with a dual boot setup and each time the server boots you will be prompted to choose which OS to boot.
Which version is appropriate? Should you install the version with Desktop Experience? Should you install Server Core? What is Nano Server and should you install that? If you find yourself asking any of these questions, I recommend that you check out Windows Server 2016 Virtualization and All You Need to Know About Nano Server, which are useful e-books co-authored by me and Mike Resseler.
With your nodes now running the appropriate Windows Server 2016 edition, it is now time to ensure that the hosts are security patched and re-added to the necessary protection policy, IP Address and Storage, as well as add the Hyper-V and Failover Clustering Roles back to the nodes. All of these activities are relatively straightforward Windows Admin tasks, which are already well documented elsewhere. Once these tasks are complete, you can move on to adding the nodes back to your existing Failover Cluster. This is done either via Failover Cluster Manager or PowerShell. I prefer — you guessed it — PowerShell!
Get-Cluster -Name ClusterName | Add-ClusterNode -Name ServerName
In the final Part 3 blog post in this series, Upgrading our Cluster Functional Level and Updating the VM Hardware Version of our Virtual Machines, I will walk you through the final steps of the Rolling Cluster OS Upgrade procedure. It is worth noting that ALL steps and actions discussed this blog post are 100% FULLY REVERSIBLE. The Cluster Functional Level is still at 8, and Server 2012 R2 cluster nodes can be added back if something goes awry.
Getting your environment upgraded to Windows Server 2016 can be a pain-free process if the correct steps to reduce risk in the environment are followed. If you’ve not had the chance to begin testing Server 2016 in your environment, there’s no better time than now! What testing have you done? Is Nano Server an area of interest? What about Windows Server Containers? Let me know what Windows Server and Hyper-V 2016 topics you’re interested in reading about.