How to activate Microsoft Windows Server KMS host and virtual machines with AVMA

Case #

You need to activate Windows Server using a KMS host key. You need to also activate virtual machines which run under a KMS licensed HyperV server or cluster.

Solution #

Windows Server License Types #

There are many ways in which Windows Server can be licensed. The main licensing channels are the following:

  1. Volume licensing (for example Service Provider Licensing Agreement - SPLA)
  2. Open license
  3. OEM license

The Windows Server licensing also includes Software Assurance (SA) for eligibility to Microsoft Support and future updates.

When it comes to licensing Windows Server via Volume Licensing (SPLA) a KMS host server role must be configured. This can be either a physical or a virtual server. After installing the KMS host role a KMS host key must be installed. When the KMS host key corresponds to the licensing of HyperV host servers with Datacenter edition, then an unlimited number of virtual machines running under these HyperV hosts can be automatically activated by using the AVMA method. AVMA lets you install virtual machines on a properly activated Windows server without having to manage product keys for each individual virtual machine, even in disconnected environments. AVMA binds the virtual machine activation to the licensed virtualization server and activates the virtual machine when it starts up. AVMA also provides real-time reporting on usage and historical data on the license state of the virtual machine. Reporting and tracking data is available on the virtualization server.

Windows KMS Host Activation #

The Windows Server KMS host activation follows the process below:

  • Install the Volume Activation Services server role on the HyperV servers.
Install-WindowsFeature -Name VolumeActivation  -IncludeAllSubFeature –Include ManagementTools
  • Set a Windows Firewall rule for allowing access to the KMS host.
Enable-NetFirewallRule -Name SPPSVC-In-TCP
  • Download the KMS host key from the Microsoft Volume Licensing center.
  • Install the KMS host key on the KMS host.
slmgr /upk   (to uninstall any previous key)
slmgr /ipk <your_Windows_Server_KMS_host_key>

Activate the KMS host

slmgr /ato
slmgr /dlv
DISM /online /Get-CurrentEdition (validate the currently licensed edition)

Windows VM AVMA activation #

The AVMA activation process has the following requirements:

  • One or more activated Hyper-V hosts running Windows Server 2019, 2016 or 2012 R2 Datacenter edition. Windows Server 2012, 2008 R2 and 2008 do not support AVMA activation.
  • Windows Server 2019/2016/2012 R2 Datacenter, Standard or Essentials editions can be used as guest OS on the virtual machines. Desktop Windows versions cannot be activated via AVMA.
  • Integration Services must be installed on the VM which is to be activated via AVMA and the Data Exchange guest service must be enabled in the VM properties.
  • A guest OS must have the Microsoft Hyper-V Activation Component, which can be viewed via the devmgmt.msc tool.

The guest OS of the virtual machine exchanges data about AVMA activation with the Hyper-V host over the VMbus using KVP objects which are located in registry: HKLM\Software\Microsoft\Virtual Machine\Guest. The Windows Server virtual machine AVMA activation follows the process below:

  • On a Windows Server Datacenter virtualization server, install and configure the Microsoft Hyper-V Server role. For more information, see Install Hyper-V Server.
  • Install the AVMA key in the virtual machine. From an elevated command prompt, run the following command:
slmgr /upk   (to uninstall any previous key)
slmgr /ipk <AVMA_key>
slmgr /dlv
DISM /online /Get-CurrentEdition (validate the currently licensed edition)

The following AVMA keys can be used for Windows Server 2019.

EditionAVMA key
AVMA keys for Windows Server 2019

Sources #

Powered by BetterDocs