The rise in virtualisation within IT has profoundly altered the landscape of how servers and applications are deployed across the globe. Whereas in the past you would need to rely on multiple, physical hardware servers, you can now achieve similar levels of performance via the use of a single hardware server with virtualised versions of your operating systems deployed onto it. This is, in a nutshell, how “the cloud” effectively operates and even organisations who are not yet using a cloud computing environment may have virtualisation occurring somewhere within their infrastructure. The number of vendors who now offer solutions within this space grows every year, and more longstanding software providers have significantly adjusted their traditional offerings to take virtualisation into account.

Microsoft is one of these organisations, having moved more with the tide in recent years – to the extent that you can virtualise additional Windows operating systems on top of a physical hardware server at no additional cost. For those who are a bit shaky on terminology, like me, these are referred to as “Hyper-V Guest Operating Systems” or just “guests“. The situation as it stands currently means that the two editions of Windows Server 2016 (which can be upgraded to rather straightforwardly, you may be pleased to hear) offer very clear guest usage rights – up to 2 for Standard and unlimited for the Datacenter edition. This can offer numerous benefits for your business:

  • Facilitates the quick deployment of additional virtual machine instances for additional production workloads, testing or development.
  • Enables you to drive maximum benefit from your hardware investment by utilising as much virtual compute power as required.
  • Greatly simplifies the process of activating your copies of Windows, as guest OS’s will be activated based on your host machine license key.

As with anything, there is a small learning curve involved in deploying a solution of this nature, but those who are reasonably comfortable working with Windows Server should find the journey relatively smooth.

I had a strange issue recently when setting up a lab environment, where I could not activate any guest Windows Server Datacenter Edition servers via the standard way (i.e. through the Settings page). As a result, I was getting the following errors/messages displayed constantly when working on the machine:


Clicking on the Change product key option does nothing, and you have no apparent way of forcing Windows to activate or to modify the Product Key supplied at installation. So how do you go about activating your copy of Windows?

It turns out this error is due to the Product Key being entered incorrectly on initial setup. I (incorrectly) assumed that Hyper-V guest OS’s on a Windows Server 2016 Datacenter host did not require a Product Key and would automatically activate upon installation. This assumption was made on the basis that the Windows 2016 installation wizard now lets you skip adding a Product Key. So, instead of entering a key, I simply pressed Next and let the install proceed as normal. The correct course of action should have been to supply the appropriate Automatic Virtual Machine Activation (AVMA) key, which essentially “tells” Windows to look at the host operating system to confirm whether it is licensed accordingly. A full list of the AVMA codes for Windows Server 2012 R2 and Windows Server 2016 can be found on TechNet, with the appropriate license keys for Server 2016 reproduced below:

  • Datacenter: TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J
  • Standard: C3RCX-M6NRP-6CXC9-TW2F2-4RHYD
  • Essentials: B4YNW-62DX9-W8V6M-82649-MHBKQ

So, to avoid having to completely re-install Windows, we need to find some way in which we can update the OS to use the correct the license key. Fortunately, there is a way, if you are prepared to “get dirty” with the command prompt 🙂

First of all, you will need to ensure that your Hyper-V Manager is configured for Guest services. This can be done straightforwardly enough by going into Settings… on your virtual machine and verifying the appropriate box is ticked on the Integration Services tab. This will need to be done for each virtual machine that requires activation:

Next, because we are prevented from modifying the Product Key via the GUI interface, we must resort to using the slmgr command to remove the current key and add the appropriate AVMA key. As an interesting aside, this is actually a Visual Basic script file and ranks for me as one of the most surprising instances I’ve found of Visual Basic being used within a Microsoft product!

Log onto the virtual machine in question and open an elevated command prompt, executing the following command to remove the current license key:

slmgr -upk

After a few seconds, a pop-up message box will confirm that this has completed successfully:

Then, run the following command to install your AVMA key. In the example below, we are using the Datacenter key to activate a Datacenter edition guest:


As above, we will get confirmation back that the script has completed successfully:

Straight away, you should notice that the Activate Windows message vanishes from the screen and this is confirmed by going into settings – happy days! 🙂


Although it is a little bit frustrating that there is no way in which the product key can be modified from within the Settings page (I am assuming that this is a bug; let me know in the comments below if you have encountered the same problem), it is good that we have an alternative mechanism in place for ensuring that Windows can be activated correctly. The lesson is well learned: when deploying out a new guest Hyper-V Server instance, be sure to enter the correct AVMA key at setup to avoid any of the rigmarole illustrated above.

I was rather surprised to see, when browsing through the software options available to MSDN subscribers, that a non-preview version of Windows Server 2016 was available to download. Further investigation proved that Windows Server had been quietly released in the middle of October, something which I made reference to as part of a previous post on Ignite 2016. For those who have found Windows Server 2012 to be a less than ideal experience, this will likely be welcome news. Some of the new features that are available as part of Windows Server 2016 include:

  • The return of the traditional Start menu: This is no doubt the most pleasing and welcome change to Windows Server, returning Windows Server to a more familiar user environment.
  • Shielded Virtual Machines for Hyper-V: Windows Server 2016 offers additional encryption and security options, that allow you to protect business-critical or sensitive server instances in Hyper-V from being exposed across your network.
  • General Virtual Machine Improvements: This release is very much geared towards widening the options available from a Hyper-V virtualisation point of view, including better performance, increasing accuracy for clock/date settings on virtual machines and “hot spare” type options for swapping out system resources on a Hyper-V image, without taking the virtual machine down.
  • Identity Management Updates: A whole swathe of updates to many of the common Identity services offered by Microsoft, including Active Directory, Active Directory Federation Services and Active Directory Certification Services.

Server administrators will need to start performing exercises to determine a possible upgrade path from older versions of Windows Server to newer versions. Whilst there is not significant rush at this stage to get this done, those who are running Windows Server 2008 instances will have additional impetus to consider upgrading in the near future.

Let’s walk through the actual upgrade process, to determine just how simple or complicated the process is. In the examples below, I’ll be using a standard Windows Server 2012 R2 environment, that does not have any Server Roles installed.

After running the Autoplay, the installation will begin, and you will be prompted first to check for updates before beginning the install:


It is always best to get the latest updates, in case any important security patches have been released, so I would recommend keeping the setting as default. If you are in a rush, though, you can opt to do this later, as the install time will be impacted severely. You can also indicate whether you want to send anonymous information to Microsoft about the install process.

After checking for updates, the next major step is entering your Product Key:

4What I quite like about this, and what I believe is a new addition, is that you will be alerted in the message box below if you enter any invalid characters – quite handy, as it means you can correct any errors before entering the product key completely:

5Next, you have to decide what type of install you want to perform – a standard or Server Core installation:


What’s worth noting is that you get this option, regardless of whether you are performing the upgrade on a standard or Server Core installation. So if you have determined in the mean time that the lack of user interface is causing you issues managing your server or if you find that your server is only ever accessed/administered via remote PowerShell, then you have a good opportunity to correct this during the upgrade process. Speaking from a purely CRM point of view, we’ve seen previously what is involved as part of setting up Dynamics CRM 2016 on a Server Core installation; suffice to say, it’s not something I would recommend.

Once you’ve made this crucial decision, you’ll then need to accept the standard license terms:

8Then, another important decision. Similar to when you upgrade Windows 7 to Windows 10, you have the option of performing a clean install or an in-place upgrade:

9In this example, the Keep personal files and apps option was chosen, so I cannot advise on the impact of choosing Nothing. I would assume that choosing this would delete everything, including any installed Server Roles. Proceed with this step at your own risk.

Then, you’ll get a rather lengthy Getting Updates window – I would assume that this is the point in the install when the updates are actually downloaded, and the earlier step was a pre-check of some sort:

10Finally, before beginning the install, you are prompted with an interesting warning, which you have to dismiss before the install will begin:

12I believe this is another first for a Windows Server install, in that Microsoft is specifically advising not to perform an in-place upgrade of your Windows Server. There is a certainly a convincing school of thought that backs this up – for example, what if you have a business critical application that suddenly breaks after the upgrade? It is arguably better and safer to setup a new server from scratch and then iteratively test out your server applications one by one, before deciding whether it is safe to upgrade. I would argue that an in-place upgrade is safe so long as any pre-requisite testing has been done using a copy of your server instance – indeed, I have not encountered any major issues since performing an in-place upgrade myself on my development server. But don’t ever throw caution to the wind and assume that you can upgrade without any testing.

The install will then do a final check on disk space; likely throwing an error if there is not enough (Microsoft recommend 32GB):


Then, the critical moment! Review the settings that have been specified and then press Install to begin the process:

14The full-screen setup will then start, preventing you from doing anything else on the Server throughout the process:

15The Server will restart several times after that. The whole process took a couple of hours on my test Hyper-V machine, but this was probably due to lack of resources allocated to it! 🙂

After install, you will be greeted with the new Windows Server 2016 login screen, which is not dissimilar from the Windows 10 one – with no clear indication that the upgrade has been completed successfully. I found this rather strange, and had hoped to get some kind of message afterwards to at least say “The upgrade has completed successfully!”. Regardless, the upgrade in my case appears to have been a success, and everything appears to be working fine so far on my test server.

Dynamics 365 and Windows Server 2016

This is a CRM/Dynamics 365 for Enterprise (D365E) focused blog, so it would be remiss of me not to segue way into this. 🙂 The release of the on-premise version of D365E is imminent, and it is therefore not unlikely to assume that the required server versions will include Windows Server 2016. Although the pre-release TechNet articles do not currently confirm this fact, it would seem puzzling if Windows Server 2016 is not eventually included on the list of supported operating systems. Administrators can be comforted by the fact that is likely that Windows Server 2012 will remain on the supported operating system list for D365E for the next couple of versions at least. Those who are venturing into the world of on-premise CRM/D365E for the first time, however, may benefit themselves greatly to start familiarising themselves with Windows Server 2016.

As a final side note, I would be interested to hear if anyone has been able to install Dynamics CRM 2015/2016 on Windows Server 2016 and whether or not you are specifically prevented from doing so. Let me know your experiences in the comments below!