The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator

5 Jun

I recently received the error “The remote session was disconnected because there are no Remote Desktop Licence Servers available to provide a license. Please contact the server administrator” when connecting to my VDI via my thin client.

image001

I spoke with guys as MSDN and on the partner network via online chat and was told that the temporary licences had expired and that I need to buy some licenses.

I had been running the VDI setup as a trial and so I bought 10 VDA licenses (this is a whole other story for another day, but from sending the order through to GreyMatter it took 24 hours to get setup on the Open License portal and a further 24 hours to receive the product keys from Microsoft, not exactly speedy and not something you would want in a production environment).

image009

I added these license to RD Licensing manager. I couldn’t use the standard product key from the Microsoft Volume Licensing Centre as it wouldn’t accept it:

image013

Error: “The license code is not recognised. Ensure that you have the correct license code.”

image019

I then discovered that you could select ‘Other Agreement’ instead:

image011

and then enter the ‘V’ number that came from Microsoft in the email:

image016

I could then select ‘Windows Server 2012′ and ”VDI Suite Per Device subscription license’ and a quantity of 10.

image017

This can then be seen in the RD Licensing manager.

image004

So I then tested it again from my thin client and I was still getting the same error.

I then tried deleting the registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing) on the thin client suggested here but this didn’t fix it either.

On the Connection broker the following was appearing:

image020

I removed the Licensing role and then added it again, I even added it on a separate 2012 server but this didn’t help matters. I tried rebooting the connection broker and the licensing server but this made no difference either.

I tried rebuilding the license server database but this didn’t help either:

image010

Everything seemed to be correct in server manager overview:

image023

And the licencing mode seemed correct under deployment properties:

image007

If I connected from my Thin Client I was still seeing the error message but it looked like the license server was assigning it a licence:

image008

In the even viewer on my broker I found:

image024

“The RD Licensing grace period has expired and Licensing mode for the Remote Desktop Session Host server has not been configured. Licensing mode must be configured for continuous operation.”

This led me to Experts-Exchange (after many many searches on Google) and this article:

by: doshinhereticPosted on 2013-02-22 at 08:58:50ID: 38918707

After two days with Microsoft and rebuilding everything three times; The problem that everyone is having is simply a problem with the registry.

If your grace period has expired then you must delete the GracePeriod reg entry in order to get the licensing working again.

computer\hkey_local_machine\system\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

Delete the REG_BINARY entry that is not the default.

Then try turning it off and on again. After rebooting all of the servers the license server should serve up some deleicious RDP CALs.

If that doesn’t do it there are four places that the Licensing server must be specified. In the Deployment Settings in the server manager, The local group policy, the domain policy and in the registry in the RCM folder.

I found the registry key in question on my connection broker:

image014

However, when trying to delete the key I received the following error:

image015

I had to change the owner under permissions to myself (domain admin account) and then I could delete it.

I tried to connect again but got the same error so I then rebooted my connection broker.

Once the Connection Broker was rebooted all my users could log in again, woop!

Happy days, it’s now all working and legitimately licensed. (Following 2 quite stressful days when it wasn’t working, thanks Microsoft, some more testing of 2012 required perhaps?)