Activating virtual machines via Automatic Virtual Machine Activation in Windows Server 2012 R2

Activating virtual machines via Automatic Virtual Machine Activation in Windows Server 2012 R2

  • Comments 14
  • Likes

Hello,

My name is Mayank Sharma and I am a Support Engineer in Windows Platforms Support Team. In this blog, I am going to discuss a very exciting addition to Windows Server 2012 R2, called as AVMA (Automatic Virtual Machine Activation). As the name suggests, this feature allows automatic activation of virtual machines running on Windows Server 2012 R2 Hyper-V hosts.

What makes AVMA attractive?

  1. AVMA is perfect for hosted environments where virtual machines do not have access to the internet or the hoster’s network.
  2. The Hyper-V host will work as a sort of ‘activation server’ for virtual machines, activating the machine without the need of a network or any kind of intervention from the administrators.
  3. There is no additional hardware or software requirement.

Before I start, let me first remind you that this feature available only if the following conditions are true:

  • The Hyper-V host is a Windows Server 2012 R2 Datacenter Edition.
  • The VMs are running Windows Server 2012 R2, thus only the below three editions can get activated by AVMA
    • Windows Server 2012 R2 Standard
    • Windows Server 2012 R2 Datacenter
    • Windows Server 2012 R2 Essentials
  • The Hyper-V host is activated. (It can be activated using any of your regular activation mechanisms like MAK, OEM or KMS.)
  • The Guest VMs have AVMA client key installed on it. (more about this later)

This means that Windows Server 2012 VMs are not eligible for AVMA activation even if they are hosted on a 2012 R2 Hyper-V host. Similarly Windows Server 2012 Hyper-V hosts cannot activate VMs running Windows Server 2012 or 2012 R2 guests through AVMA.


Setting up for AVMA:

This is a one step process. Once the Hyper-V host is activated and guest virtual machines are running smoothly (without activation off course!), the only step is to install the AVMA client key on the guest virtual machines. This link lists the AVMA client keys for the SKUs that supports AVMA: http://technet.microsoft.com/en-us/library/dn303421.aspx. If you control the installation of the operating system – it is easier to supply the AVMA key during installation either manually or by using an answer file. To manually install the key using Command line use the following Syntax from an administrative Command prompt:

slmgr.vbs /ipk <AVMA_Client_Key>

Once this is done you just have to sit back and relax!


The ‘activation’ process:

When a guest VM starts (or needs to activate again e.g. activation getting close to timing out) the guest uses the AVMA pipeline build inside the virtualization layer of hyper v to pass an encrypted packet to the host mentioning the following information along with the activation request: Which SKU it is running, The license state, The unique VM ID and data that will be logged inside the hyper v host’s event log corresponding to this activation request.

Host responds via the same AVMA pipe to the guest, an encrypted packet comprised of Activation approval/rejection, Host hardware ID and a signed version of the request packet that was sent by the guest (which can be used for verification purposes).

Note again that this whole process does not require a network connection of any sort between the host and guest, so if a VM is in a private network, it can still leverage AVMA activation. The Data Exchange Integration Service is used instead for this purpose. So let’s make sure that it is checked under the Integration Services in the virtual machine’s settings as shown below.

image

After an activation request is sent, the following is registered in the application logs of the guest virtual machine

image

Look for the Event ID 12309. It is not as verbose as the conventional KMS events.

The Hyper-V host also registers the logs about processing the activation requests coming from the client virtual machine as shown below.

image

Once the guest VM gets activated and you run slmgr.vbs /dlv on the guest, you should see something like this:

image

While KMS activation is valid for 180 days, AVMA activation is valid only for 7 days. If you see closely under description, it displays “VIRTUAL_MACHINE_ACTIVATION”, suggesting that the virtual machine is indeed activated by AVMA (just in case you little too skeptical), also look at expiration interval saying that the activation is valid for 7 days. What this means is that after 7 days the guest machine will contact the host again using the same procedure to get itself activated again, no user intervention is required.

This is the happy ending of the story. An activated world is much more colorful and joyous!

Thank you for reading, until next time, keep your windows activated...

Mayank Sharma
Support Engineer
Windows Platforms Support Team

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • GOOD WORK MAYANK..

  • You mean people actually use Hyper-V for production?

  • nice marlin

  • nice marlin

  • "The Hyper-V host is a Windows Server 2012 R2 Datacenter Edition."
    Sorry, how do I activate the guest if the host is Standard edition?

    Thank you

  • hi, i couldn't understand what do u mean by "This means that Windows Server 2012 VMs are not eligible for AVMA activation even if they are hosted on a 2012 R2 Hyper-V host. Similarly Windows Server 2012 Hyper-V hosts cannot activate VMs running Windows Server 2012 or 2012 R2 guests through AVMA."
    please clarify

  • @Edoardo
    Activating a virtual machine on standard edition is the same process as it always has been. We will only auto activate if you are running on Datacenter edition

  • @JHONY
    What this means is that it will only activate 2012R2 virtual machines. It will not activate 2012 and below virtual machines

  • That's exciting indeed. I wonder if within the same domain I can transfer a VM from my Hyper-v Datacenter edition to my Standard edition and still keep the registration? That'd be neat. Also what would happen if in the same cluster you have a Standard edition and a datacenter edition regarding AVMA?

  • answer to the first part is YES, you can do that but again keep in mind, you will have to move back your VMs to data center edition after 7 days.

    since you do not have standard and Datacenters edition in the same cluster. Not sure how can the situation arise.

  • @Cyril
    No it won't keep the registration, since it re-registers every 7 days (and the Standard edition host won't do accept the registration request). If it's domain joined you may be able to AD based activation instead.