Link to home
Start Free TrialLog in
Avatar of Paul Wagner
Paul WagnerFlag for United States of America

asked on

KMS and XenDesktop 7.5

Environment:
XenDesktop 7.5 with 7.5 VDA  and PvD running Windows 7 Enterprise
PVS 7.6
UPM
Standard Windows domain

Issue:
After streaming a new vDisk to three VDAs, I am not getting consistent results.
When I boot up the machines and log in through an ICA session, it shows as having 30 days left to activate. If I let it wait for KMS update, the machine will activate, but if I reboot, it will deactivate and go back to the 30 day notice. Yes, I can run slmgr /ato or activate through VAMT, but that doesn't fix the problem if the license is wiped after every reboot.

User generated image
The machines are all getting unique CMIDs for Windows and Office.

I have followed:
http://carlwebster.com/citrix-xendesktop-7-7-provisioning-services-7-7-and-the-xendesktop-setup-wizard-with-write-cache-and-personal-vdisk-drives/
and
https://support.citrix.com/article/CTX128276

I opened a question on EE and thought the issue was fixed, but apparently it hasn't (hence this new question):
https://www.experts-exchange.com/questions/28983595/KMS-Not-Really-Working.html
This time, the key is staying but not retaining its activation.
Avatar of Carl Webster
Carl Webster
Flag of United States of America image

Do you have 25 devices activated through your KMS server?

I have never had a customer have an issue with PVS and KMS once the 25 device floor is reached.

https://www.citrix.com/blogs/2014/05/01/demystifying-kms-and-provisioning-services/
Avatar of Paul Wagner

ASKER

Yes, we have over 100 Windows VMs being activated by the KMS host. (Only 3 are currently seeking activation through the newly streamed vDisk.)

I'm not sure the '25 minimum' issue is at play here because these machines will eventually activate within a couple hours. There's a time delay, but they always activate and then lose it after reboot.
ASKER CERTIFIED SOLUTION
Avatar of Carl Webster
Carl Webster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The problem I foresee is that someone (end user or my boss) will complain that the machines are reporting that Windows isn't activated. I've never seen delayed activation like this before and would rather see KMS activation work on boot up. It would be regretful to deploy this vDisk only to find that there is a bigger issue and the only way to fix it is to put it back in private mode. That would suck.
KMS can take up to 2 hours to process an activation request.
Right, but once it's activated, it shouldn't get lost on a reboot.
Why not? The target device is essentially sysprepped on every boot or restart. That is why YOU do not sysprep a master image to be handled by PVS and also why you have to disable AD handling machine account passwords and let PVS handle that.
Point taken...
I've never seen this problem before. If KMS works, it works on bootup, not two hours later. It's a hard sell to say that it usually works right away but now we have to wait two hours.
How to troubleshoot the Key Management Service (KMS)\
https://technet.microsoft.com/en-us/library/ee939272.aspx

When in the 30 day Out of Box grace period, they will try to activate every 2 hours. Once activated, the KMS clients will attempt a renewal every 7 days.

KMS Activation Timing and Discovery
https://technet.microsoft.com/en-us/library/ff793418.aspx

In operation, the KMS client attempts to contact a KMS host on startup and again every Activation Interval minutes upon failure. By default, this happens every two hours.
I'm clear on all of the troubleshooting steps. We are not seeing appropriate behavior described by Microsoft:

"In operation, the KMS client attempts to contact a KMS host on startup and again every Activation Interval minutes upon failure."

The KMS client is not contacting the KMS host on startup. Nothing is being indicated in the event viewer as to why. This is the problem and we can't find information online to explain this behavior. While it sounds fine to wait two hours, this is not normal (even stated as much by Microsoft) and we want it to run properly.

Perhaps I can post this on a technet forum and see what they say.
@Carl Webster

I've opened a ticket with Microsoft and Citrix.

ISSUE:
The Windows machines are not activated after a reboot, but do activate after the 2 hour KMS update cycle.

Troubleshooting:
We have made a new vDisk and Device Collection in PVS. The image is in private mode with KMS set to none. Per Microsoft and Citrix, I ran a series of commands:
1.       cscript slmgr.vbs /ckms
2.       cscript slmgr.vbs /skms "KMSserverFQDN"  
3.       cscript slmgr.vbs /ipk “ProductKey”
4.       cscript slmgr.vbs /ato
5.       cscript slmgr.vbs /dlv
6.       cscript slmgr.vbs /rearm

After running the /rearm command, I ran inventory (per Citrix).
Inventory shut down the VM and I put the vDisk back into Standard mode with KMS radio button checked.

I booted a VM to the new vDisk and it still shows a "30 days to activate" message. Any advice? MS and Citrix could not solve it and will get back to me tomorrow.
Note: MS suggests running a startup script with slmgr /ato, but I'm not enthused about creating scripts for things that should just natively work.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This has been a confusing experience for me. Having managed a XD/PVS environment for over three years, I have *never* seen the machines boot up without activation (as long as KMS is working right). For some unknown reason, that Citrix or MS is not able to explain, that changed within the past few months. The VMs boot up without being activated and then eventually activate. Before, they booted up being activated. Why not now? MS offered that we run a startup script with the 'slmgr /ato' command if we really are bothered by seeing the 30 day message. I will test this but will likely accept that the VMs will activate within two hours. Thanks for your help, Carl.