[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

KMS issues - Count not increasing

Posted on 2012-08-20
20
Medium Priority
?
8,778 Views
Last Modified: 2014-10-10
I have setup a KMS host on a Windows 7 VM and given it a KMS key.

It has registered with DNS successfully and is able to update it's own records.

I have allowed TCP 1688 traffic into the box, and DCOM for WMI in and out.

Clients have DCOM for WMI allowed


I installed VAMT on the KMS host to view the activations, but have run into a problem - Nothing is being activated:

Clients (and VAMT) shows the following error:

0xC004F038 - The Software Licensing Service reported that the computer could not be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator.

I understand that I have to have 25 clients on the network (Windows 7) to count unto 25 activations. Once this is reached, the clients will be activated?

slmgr.vbs /dli shows

Windows 7 - Licensed
Key Management is enabled on this machine
Current count: 3
Listening on Port: 1688
DNS publishing enabled
KMS priority: Normal

Key Management Service cumulative requests received from clients
Total requests received: 110
Failed requests received: 0
Requests with License Status Unlicensed: 0
Requests with License Status Initial Grace Period: 3
Requests with License Status Notification: 107

Any help on this would be greatly appreciated!

Thanks.
0
Comment
Question by:gmbaxter
  • 8
  • 7
  • 4
  • +1
20 Comments
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38312036
This is normal. KMS server requires 25 activations before it activates itself. . You're on the right track.  As soon as you activate the remaining clients and reach 25, your KMS server will start showing counts.

Look at this article: http://technet.microsoft.com/en-us/library/ff793434.aspx 
Check out the section about Activation Thresholds.
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38312142
I have powered on, and pressed activate now on 30 machines on my network, yet the count is still 3.
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38312192
By the way, have you gone through this article?
http://technet.microsoft.com/en-us/library/ee939272.aspx
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 10

Expert Comment

by:George Khairallah
ID: 38312225
Also, are you seeing any errors in eventvwr.msc upon activation on your Windows 7 clients? how about your KMS server?  any reference to error 0xC004F074 ?
0
 
LVL 1

Accepted Solution

by:
shisgurus earned 1600 total points
ID: 38312242
We had this issue as well. We ended up having to Re-arm the machine so it would go through the activation process properly.

Run the following on the clients.
cscript c:\windows\system32\slmgr.vbs /cpky   <-- This clears out the current product key
cscript c:\windows\system32\slmgr.vbs /rearm <-- This rearms the client
reboot

cscript c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX <-- Put the KMS client key here instead of the X's.
cscript c:\windows\system32\slmgr.vbs /ato <-- This will attempt to activate.

After doing this it can take 10 or so minutes to update on the host, but this fixed our issues.

In order for this to work your KMS host must be registered properly with DNS. Run the following command to test.

nslookup -type=srv _vlmcs._tcp

The result of this command should return the port 1688 and the hostname should be the KMS host.
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38312303
@ gkhairallah:

Yes, gone through the link thanks.
We're seeing 0xc004f074 which is due to the count being too low apparently.

Seems we have duplicate CMIDs, which would explain the issue - cannot understand how this could happen though! According to: http://support.microsoft.com/kb/929829

This can only happen if:

Client Machine ID (CMID)

This is a unique value per system. If this is not unique it is because an image was not properly prepared for distribution (sysprep /generalize). This will manifest on the KMS host as a count that will not increase, despite a sufficient number of clients existing in the environment. See KB929829 for more info.

Thing is, I use WDS, so had to sys prep in order to get the image off, and I didn;t specify a re-arm in the unattend.xml file so don;t see how it happened.

@shisgurus - Thanks for that. Where do I get the KMS client key?

Did you find out why this happened to you? I cannot see what I did wrong here.

Any way to automate this?

Thanks.
0
 
LVL 10

Assisted Solution

by:George Khairallah
George Khairallah earned 400 total points
ID: 38312352
I believe that the /generalize option is what resets the CMID.  
I know this was an issue while deploying VM linked clones.
Can you try to do a sysprep /generalize and see if this may increase the count?

As far as automation, If your machines are currently all with the same CMIDs, then your best bet is probably to write a powershell script to reset their activation (and CMID), but that is only once your KMS server is happy.

In my case, since my KMS has been live and functional, I never have to activate or touch anything related to activation.
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38312371
By the way, I don't know if you use this tool, but it's usually pretty helpful as it helps you analyze your eventviewer and activations much more easily than eye balling them manually:
http://powergui.com
and then download the KMS Powerpack
http://powergui.org/entry.jspa?externalID=681
0
 
LVL 1

Expert Comment

by:shisgurus
ID: 38312395
We used the setupcomplete.cmd to run the rearm command. This runs after the first login.

As for the KMS client key if you google search it, it will be on a microsoft site.
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38312556
Thanks, I could modify my image vm and reimage.

does an unattend.xml automatically not rearm then. All info I can find suggests that generalize being run should not result in duplicate cmids.
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38312577
That's correct. Actually, in looking more into the command, it looks like /rearm and /generalize should both reset your CMID.  As for unattend.xml, I don't believe the file itself will rearm. It is merely an info file to populate installation parameters.

There is, however, a parameter you can set in unattend.xml to skip rearm: (though this is not exactly what you want to do in your case)
There is a unattend parameter you can use in unattend.xml you pass to sysprep.exe called Microsoft-Windows-Security-SPP\SkipRearm. If you set this to 1 you can run sysprep as many times as you want but you MUST remove this setting or set to 0 on the final running of sysprep otherwise the grace period is not reset(additionally the CMID is not reset which can cause problem with KMS activation). Many times we see deployments where the SkipRearm setting is left in the answer file and set to 1. Due to this and other best practices we do NOT recommend this.
http://blogs.technet.com/b/askcore/archive/2011/05/11/sysprep-skiprearm-and-image-build-best-practices.aspx
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38312705
thanks for the info. Will reset cmids tomorrow and post back
0
 
LVL 1

Expert Comment

by:shisgurus
ID: 38312743
If you use the sysprep and the unattend.xml to perform the rearm then as you make image updates and you rearm it will take your total down by one. You get 4 total with Windows 7.

If you use the setupcomplete.cmd method and use the KMS rearm command you still only get 4 however you can mount the image and remove the command when you down the image to make updates. Thus not using a rearm. Then after updates are finished you can re-apply the rearm command and sysprep the image.

I would try the commands in the order of my first post. We had the same issue and that solved it.
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38313122
Thanks.

I build in a VM, then snapshot just before a sysprep, run sysprep, then pxeboot to wds to capture the image.

When updating the image, I revert to my snapshot (pre sys prep) update, then same as before.

This should get around the rearm issue, but now I am wondering if this process has caused the CMID issue I wonder?

Looking at your commands, I could do the second half after the reboot with the VAMT toolkit, as that can send a key, and also be used to activate via KMS.
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38313132
You're not using VMware View. are you?
Linked Clones  with Windows 7 and VMware 4.0 U1 and older do not handle Windows CMID correctly.

I know this is likely not the case for you, but just in case, this is something I found out the hard way :)
0
 
LVL 1

Expert Comment

by:shisgurus
ID: 38313318
You can see the CMID if you run SLMGR.VBS /dlv and you can verify that they are different.

If they are the same run sysprep /generalize and that should solve the duplicate CMIDs
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38313716
Vmware ESXi 4.0 U1 win Win 7 SP1 x64 with regular snapshots.
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38313733
You are in fact on the problematic version, but as long as you're not using Linked Clones, this should not be an issue for you.
0
 
LVL 11

Author Comment

by:gmbaxter
ID: 38319767
Thanks for the help

I used:
slmgr.vbs computername /cpky
slmgr.vbs computername /rearm
Restart-Computer (Get-Content C:\Scripts\computers.txt)

Installed KMS client key via VAMT
Activated via VAMT


Also had an issue with Office Activation as a result of the duplicate cmids, and also finding out too late that you have to re-arm your office installation before taking an image.

Used the following script to re-arm office, then activated via VAMT:

& "C:\Program Files\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\ospprearm.exe"
shutdown /r

Open in new window


Invoke-Command (Get-Content C:\computers.txt) "ospprearm.ps1"
0
 
LVL 1

Expert Comment

by:SOCCSUPPORT
ID: 40373223
After doing a Forest / Domain migration from Windows 2008 to Windows 2008 our new KMS server count did not go up by the hundreds as I thought it would.  So after refreshing a few clients the KMS client count was still under 25 and the newly added workstations would not activate.  

So I had to use the SLMGR.VMS command with /cpky then again with /rearm.  After the workstation came backup I installed the Windows 7 KSM client key. Ran the command again with /ato and watch the KMS server count go up. So after a few times of this on other systems that were migrated all was well.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question