Table of Contents
Let’s say that you have your Hyper-V host running Windows Server and now you’ve configured a few guests’ virtual machines also running Windows Server, the question is how do you activate these virtual machines?
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.
System requirements
- For a virtualization server host to run guest VMs, you must activate it
- 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. A host version can access all the editions (Datacenter, Standard, or Essentials) of its eligible guest VM versions.
AVMA does not work with other server virtualization technologies.
Guest Operating Systems are Eligible for AVMA
There are a few rules that dictate which guests are covered by AVMA:
- Only Windows Server guests are covered by AVMA. No desktop operating systems are covered by any Windows Server guest virtualization right, so AVMA will not activate them.
It might be simpler with tabular data. To keep the table simple, any operating system not shown is not eligible for AVMA:
How Does AVMA Work?
AVMA automatically runs on every installation of Windows Server Datacenter with Hyper-V; no additional actions are required. Multiple components collaborate to enable AVMA, and they operate autonomously.
- Windows Server Datacenter Edition, as the management operating system, hosts a feature that monitors all virtual machines.
- The Integration Services include a Windows driver that implements most important parts of the guest-side functionality.
- 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.
You don’t need to buy any new license or to setup a KMS server. They are free because included in your Datacenter license.
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 install the AVMA key on the VM. From PowerShell or an elevated command prompt, run the below command. The VM automatically activates, providing that the virtualization host itself is activated.
Example to activate Windows Server 2022 Standard in an Hyper-V guest:
slmgr /ipk 'YDFWN-MJ9JR-3DYRK-FXXRW-78VHK'
You can verify the correct installation of the AVMA key, by opening All settings – Update & Security – Activation in the VM.
Alternatively, we can check the license by using the following command:
slmgr /dlv
As you can see, the license is only valid for 7 days. Don’t panic, Windows will periodically reactivate itself, just make sure that the license on your Hyper-V is always validated.
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:
Not a reader? Watch this related video tutorial: