大网数据广告活动
安装更新与部署

Automatic Virtual Machine Activation in Windows Server

· 52CE 我爱测

Learn about Automatic Virtual Machine Activation (AVMA) and how to enable seamless activation of Windows Server virtual machines on licensed Hyper-V hosts.

Automatic Virtual Machine Activation (AVMA) acts as a proof-of-purchase mechanism, helping to ensure that Windows products are used in accordance with the Product Use Rights and Microsoft Software License Terms. AVMA lets you activate Windows Server virtual machines (VM) on a Windows Server Hyper-V host that is properly activated, even in disconnected environments. AVMA binds the VM activation to the licensed virtualization host and activates the VM when it starts up. When you use AVMA, you can get real-time reporting on usage and historical data on the license state of the VM. Reporting and tracking data is available on the virtualization host.

Practical applications

On virtualization hosts, AVMA offers several benefits. Server data center managers can use AVMA to do the following tasks:

  • Activate VMs in remote locations.
  • Activate VMs with or without an internet connection.
  • Track VM usage and licenses from the virtualization host, without requiring any access rights on the virtualized systems.

Service Provider License Agreement (SPLA) partners and other hosting providers don't have to share product keys with tenants or access a tenant's VM to activate it. VM activation is transparent to the tenant when AVMA is used. Hosting providers can use the server logs to verify license compliance and to track client usage history.

System requirements

To run guest VMs on a virtualization server host, you must activate the host. You can obtain host activation keys from the Microsoft 365 admin center or your OEM provider.

Note: In a failover cluster, each virtualization server host in the cluster must be activated for guest VMs to stay activated, regardless of which server they run on.

AVMA requires a Windows Server Datacenter edition with the Hyper-V server host role installed. The Windows Server version of the host determines which versions it can activate in a guest VM. The following table lists the guest VM versions that each host version is able to activate. A host version can access all the editions (Datacenter, Standard, or Essentials) of its eligible guest VM versions.

Server host version Windows Server 2025 guest VM Windows Server 2022 guest VM Windows Server 2019 guest VM Windows Server 2016 guest VM Windows Server 2012 R2 guest VM
Windows Server 2025 X X X X X
Windows Server 2022 X X X X
Windows Server 2019 X X X
Windows Server 2016 X X
Windows Server 2012 R2 X

Note: AVMA doesn't work with other server virtualization technologies.

How to implement AVMA

To activate VMs with AVMA, you use a generic AVMA key (detailed in AVMA keys) that corresponds to the version of Windows Server that you want to activate. To create a VM and activate it with an AVMA key, follow these steps:

  1. On the server that hosts the VMs, install, and configure the Microsoft Hyper-V Server role. Ensure that the server is successfully activated. For more information, see Install Hyper-V Server.

  2. Create a virtual machine and install a supported Windows Server operating system on it.

    [!IMPORTANT] The Data Exchange integration service (also known as Key-Value Pair Exchange) must be enabled in the VM settings for AVMA to work. It's enabled by default for new VMs.

  3. After installing Windows Server on the VM, install the AVMA key on the VM. From PowerShell or an elevated command prompt, run the following command:

    slmgr /ipk <AVMA_key>
    

The VM automatically activates, providing that the virtualization host itself is activated.

Tip: You can also add the AVMA keys in any Unattend setup file.

AVMA keys

Windows Server 2025

Edition Key
Datacenter YQB4H-NKHHJ-Q6K4R-4VMY6-VCH67
Datacenter:Azure Edition 6NMQ9-T38WF-6MFGM-QYGYM-88J4F
Standard WWVGQ-PNHV9-B89P4-8GGM9-9HPQ4

Windows Server 2022

Edition 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 Key
Datacenter H3RNG-8C32Q-Q8FRX-6TDXV-WMBMW
Standard TNK62-RXVTB-4P47B-2D623-4GF74
Essentials 2CTP7-NHT64-BP62M-FV6GG-HFV28

Windows Server versions 1909, 1903, and 1809

Edition Key
Datacenter H3RNG-8C32Q-Q8FRX-6TDXV-WMBMW
Standard TNK62-RXVTB-4P47B-2D623-4GF74

Windows Server versions 1803 and 1709

Edition Key
Datacenter TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J
Standard C3RCX-M6NRP-6CXC9-TW2F2-4RHYD

Windows Server 2016

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

Windows Server 2012 R2

Edition Key
Datacenter Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
Standard DBGBW-NPF86-BJVTX-K3WKJ-MTB6V
Essentials K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

Reporting and tracking

The Key-Value Pair (KVP) exchange between the virtualization host and the VM provides real-time tracking data for the guest operating systems, including activation information. This activation information is stored in the Windows registry of the VM. Historical data about AVMA requests is logged in Event Viewer on the virtualization host.

For more information about KVP, see Data Exchange: Using key-value pairs to share information between the host and guest on Hyper-V.

Important: KVP data isn't secured. It can be modified and isn't monitored for changes. KVP data should be removed if the AVMA key is replaced with another product key (retail, OEM, or volume licensing key).

Since the AVMA activation process is transparent, error messages aren't displayed. However, AVMA requests are also logged on the virtualization host in Event Viewer in the Application log with Event ID 12310, and on the VM with Event ID 12309. The following events are captured on the VMs:

Notification Description
AVMA Success The VM was activated.
Invalid Host The virtualization host is unresponsive. This event can happen when the server isn't running a supported version of Windows.
Invalid Data This event usually results from a failure in communication between the virtualization host and the VM, often caused by corruption, encryption, or data mismatch.
Activation Denied The virtualization host couldn't activate the guest operating system because the AVMA ID didn't match.

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 07/14/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。