Set VM Template with Product Key

Learn how to set the product key in your virtual machine template.

John Savill

September 10, 2013

1 Min Read
Set VM Template with Product Key

Q: How can I configure my virtual machine (VM) template to set the product key automatically?

A: If you're using VM templates, the easiest way to specify the product key is by using something like System Center 2012 Virtual Machine Manager, which can inject whatever product key you need as part of the template. However, if you want to configure the product key outside of a management solution, you can use an answer file.

Below is a very basic answer file that specifies the Key Management Service (KMS) key for Windows Server 2012 Datacenter:

                          48HP8-DN98B-MYWDG-T2DCC-8W83P        OnError            true        I save this as unattend.xml in a folder on the machine that will be SYSPREP'd as c:unattendunattend.xml.I then run sysprep, passing this file. For example:c:windowssystem32sysprepsysprep /generalize /shutdown /oobe /unattend:c:unattendunattend.xmlWhen the template is used, there will be no prompt for the product key. In the past, keys were set as part of the specialist phase, for example:       48HP8-DN98B-MYWDG-T2DCC-8W83P   

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like