VMware News, Views, and How-To's from vExpert Josh Townsend

Using KMS for VMware View Windows Activation

Windows KMS Activation in VMware ViewWhen deploying or recomposing a pool of Windows 7 (or Windows Vista) virtual desktops on VMware View, you may receive an error message stating: “composer agent initialization error (16): Failed to activate software license (waited 0 seconds).”  This error occurs when you use a Multiple Activation Key (MAK) to activate the parent VM.  View Composer QuickPrep, by default, uses Microsoft Key Management Services (KMS).  VMware KB Article 1026556 provides workarounds for activating MAK clients, or bypassing activation by QuickPrep so you can use a trial key.  The workarounds are appropriate for test/pilot cases, but will eventually cause problems such as MAK key exhaustion.  The proper way to license and activate a deployment of Windows 7 on VMware View is to use a KMS.

A KMS can be installed on any Windows Server version 2003 or newer, and on Windows 7.  If using Windows Server 2003 to activate Windows 7 or Windows 2008 R2, you’ll need to install KMS Server first (download it here, then apply KB968915).  Windows 2008 and above includes the necessary bits for hosting a KMS.  Using a Windows Server 2008 R2 host as your KMS is highly recommended, as it can activate previous versions and lower editions of Windows – server and workstation editions alike.

On the Windows 2008 R2 server you have chosen to run your KMS, install your KMS key (you can get this from the Microsoft Volume Licensing Service Center) by typing slmgr.vbs /ipk <KmsKey> at an elevated command prompt.  Note that a KMS host key for Windows Server 2008 R2 Standard/Enterprise or higher can activate Windows 7/Windows Vista too, so you only have to enter a single key here.  Next, activate your KMS Server online by using the command slmgr.vbs /ato from an elevated command prompt.  The KMS server will make an outbound connection to Microsoft’s activation servers on TCP 80.  If Internet connectivity is not available for your KMS server, run slui.exe 4 from the command prompt to activate by telephone.  Once activated, restart the ‘Software Protection Service’ on the KMS server.

Next, create a Windows Firewall rule (or equivalent endpoint security software’s firewall) to allow inbound Key Management Service traffic (TCP 1688 by default – note that Windows has a pre-configured rule for this) from your View desktops.  Also, configure automatic publishing of KMS resource records to DNS by running slmgr /sdns from an elevated command prompt (note: a standard KMS implementation does this by default).  Verify that your KMS Resource Records (RR’s) are created in DNS under the _VLMCS._TCP record on your AD zone (see https://technet.microsoft.com/en-us/library/ff793405.aspx for help in determining the correct DNS records for your KMS).

You are now ready to create your parent VM in View.  When you create the parent VM, use a Microsoft KMS key when prompted for the product key information.  Microsoft KMS Client Setup Keys are published here: https://technet.microsoft.com/en-us/library/ff793406.aspx – these are different than the KMS Host Keys you get in the Microsoft Volume Licensing Service Center.  Windows 7 and Windows 2008 R2 use KMS by default to activate, so as long as you use the correct KMS Client Setup Key and having a running KMS server with correct DNS, your Windows 7 View VM should be activated automatically.  If you’ve already built a parent VM using a MAK or retail key, you may be able to convert it to a KMS key by using the Volume Activation Management Tool (VAMT) MMC from Microsoft.

You may also want to use a KMS server to activate your Microsoft Office 2010 suites and applications, including Visio and Project.  Your KMS Host will need the Microsoft Office 2010 KMS Host License Pack.  Using a KMS Host for Office on View desktops (including on VMware ThinApp packages of Office 2010) can save you an activation headache.

Now, when you deploy or recompose your View virtual desktop infrastructure pools using QuickPrep, your internal KMS server will activate your View desktops, without any pesky activation warning messages!