VMM uses Template objects to deploy new VMs from templates stored in the Library. To automate the provisioning of new VMs from templates, VMM can pass the answer file to Windows during sysprep customization/specialization (this is why you create Guest OS profiles). The Guest OS profile is where you specify the Product Key for the OS that it applies to. Keep in mind though, VMM can only validate the syntax of the product key… not if the key is valid for that OS. So if you create a guest OS profile with a syntactically valid product key but invalid for the OS being deployed, you will get the following error during specialization (terminology specific to Vista/Windows Server 2008):
To correct this, simply update the product key in the guest OS profile and deploy.