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?
- AVMA is perfect for hosted environments where virtual machines do not have access to the internet or the hoster’s network.
- 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.
- 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.
After an activation request is sent, the following is registered in the application logs of the guest virtual machine
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.
Once the guest VM gets activated and you run slmgr.vbs /dlv on the guest, you should see something like this:
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…
Windows Platforms Support Team