Ready to make the jump from Hyper-V 2012 R2 to 2016? With each successive iteration of Hyper-V, the move gets easier. You have multiple ways to make the move. If you’re on the fence about upgrading, some of the techniques involve a bit less permanence.
What This Article Will Not Cover
I’m not going to show you how to install Hyper-V. The process has not changed since 2012. We probably owe the community a brief article on installing though…
I will not teach you how to use Hyper-V or its features. You need to know:
How to install Hyper-V
How to install and access Hyper-V’s native tools: Hyper-V Manager, PowerShell, and, where applicable, Failover Cluster Manager
How to use Hyper-V Replica, if you will be taking any of the HVR options
How to use Live Migration
I won’t make any special distinctions between Hyper-V Server and Windows Server with Hyper-V.
I’m not going to talk about Windows 10, except in passing. I’m not going to talk about versions prior to 2012 R2. I don’t know if you can skip over 2012 R2.
What This Article Will Cover
What we will talk about:
Virtual Machine Configuration File Versions
Rolling cluster upgrades: I won’t spend much time on that because we already have an article
Cross-version Live Migration
In-place host upgrades
Virtual Machine Configuration File Versions
Each new iteration of Hyper-V brings a new format for the virtual machine definition file. It also brings challenges when you’re running different versions of Hyper-V. Historically, Hyper-V really only wants to run virtual machines that use its preferred definition version. If it took in an older VM, it would want to upconvert it. 2016 changes that pattern a little bit. It will happily run version 5.0 VMs (2012 R2) without any conversion at all. That means that you can freely move a version 5.0 virtual machine between a system running 2012 R2 Hyper-V and a system running 2016. The Windows 10/Windows Server 2016 version of Hyper-V Manager includes a column so that you can see the version:
The version has been included in the Msvm_VirtualSystemSettingData WMI class for some time and exposed as a property in Get-VM. However, the Get-VM cmdlet in version 2 of the Hyper-V module (ships with W10/WS2016/HV2016) now includes the version in the default view:
The capability of 2016 to directly operate the older version enables all of the features that we’ll talk about in this article.
Rolling Cluster Upgrades
2016 gives an all-new upgrade option. “Rolling cluster upgrade” allows you to upgrade individual cluster nodes to 2016. At least, we describe it that way. More accurately, clusters of Hyper-V hosts can contain both 2012 R2 and 2016 simultaneously. So, “upgrading” may not be the correct term to use for individual nodes. You can upgrade them, of course, but you can also wipe them out and start over or replace them with all-new hardware. Whatever you’re doing, the process boils down to: take down a 2012 R2 node, insert a 2016 node.
A feature called “cluster functional level” enables this mixing of versions. When the first 2016 node joins the cluster, it becomes a “mixed mode” cluster running at a “functional level” of 2012 R2. Once the final 2012 R2 node has been removed, you just run Update-ClusterFunctionalLevel. Then, at your convenience, you can upgrade the configuration version of the virtual machines.
Due to the versioning feature that we opened the article with, Live Migration can freely move a version 5.0 virtual machine between a 2012 R2 system and a 2016 system. If both of the hosts belong to the system cluster (see the previous section), then you don’t need to do anything else. Contrary to some myths being passed around, you do not need to configure anything special for intra-cluster Live Migrations to work.
To Live Migrate between hosts that do not belong to the same cluster, you need to configure constrained delegation. That has not changed from 2012 R2. However, one thing has changed: you don’t want to restrict delegation to Kerberos on 2016 systems anymore. Instead, open it up to any protocol. I provided a PowerShell script to do the work for you. If you’d rather slog through the GUI, that same article shows a screenshot of where you’d do it.
Special note on constrained delegation configuration between 2012 R2 and 2016: Constrained Delegation’s behavior can be… odd. It gets stranger when combing 2012 R2 with 2016. On a 2016’s systems property sheet, always select “Use any authentication protocol”. On a 2012 R2 system, always select “Use Kerberos only”. I found that I was able to migrate from 2016 to 2012 R2 without setting any delegation at all, which I find… odd. When moving from 2012 R2, I found that I always had to start the migration from the 2016 side. Nothing I did ever allowed for a successful move when I initiated it from the 2012 R2 side. I expect that your mileage will vary. If you get errors, just try a different combination. I promise you, this migration path does work.
Cross-Version Hyper-V Replica
If you’re reading straight through, you’ll find that this section repeats much of what you’ve already seen.
Hyper-V Replica will happily move virtual machines using configuration version 5.0 between 2012 R2 and 2016 systems. The fundamental configuration steps do not change between the two versions.
Export and Import
The export feature has changed a great deal since its initial inception. Once upon a time, it would create an .exp file in place of the XML file. Without that .exp file, Hyper-V would not be able to import an exported virtual machine. That limitation disappeared with 2012. Since then, Hyper-V can import a virtual machine directly from its XML file. You don’t even need to export it anymore. If you wanted, you could just copy the folder structure over to a new host.
However, the export feature remains. It does two things that a regular file copy cannot:
Consolidation of virtual machine components. If you’ve ever looked at the settings for a virtual machine, you’d know that you can scatter its components just about anywhere. The export feature places all of a virtual machine’s files and attached VHD/Xs into a unified folder structure.
Active state preservation. You can export a running virtual machine. It will be imported where it left off.
When you export a virtual machine, it retains its configuration version. The import process on 2016 does not upgrade version 5.0 virtual machines. They will remain at version 5.0 until you deliberately upgrade them. Therefore, just as with Live Migration and Replica, you can use export/import to move version 5.0 virtual machines between 2012 R2 and 2016.
In-Place Host Upgrades
Windows has earned a reputation for coping poorly with operating system upgrades. Therefore, a lot of people won’t even try it anymore. I can’t say that I blame them. However, a lot of people haven’t noticed that the upgrade process has changed dramatically. Once upon a time, there was a great deal of backing up and in-place overwrites. The Windows upgrade process no longer does any of that. It renames the Windows folder to Windows.old and creates an all-new Windows folder from the install image. But, the matter of merging in the old settings remains. Most problems source from that.
I have not personally attempted an upgrade of Windows Server for many years now. I do not exactly know what would happen if you simply upgraded a 2012 R2 system directly to 2016. On paper, it should work just fine. In principle…
If you choose the direct upgrade route, I would:
Get a good backup and manually verify it.
Schedule enough time to allow for the entire thing to finish, go horribly wrong, and rebuild from scratch
Make a regular file copy of all of the VMs to some alternative location
Wipe and Reinstall
If you want to split the difference a bit, you could opt to wipe out Windows/Hyper-V Server without hurting your virtual machines. Doing so allows you to make a clean install on the same hardware. Just make certain that they’re not in the same location that you’re wiping out. You can do that with a regular file copy or just by holding them on a separate partition from the management operating system. Once the upgrade has completed, import the virtual machines. If you’re going to run them from the same location, use the Register option.
All of these options grant you a sort of “try before you commit” capability. In-place upgrades fit that category the least; going back will require some sacrifice. However, the other options allow you to move freely between the two versions.
Some people have reported encountering performance issues on 2016 that they did not have with 2012 R2. To date, I have not seen any reason to believe that 2016 possesses any inherent flaws. I haven’t personally involved myself with any of these systems, so I can only speculate. So far, these reports seem isolated, which would indicate situational rather than endemic problems. Hardware or drivers that aren’t truly ready for 2016 might cause problems like these. If you have any concerns at all, wouldn’t you like the ability to quickly revert to a 2012 R2 environment? Wouldn’t you also like to be able to migrate to 2016 at your leisure?
Cross-Version Virtual Machine Limitations
Unfortunately, this flexibility does not come without cost. Or, to put a more positive spin on it, upgrading the configuration version brings benefits. Different version levels bring their own features. I didn’t track down a map of versions to features. If you upgrade from 5.0 to the current version (8.0 as of this writing), then you will enable all of the following:
Hot-Add and Hot-Remove of memory and network adapters
Production Checkpoints/Disable Checkpoints
Key Storage Drive (Gen 1)
Shielded VM (Gen 2)
Virtual Trust Platform Module (vTPM) (Gen 2)
Linux Secure Boot
When you’re ready to permanently make the leap to 2016, you can upgrade a virtual machine with Update-VMVersion. You’ll also find on the VM’s right-click menu:
For either method to be successful, the virtual machine must be turned off.
Earlier this week, fellow Microsoft Cloud and Datacenter MVP Aidan Finn and I put on a webinar about what’s new in Windows Server 2016 Hyper-V. As is the norm for all Altaro sponsored webinars, we had a Q & A segment near the end to attempt to answer some of your many questions regarding this topic. Unfortunately, we were unable to get to all the questions during the time allotted. However, we’ve compiled the list of unanswered questions below, and between Aidan and Myself, we’ve answered all the questions for you!
Revisit the Webinar
First off, if you haven’t seen the webinar, or you’d like to re-watch it, we’ve included the recording below for your viewing pleasure!
Q: Any improvements with VMQ? Seems like in order for my HP hardware to work correctly, I have to disable VMQ to prevent issues. Or is this a NIC vendor specific issue?
Q: Seems like Server 2016 is getting farther and farther away from SAN architecture. Do you see that continuing?
WS2016 still has improved functionality for SAN customers. For example, you can replicate your LUNs using Storage Replica without purchasing expensive SAN replication licensing, and Storage QoS will improve VM performance on CSVs.
But Microsoft is making a big bet on commodity hardware. A lot of this comes from their learning from Azure (there are 0 SANs in the big 3 clouds). You can build storage bigger, faster, and cheaper using commodity hardware – sure it’s not as packaged as a SAN but do you want to give those companies 80% margin? Anyone in the cloud business (internal or as a service provider) needs to be lean, and software-defined storage makes that possible.
By the way, thanks to cluster-in-a-box, software-defined storage makes Hyper-V clustering affordable for the small-mid business too!
Q: For SMEs, do you recommend running azure on premises?
No, I don’t. Azure Stack will be just too big for a small-mid enterprise. Use on-premises virtualization (Hyper-V), and if you need cloud, then add on an Azure subscription. You can treat it as one stretched deployment with Azure AD Connect (shared sign-on for single username & password) and site-to-site VPN.
Q: Can a 2 Server – ScaleOut Fileserver Storage Spaces configuration (2012R2 ) be upgraded in some sort to 2016 SOFS?
Q: Can vCPU be modified live for a VM in Server 2016?
Q: It’s important to disable C-States for the hyper-v hosts?
The usual names in server tech (Dell, HP, etc) all have best practices for BIOS/UEFI configurations of their machines. All of them instruct you how to best configure the power setup. This is important to get the best possible performance for VMs and for Live Migration.
Q: Any idea about required feature support at hardware level for new direct hardware (SR-IOV) exposure to VM’s? Lots of older hardware might be capable of Hyper-V but not SR-IOV compatible. Will new virtualisation hardware exposure require whole new set of hardware?
WS2016 Hyper-V will require Second Leval Address Translation (SLAT) which comes on Nehalem or later processors, so really old hardware won’t run the latest version of Hyper-V anyway.
Q: Can you boot directly from a PCIE SSD that has been passed through directly to the VM?
Q: I thought checkpoints currently use VSS?
Currently VSS in 2012 R2 Hyper-V is primarily used via backup applications. Checkpoints themselves do not currently use this technology. The VM is simply put into a paused state briefly while the checkpoint file is created and the write redirection occurs. For more information on the process and how it’s different in 2016, see the below links.
Q: For DR, can you run a 2012 R2 or 2016 VM on a W10 Pro workstaton?
Q: What is the release data for Windows Server 2016
The answer to that question is unknown at this time. Microsoft has made no formal announcement on this, or provided any indication as to when the product will be released.
Q: is vm performance more in line with VMware with 2016?
From a performance stand point, the two vendors have been pretty neck and neck for the past couple of years. When talking with customers in the past, performance hardly ever came into the discussion. It always comes down to who’s ecosystem you want to be a part of, and what management tools your familiar with.
Q: Will there be feature discrepancy between Hyper-V Server and the Hyper-V role in full server 2016?
It looks like Hyper-V Server 2016 will have technical feature parity with Windows Server 2016 Standard Hyper-V. Some features will be Datacenter edition only, such as S2D, Storage Replica, and Network Controller.
Q: Using DDA, can a VM now use serial ports on the Hyper-V host?
I don’t believe so.
Q: Any improvements with Hyper-V Replica?
Microsoft has announced that Hyper-V Replica will be supported with the new Shared VHDX format (guest clusters).
Q: Do you know why Hyper-V are not capable to use USB host?
Q: Are there any plans or news about hyper-v host backup? VMs are already covered by Altaro. What’s the best practice?
Our product is designed to backup and protect the VMs running on the hypervisor, not the hypervisor itself. Best practices state that the hypervisor ONLY be a hypervisor, with no other roles/features or file storage. This way, in the event of a host failure, you simple re-install the host operating system and recover your VMs.
Q: How much bandwidth does Altaro VM backup need to run a backup/restore?
Q: How do you anticipate Altaro licensing evolving with nested virtualization?
Altaro VM Backup will continue to be licensed at the host level, regardless of whether or not that host is a nested host or not. As an example, if you have 1 physical virtualization host, and 4 nested hosts running on top of it, and you would like to protect the VMs across all 5 of those hosts, you would need 5 licenses of Altaro VM Backup.
Q: Is the Altaro change block tracking for backups likely to be supported for both Windows 2012 R2 as well as Windows 2016?
Yes. We will support CBT in 2012 R2 and we will be using the new built in Resilient Change Tracking (RCT) features in Windows Server 2016.
That wraps things up for the unanswered questions. We hoped you enjoyed the webinar, and if you come up with any additional follow up questions, be sure to use the comments section below for those inquiries. We’re happy to address any additional questions.
Last year, Nirmal Sharma wrote a fantastic article on this blog titled 23 Best Practices to improve Hyper-V and VM Performance. This sparked up a very lively discussion in the comments section; some were very strongly in favor of some items, some very strongly opposed to others. What I think was perhaps missed in some of these comments was that, as Nirmal stated in the title, his list was specifically “to improve Hyper-V and VM performance.” If squeezing every last drop of horsepower out of your Hyper-V host is your goal, then it’s pretty hard to find any serious flaws with his list. (more…)
Thursday the 15th of May, marked the conclusion of Microsoft’s Annual TechEd conference this year in Houston. While attending the conference, there is one thing that has become quite clear in Microsoft’s message, in my opinion. The future of Microsoft is Azure and all things cloud.
During the keynote, Brad Anderson laid out the company’s future vision and what that means for IT Pros and developers alike. He stated that Microsoft is adopting a “Mobile first, Cloud first” approach that will allow massive amounts of information to be delivered to consumers and enterprises anywhere, and at anytime.
No, you didn’t read that incorrectly. “Mobile first, Cloud first” is the correct saying. Microsoft feels that both items are equally important for the future of the company and for that of the IT industry. Anderson went on to state that “The reality is, they’re one and the same. You know, you really cannot have a cloud without connected devices and vice versa.”
The rest of the conference followed with much of the same message.
Though. while most of the focus of the conference was given specifically to Azure, there were some indirect implications for Hyper-V and the Microsoft virtualization stack. Namely, enhancements to Hyper-V Replica with ties into Azure, and a huge emphasis on the use of the Desired State Configuration capabilities of Windows PowerShell. Both of these items have a positive bearing on Hyper-V and both items should be reviewed and implemented in turn to provide additional functionality for your Hyper-V infrastructure, assuming you meet the requirements. Lets start by looking at Azure Site Recovery.
Azure Site Recovery
Azure Site Recovery was born from a great feature known as Hyper-V Replica. Hyper-V Replica allows IT Pros to replicate Hyper-V VMs from host to host. This is most often performed between two different physical locations, for disaster recovery purposes.
Next, enhancements for Hyper-V Replica were announced in Server 2012 R2. Namely, the ability to specify an additional target location for the replication job. This I’ve found to be most useful for certain industries with a need to follow strict compliancy guidelines by having disaster recovery capabilities at multiple locations.
Now, Microsoft has announced the next round of enhancements for this feature set and has branded it Azure Site Recovery.
Azure Site Recovery provides the ability to utilize Azure as the DR target. If your main site goes dark for whatever reason, VMs and workloads you were hosting on-premise can be spun up in Azure with little downtime.
Historically, the issue with disaster recovery for small to medium sized businesses has been the cost of maintaining and operating a secondary data location. Utilizing Azure as the DR target removes this burden, and now brings the benefits of site-wide DR to the masses.
Additionally, Azure Site Recovery has the ability to define “Recovery Plans”. Recovery Plans allows an IT Pro to define a startup order for the replicated VMs and workloads should they need to startup inside of Azure. This includes defining manual steps requiring a human if needed before continuing on.
Finally, Azure Site Recovery also provides encryption for the data once it has reached Azure so that industry compliance, in regards to data, can be maintained.
*One thing to note regarding this feature: On-Premise System Center Virtual Machine Manager is still required for the functionality, which may still exclude some organizations from participation due to cost constraints. Let’s face it. System Center isn’t cheap.
Desired State Configuration
Again, While not an entirely new, or Hyper-V specific feature, Desired State Configuration was heavily recommended for Hyper-V workloads throughout TechEd, especially if you attended the Windows PowerShell related sessions.
For those that are not aware, DSC (Desired Stated Configuration) Allows an administrator to create a configuration file that contains the exact settings a Windows Server should use. The admin can then take that file and force a server to adhere to it utilizing Windows PowerShell.
If a junior admin decides to install the Active Directory role on a DSC protected Hyper-V host, the Desired State Configuration file will be looked at periodically (via a scheduled task you define) to make sure that the target server configuration remains consistent, and if the current setup does not match the DSC config file, the current settings and software on the target server will be modified so that it does.
Don Jones of PowerShell.org said it perfectly in a session specifically about DSC. Normally you have to teach your children how to put on a shirt. One limb at a time, but if you could use DSC you’d just say, “wear a red shirt, until I say otherwise” and they would just do it.
Regardless, DSC is a feature that is going to become a core part of server management, and needs to be evaluated by all IT Pros for use in their own environments. Trust me, it’s going to make your lives easier once you have it in place.
Stay tuned for more!
While that wraps it up for what’s new in Microsoft virtualization outside of Azure, be sure to stay tuned for more! In the coming weeks, we will be reviewing some of these features in more detail, including specific instructions and howtos for use inside your own environments!
In Part 1 of this series, we learned about the different possibilities which may cause communication issues between Primary and Replica Server. In this part, we continue to focus on other possibilities and also explain a mechanism which can be used to rule out network port or firewall issues. (more…)
Troubleshooting issues with the Hyper-V Replica requires extensive knowledge of the technology. Not only you need to have knowledge but you must also be able to follow a troubleshooting approach which helps you fix the issues and also benefits in finding the root cause. This is what I intend to explain throughout the articles of “Advanced Troubleshooting of Hyper-V Replica” series. (more…)
As explained in the previous parts of this article series, we can use Hyper-V Manager to get detailed information about the replication health which includes replication statistical data. The replication health data not only help in troubleshooting the issue but also helps in finding the root cause. (more…)