One of the many useful features that comes in Windows Server 2012 R2 is Automatic Virtual Machine Activation. This feature will allow Windows Server 2012 R2 virtual machines to be activated once the host which has to be running Windows Server 2012 R2 Datacenter edition has been activated using MAK, OEM or KMS activation mechanism.
There is a detailed blog on the Windows Server Core Team blog and I am not going to repeat the information in that blog. If you want to learn more follow the link.
To activate the VM in an elevated command prompt use the command
slmgr /ipk <AVMA Client Key>
The AVMA keys and the Windows Server editions that they apply to
Edition | AVMA Key |
Datacenter | Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW |
Standard | DBGBW-NPF86-BJVTX-K3WKJ-MTB6V |
Essentials | K2XGM-NMBT3-2R6Q8-WF2FK-P36R2 |