Sergey Galushko - Fotolia

Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Streamline management and reduce overhead with Microsoft AVMA

Each virtual machine running on a Windows guest operating system needs its own license. But Automatic Virtual Machine Activation can help activate them.

A virtual machine running a Windows guest OS requires its own license, separate from the license included with the virtualization host. In a production environment, where there are hundreds of Windows virtual machines running, it can be difficult for virtualization administrators to keep track of each license.

Reducing the administrative overhead is a key to success for virtualization software vendors nowadays. Starting with Windows Server 2012 R2, Microsoft introduced Automatic Virtual Machine Activation (AVMA), which can be used to reduce the manual administrative overhead for activating Windows virtual machines (VMs) running on a Hyper-V host.

Benefits of using AVMA

There are several benefits offered by AVMA. Windows VMs can be activated without an Internet connection. A traditional approach to activate a Windows OS is to use an Internet connection, which connects to a Microsoft licensing server, or connects to a KVM server running in your production environment, which helps you activate all Windows OSes. Using AVMA, a Windows VM does not need to have an Internet connection for activation and can be activated by just contacting the Hyper-V host.

The second major benefit of using AVMA is that it can also activate VMs that are connected to a private virtual switch. VMs that are connected to a private virtual switch can only communicate with each other. They do not even have connectivity to the Hyper-V host, but AVMA bypasses this limitation and allows you to activate these VMs.

Since AVMA ensures that the VMs are activated automatically, it reduces the administrative overhead by eliminating the need to verify the activation status of each one.

AVMA requirements and limitations

Before you can use any of the features offered by AVMA in your production environment, you have to make sure you meet the criteria. First, the host operating system must be Windows Server 2012 R2 Datacenter edition. The Hyper-V Role must also be active on the server. Currently, AVMA can only support activating Windows Server 2012 R2 OSes, including Standard, Datacenter and Essential editions. While AVMA does not support earlier versions of Windows client and server OSes, this limitation may go away in the near future.

Make sure the Hyper-V Data Exchange service is enabled and running inside the VM. It’s also important to note that a VM activated through AVMA is valid only for seven days. A VM must send an activation request to the Hyper-V host within those seven days to renew activation.

For this reason, a VM that has been moved to a Hyper-V host running Windows Server 2012 R2 standard edition must be moved back to the Windows Server 2012 R2 Datacenter edition host before the VM can be reactivated.

How to use the AVMA feature

Setting up AVMA does not require much planning. First, activate the Hyper-V host running Windows Server 2012 R2 Datacenter edition using any acceptable licensing method. Then, activate the Windows VM by running this command from the VM:

Slmgr /ipk <AVMA Key for supported guest OS>

The following AVMA keys can be used for the VMs running Windows Server 2012 R2:

  • For the Datacenter edition: Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
  • For the standard edition: DBGBW-NPF86-BJVTX-K3WKJ-MTB6V
  • For the Essentials edition: K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

How does AVMA work?

It is important to note that there are special instructions written for the Windows activation service when using the above mentioned AVMA product keys. These product keys, when used with AVMA, ensure that the Windows activation service communicates to the Windows Server 2012 R2 Hyper-V host to activate the Windows guest OSes. The process starts when a Windows VM starts. The VM requires activation and uses the AVMA feature to send an encrypted packet to the Hyper-V host. The encrypted packet includes the information such as the OS edition and license state. The Hyper-V host uses the information supplied by AVMA to proceed with the activation. The AVMA utility either approves or rejects the request.

How to verify VM activation status

Once a VM is activated successfully, an event is logged in the application log of the VM’s OS. If you need to verify the activation status of a VM, check Event ID 12309 in the application log. The event message should read: "The client has processed an Automatic VM activation response from the parent partition."

Additionally, you can also get more information on the activation status by executing the slmgr.vbs /dlv command from the VM. This command also tells you whether the VM was activated using the AVMA feature or using any of the traditional activation methods.

The Hyper-V host also keeps track of activated VMs by writing an event in the application log. The Event ID 12310 is logged in the Application log, which reads "An Automatic VM activation request has been processed". Please note the event message does not necessarily tell you the name of the VM that AVMA activated, as it only logs the GUID of the VM.

AVMA is an often overlooked feature, but it helps organizations to streamline the licensing process for Windows VMs that can use the AVMA feature for activation. Since AVMA logs activation data on both the Hyper-V host and VMs, this data can be retrieved using a PowerShell script and can also be forwarded to Microsoft’s Audit Collection Services for reporting purposes.

Dig Deeper on Virtual machine performance management

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.