With the release of Windows Server 2012 R2 back in 2013, Microsoft introduced a feature known as Automatic Virtual Machine Activation (AVMA).
AVMA simplifies the activation of Hyper-V virtual machines (VMs) by seamlessly managing the process on a physical Hyper-V host that holds a valid Windows Server Datacenter license. This spares you the inconvenience of managing separate product keys for each VM.
During the VM startup sequence, the activation process occurs, linking the VM’s activation to the licensed Hyper-V host. This process allows you to license VMs even in isolated environments or remote locations without internet connectivity. Once the guest OS activates, it only checks its activation against the host until the next VM reboot, or for up to 7 days afterward.
Requirements for AVMA
- A Hyper-V host running a Datacenter Edition of Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, or Windows Server 2022. Keep in mind that if you migrate an AVMA licensed VM to a Hyper-V host which is not licensed with a Windows Server Datacenter license, the VM will become unlicensed. In this case you should replace the AVMA key in the VM with another valid non AVMA license key.
- The Hyper-V Data Exchange Service (KVP), which is part of the Integration Services must be enabled on the VM.
- In the VM itself the Microsoft Hyper-V Activation Component Driver should have an enabled device status and should be working properly.
- AVMA does not work with other Virtualization Server technologies.
Supported Guest Operating Systems for AVMA
AVMA exclusively covers Windows Server guests. The table below illustrates which guests can be activated by each version of Hyper-V host. All server editions (Datacenter, Standard, or Essentials) installed with Desktop Experience or Server Core are eligible for activation.
| Hyper-V host version | WS2022 | WS2019 | WS016 | WS2012R2 |
| Windows Server 2022 | X | X | X | X |
| Windows Server 2019 | X | X | X | |
| Windows Server 2016 | X | X | ||
| Windows Server 2012 R2 | X |
* In a failover cluster, every virtualization server host within the cluster must be activated for guest VMs to remain activated, irrespective of the server they are running on.
AVMA Keys
Windows Server 2022
| Edition | AVMA key |
| Datacenter | W3GNR-8DDXR-2TFRP-H8P33-DV9BG |
| Datacenter Azure Edition | F7TB6-YKN8Y-FCC6R-KQ484-VMK3J |
| Standard | YDFWN-MJ9JR-3DYRK-FXXRW-78VHK |
Windows Server 2019
| Edition | AVMA key |
| Datacenter | H3RNG-8C32Q-Q8FRX-6TDXV-WMBMW |
| Standard | TNK62-RXVTB-4P47B-2D623-4GF74 |
| Essentials | 2CTP7-NHT64-BP62M-FV6GG-HFV28 |
Windows Server version 1909, 1906, and 1809
| Edition | AVMA key |
| Datacenter | H3RNG-8C32Q-Q8FRX-6TDXV-WMBMW |
| Standard | TNK62-RXVTB-4P47B-2D623-4GF74 |
Windows Server version 1803 and 1709
| Edition | AVMA key |
| Datacenter | TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J |
| Standard | C3RCX-M6NRP-6CXC9-TW2F2-4RHYD |
Windows Server 2016
| Edition | AVMA key |
| Datacenter | TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J |
| Standard | C3RCX-M6NRP-6CXC9-TW2F2-4RHYD |
| Essentials | B4YNW-62DX9-W8V6M-82649-MHBKQ |
Windows Server 2012 R2
| Edition | AVMA key |
| Datacenter | Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW |
| Standard | DBGBW-NPF86-BJVTX-K3WKJ-MTB6V |
| Essentials | K2XGM-NMBT3-2R6Q8-WF2FK-P36R2 |
Configure AVMA
To begin, ensure that the Data Exchange option is enabled in the Integration Services for the VM. To do this, open Hyper-V Manager, right-click on the VM, and select Settings.

In the Settings window, navigate to Management and select Integration Services. Ensure that Data Exchange is checked.

You can also utilize PowerShell to check if the Data Exchange Integration Service (Key-Value Pair Exchange) is enabled. To obtain a list of the running Integration Services for a VM, execute the following command (replace “VM name” with the actual name of your VM) in a PowerShell window (as Administrator) on the Hyper-V host hosting the VM.
Get-VMIntegrationService -VMName "vm-tmpl-W2k19"

To enable the Data Exchange Integration Service when disabled, execute the following PowerShell cmdlet (as an Administrator) from the Hyper-V host hosting the VM.
Enable-VMIntegrationService -Name "Key-Value Pair Exchange" -VMName "vm-tmpl-W2k19"

If you encounter any activation issues and need to troubleshoot, you can also ensure that the Microsoft Hyper-V Activation Component Driver is functioning correctly. To do this, open Device Manager inside the VM and inspect the Device Status of the driver.

To install an AVMA key in a VM (for instance, a Windows Server 2019 VM), execute the following command in a PowerShell window (as Administrator) on the VM:
slmgr /ipk TNK62-RXVTB-4P47B-2D623-4GF74

** You can also provide the AVMA key during an Unattended setup using an unattend.exe setup file. This allows the key to be injected during the build phase of that specific VM.
You can also utilize PowerShell Direct from the Hyper-V host to activate a specific AVMA key for a VM running on that host. Open a PowerShell window (as Administrator) on the Hyper-V host and execute the following command:
Invoke-Command -VMName "vm-tmpl-W2k19" -ScriptBlock {slmgr /ipk TNK62-RXVTB-4P47B-2D623-4GF74}


You can verify the correct installation of the AVMA key by navigating to All settings > Update & Security > Activation in the VM.

You can also check the VM’s AVMA activation status on the Hyper-V host by opening the Event Viewer and searching for Event ID 12310.



I hope this blog post taught you something about AVMA and how this feature can simplify your VM activation process. If you have any questions, please don’t hesitate to reach out to me via my X handle (@wmatthyssen), or feel free to leave a comment.

hello,
and when you have an evaluation windows?
br
LikeLike
Using AVMA to convert form an eval version to a retail version will not work. Only retail installations will auto-activate with an AVMA key.
LikeLike
A little outside the scope of this great article (Thanks Wim!). However, it can be done, by using the dism command to change the edition of Windows Server from Evaluation to Standard or Datacenter. There are other blogs out there that will help you Luis. I then followed Wim’s instruction on how to activate the VM once it the edition was no longer Evaluation.
Awesome article, thanks again.
LikeLike
Hello good afternoon
I have a new Dell T440 server that came with WIndows Server 2019 Std. I loaded Hyper-V on it and installed two vms also Windows Server 2019 Std … in both the VM activation process goes smoothly as you reported no procedure, but then restart the VM until and check and Windows on the VM is not activated … Windows on Physical Host is activated correctly purchased directly from Dell.
Any additional tips? I tried both activation via VM and via Physical Host limitation for VM and nothing
LikeLike
Dear Rafael,
AVMA activation working only for Datacenter edition on the host. Is not working with Standard edtion.
LikeLike
Hello Fabio,
Yes indeed, AVMA requires a Windows Server Datacenter edition with the Hyper-V host role installed.
LikeLike