Everything you need to know about Citrix Licensing. Take a deep breath and jump in !

More from the Lab!

 

Before being able to use most of Citrix products, you need to install Citrix licensing.

How does it work?

Citrix Licensing is a system of components that function together. This system includes:

License server

Server hosting the Citrix license software and the licenses. Can be dedicated or shared depending of the size of your infrastructure.

Daemon

Licenses are granted via the Citrix vendor daemon which is a process (Citrix.exe) running on the license server.

Console

The interface you use to manage the license files and the license server.  You can connect to that console by typing: http://localhost:8082 locally on the license server.

Startup License  (Citrix_startup.lic)

The startup license is free and is added when you install Citrix license server. This license is used by servers to initialize and maintain the communication with the license server. With the startup license, you can view the servers connected to the license server.

Startup License
Startup License

This license allows 10000 clients to connect to the Citrix license server.

Hosts connected to the license server
Hosts connected to the license server

Do not remove that file !

Citrix Licenses (.lic)

License files created by Citrix and available on MyCitrix.com.

Citrix.opt

The options file (Citrix.opt) gives or restricts access to licenses.The Citrix vendor daemon reads this  configuration file every time it starts. Documented here: http://support.citrix.com/article/CTX108661.

License file explained

License format

License details

  1. HOSTNAME
    • Server hosting Citrix licensing. No port number after the host name means it is using the default port number, 27000.
    • SERVER this_host HOSTNAME=license_server1 27110
  2. Vendor
    • The VENDOR line specifies the Citrix vendor daemon name, path, options file path, and port number. Vendor Citrix is the default configuration.
    • VENDOR CITRIX options=”C:\Program Files\Citrix\Licensing\MyFiles\CITRIX.opt” Port=27900
  3. Use Server
    • This element tells the product to rely on the Citrix vendor daemon to validate license check outs
  4. INCREMENT
    • New license pool in the license console
  5. XDT_PLT_UD
    • Product version and edition, in this example XenDesktop platinum User/Device
  6. SA_expiry_date
    • SA expiration date. This date is checked by most Citrix software.
  7. exp_date
    • License expiration date. Most of them are permanent and don’t expire. However keep in mind that new software will require your SA to be up to date.
  8. Num_lic
    • Number of licenses
  9. LT
    • Pretty much all of the time Retail license.
  10. SA 
  11. OVERDRAFT
    • Number of licenses you are allowed to allocate when all the licenses you paid are in use. When all your licenses and all your overdraft licenses are used, the license server will reject new license requests.
  12. DUP_GROUP
    • The value V allows license sharing for the same client device.
  13. ISSUED
    • Date the license was downloaded from MyCitrix.com.
  14. NOTICE
    • Your company name
  15. SN
    • License serial number
  16. START
    • Date the license was purchased
  17. SIGN 
    • License signature

Example (most important elements are highlighted):

Citrix License file
Citrix License file

Documented here.

License process

Schema

Citrix Licensing Schema
Citrix Licensing Schema

Startup

  • #1 – When a Citrix product starts, it retrieves the license server location from its configuration (local or remote datastore).
  • #2 – The Citrix product connects to the Citrix license server (default port 27000).

    Startup communication on port 27000
    Startup communication on port 27000
  • #3 – The product checks out a startup license (citrix_startup.lic) using the Vendor daemon (default port 7279).
    Allocating Startup license
    Allocating Startup license
    Startup license
    Startup license

    Startup license
    Startup license

New connection

  • #4 – A new user start a Citrix session.
    • #4A – VDI session
    • #4B – XenApp Session
  • #5  The server/desktop hosting the session requests a license from the license server by connecting to the vendor daemon (default port 7279). In the case of XenDesktop 7.6, the query comes from one of the controllers and not the server hosting the application.
    New user session communication
    New user session communication

    The Citrix vendor daemon checks to see if any licenses are available and grants or denies the product’s request. The user checks out a license.

  • #7 – The license module in the product grants or denies the use of the product based on the response from the Citrix vendor daemon. When using Concurrent license, there is also communication with the license server using the vendor daemon to release the license. With User/Device, such communication does not occur.

Admin connection

  • #A1 – An admin connects to the license administration console using the following address:
    http://localhost:8082

    • #A2 – The console reads the licenses located in C:\Program files (x86)\Citrix\Licensing\MyFiles using the vendor daemon
  • #B1 – An admin connects to the simple license console using the following address:
    http://localhost:8083

    • #B2 – The console connects to MyCitrix.com.

What is the simple license service ?

The Citrix Simple License Service enables you to allocate and install license files on a license server using a web page interface. This allows you to not have to go on MyCitrix.com to allocate your licenses. Internet access is required to gather information from Citrix website. In a secure environment, the license server does not have access to internet, therefore you will not use that feature.

 

Grace Period

The grace period is by default 30 days. This only applies if the Citrix product was able to communicate at least once with the license server. Once the communication is re-established, the grace period will be reseted. If the grace period runs out, the product stops accepting connections. f a Citrix product server loses its connection to the license server, the product enters a grace period and uses its local record of the licenses to continue licensing the product during the grace period. Citrix products update this record every hour.

Licensing models

Users/Devices

Cheapest model available. Licenses are assigned either to unique users or to shared devices. If assigned to a unique user, it allows unlimited Citrix sessions for this user from unlimited devices. If assigned to a shared device, it allows unlimited users to open unlimited Citrix sessions from this device only.

Concurrent

Each user connected uses one license. As soon as he disconnects, the license is released and can be use by another user. Expensive but easy to manage.

VPX or Windows

There are two options to install Citrix License server:

  1. Virtual Appliance 
    • The virtual appliance is only available for XenServer hypervisor. There is few tutorials to convert that image to be compatible with Microsoft Hyper-V or VMware vSphere, however that is not supported by Citrix and should not be installed in a production environment.
  2. Windows Software 
    • It is the easiest way to install Citrix License server as it can be use on the same server as the Remote Desktop Services License server which is mandatory in any XenApp deployment.

In the following article, we will discuss how to install and configure Citrix License server running on Windows Server 2012 R2.

Download

To download Citrix License Server binaries, go to https://www.citrix.com/downloads/licensing.html.

The latest version available at this time for Windows is the version 11.12.1.

Download License Server binaries
Download License Server binaries

Requirements

Citrix supports the following Microsoft OS:

  • Windows 8.1 (32/64bit)
  • Windows 8 (32/64bit)
  • Windows 7 (32/64bit)
  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows Server 2008 R2
  • Windows Server 2008 (32/64bit)

Configuration

In the Citrix Guru lab, I’ve created a dedicated VM with the following configuration:

  • Name: LIC01
  • IP address: 10.0.0.9
  • Subnet mask: 255.0.0.0
  • Domain: CITRIXGURU
  • 1024 MB of RAM
  • 1 vCPU
  • Network adapter: 1 – LAN (vLAN ID 2)
  • 50 GB HDD
  • Windows Server 2012 R2 Datacenter edition

Install Citrix License server

To make it easier, I’ve create an .iso file with the .zip file downloaded from Citrix website and mounted that .iso file on my virtual machine.

Select CitrixLicensing.exe to start the installation.

Select CitrixLicensing.exe
Select CitrixLicensing.exe

Accept the Software License Agreement.

Accept the Software License Agreement
Accept the Software License Agreement

Specify the location of the installation.

Specify the location of the installation
Specify the location of the installation

Configure the Ports:

  • The license server port is 27000. The port is used by the Citrix license manager.
  • Vendor Deamon port is 7279. The port is used for core operations.
  • Management Console web port is 8082. The port is used to connect to the License Administration Console.
  • Web Services for licensing port is 8083. The port used to connect to the Simple License Service.

Most of customers configure the license server with the default ports.

Configure the ports
Configure the ports

By default, the account you are using to install Citrix License server will be the default administrator for the License Administration console.

Installation in progress.

Installation in progress
Installation in progress

Citrix license server is installed.

Successfully installed
Successfully installed

Citrix licensing Ports

Citrix licensing ports
Citrix licensing ports

Citrix licensing Services

There are four windows services created after the installation:

  1. Citrix licensing
    • This service provides licensing services for Citrix products.
  2. Citrix licensing support service
  3. Citrix licensing WMI
    • This service provides access to Citrix Licensing WMI classes.
  4. Citrix Web services for licensing
    • This is service that automates the allocation and installation of licenses on the Citrix License Server.

Get the license file

Logon to mycitrix.com and go to https://www.citrix.com/account/toolbox/manage-licenses/overview.html.

You should see the following on the screen:

Citrix Website- - License management
Citrix Website- – License management

Licenses are attached to server IDs. Please note that the name of the host(Host ID) is case sensitive in the configuration.

MyCitrix is not the most user-friendly website, but to reuse licenses that you already have you need to reallocate them.

Select Reallocate, find the license you want to reallocate and select Continue.

MyCitrix Licenses
MyCitrix Licenses

Then enter the name of your new host (LIC01 in the lab):

MyCitrix Reallocation
MyCitrix Reallocation

You can also select the number of licenses that you want to reallocate, in our case, we want to reallocate all the licenses (200).

MyCitrix Confirmation
MyCitrix Confirmation

Select Confirm. Then the website will ask you if you want to download to license.

Download the license
Download the license

On the next screen, select Download to get the file.

Download
Download

The last step here is to transfer that file to the virtual machine.

Configure Citrix License server

On the license server, open IE and browse to the administration console, go to http://localhost:8082.

Administration console
Administration console

Select Administration and enter your credentials. The same you’ve used to install the software.

The first step is to configure the administrators of the license server. By default it is only the local admins of the server and the admin who installed the software for the first time.

Default admins
Default admins

To add new administrators, select New user.

Select Domain Administrator group
Select Domain Administrator group

In our lab, we have a dedicated AD group for administrators of the license server (CITRIXGURU\LicensingAdmins).

Group added
Group added

Select Vendor Daemon configuration, and select Import License.

Import License
Import License

Browse to your license file.

Select License file
Select License file

The license has been uploaded.

Import successful
Import successful

Select OK. The license file will appear in the following default directory:

    • C:\Program files (x86)\Citrix\Licensing\MyFiles
New license
New license

Select Reread license files to apply the changes.

Select Reread license files
Select Reread license files

The dashboard is now updated with the new license. Here we have added 200 XenDesktop Platinum User/Device licenses with SA valid until mid-april 2015.

New license
New license

How to test that the license server is working?

First, connect your XenDesktop infrastructure to the new license server.

XenDesktop connected to the license server
XenDesktop connected to the license server

Then start a session.

Once the session is open, go back to the License console and check your license usage.

License usage
License usage

The value has changed to 1 (220). Select Hosts.

Hosts
Hosts

Note that there is not a lot of information here.

UDAdmin GUI

UDAdmin GUI is a tool showing the users and the devices using the licenses. Download UDadmin GUI 1.6 or go to the website.

UDadminGUI
UDadminGUI

On this example you can see that, there is one license in use in that lab and the name of the user is user1.

Note: this tool also allows you to release User/Device licenses, it could be useful if you want to release licenses of people who left the firm.

Command Line Tools

Licensing Tools
Licensing Tools

LMUTIL

The lmutil utility displays a list of licensing utilities when used standalone. When you specify lmutil with another command, it executes that command.

LMUTIL
LMUTIL

LMSTAT

LMSTAT
LMSTAT

UDADMIN

 

UDADMIN
UDADMIN

To release a license in command line, you can type the following command:

 

UDADMIN - REMOVE
UDADMIN – REMOVE

LMDIAG

 

LMDIAG
LMDIAG

LMHOSTID

 

LMHOSTID
LMHOSTID

LSQUERY

Tool provided by Citrix to quickly get all the information about the license server.

Download LSQuery or from Citrix.

.NET 3.5 SP1 is required.

LSQUERY
LSQUERY

LSQuery creates a zip file in the same location you run the LSQuery.exe :

LSQUERY Export
LSQUERY Export

The ZIP file contains data about the server configuration (Network, Ports, Services, OS, etc) and Citrix license configuration (Licenses files, details, etc).

WMI

You can query the license server using WMI via PowerShell to get information about your licenses.
Note: you don’t need to have the Citrix Licensing WMI service started to run WMI queries.

Below is a script created by zoomar.com:

 

More from the Lab!

 

4 COMMENTS

  1. Hi,
    Very good information. Is it possible to reduce the lease of a licence ? I have a huge gap between sessions (From Director) and consumed licences.

  2. Thank you very much for the post… I had an doubt here when servers enter into grace period which component is responsible for updating the grace period value saying like 600 hrs or 500 hrs of grace period left

Comments are closed.