Activating virtual machines via Automatic Virtual Machine Activation in Windows Server 2012 R2
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?
- 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 featureavailable 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: https://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...
Mayank Sharma
Support Engineer
Windows Platforms Support Team
Comments
- Anonymous
January 01, 2003
@JHONY
What this means is that it will only activate 2012R2 virtual machines. It will not activate 2012 and below virtual machines - Anonymous
January 01, 2003
@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. - Anonymous
January 01, 2003
nice marlin - Anonymous
January 01, 2003
nice marlin - Anonymous
January 01, 2003
@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 - Anonymous
November 13, 2013
GOOD WORK MAYANK.. - Anonymous
November 19, 2013
You mean people actually use Hyper-V for production? - Anonymous
January 03, 2014
Pingback from Microsoft – Preparing for free exam 74-409 Server Virtualization with Windows Server Hyper-V and System Center | blog.bjornhouben.com - Anonymous
January 03, 2014
Pingback from Microsoft – Preparing for free exam 74-409 Server Virtualization with Windows Server Hyper-V and System Center | blog.bjornhouben.com - Anonymous
January 07, 2014
Pingback from Automatic Virtual Machine Activation in Windows Server 2012 R2 | SME IT guy - Anonymous
April 10, 2014
"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 - Anonymous
April 13, 2014
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 - Anonymous
April 16, 2014
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? - Anonymous
July 26, 2014
[mention:35cbe78919bb470b9c4522dfb9a20390:e9ed411860ed4f2ba0265705b8793d05] 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. - Anonymous
February 03, 2015
Have two VMs on esxi 5.5/VMWare. The Windows 2012 Server is fine, however my Win 2008 Server R2 always asks for the license key. I have a genuine key but it keeps asking. The 2012 VM is fine (I guess due to AVMA). Any one know of a resolution for this? - Anonymous
May 25, 2015
slmgr.vbs /ipk (AVMA_Client_key) is a Key of my Hyper V server? - Anonymous
June 24, 2015
And if my vm was Windows Server 2008? AVMA doesn´t work no? how can I activate? - Anonymous
July 06, 2015
thanks for the article, what happens if the guest VM is replicated to another host? how it would affect the activation? - Anonymous
August 21, 2015
i've installed Exchange server on a VM,which was not activated.
it was working fine though,now as soon as i activated the machine my exchange server is not connecting...Please help me with this - Anonymous
September 07, 2015
I know this is old but a great article and thanks for the time invested to get this out here. I am running server 2012 and 2 hyper v machines (server 2012 std for active directory and server 2008r2 for a RDS server (since I only own 2008 Terminal server licenses). How can I activate my 2008 rr2 std machine under the 2 licenses available for hyper v machines? The A/D activated instantly but the server 2008 r2 std will not, it ask's for a key that I do not have - Anonymous
October 13, 2015
I'm having same problem as Mike, did you resolve? - Anonymous
March 21, 2016
If AVMA cannot be used for automatic activation cannot be used on 2012 Server (which seems silly), then what are the available options for activation?Thanks.