You are on page 1of 31

8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Lab: Part 10 – Citrix Licensing demystified


By Nicolas Ignoto - November 12, 2015

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

More from the Lab!

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 1/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Building a Dual-Xeon Citrix Lab: Part 1 – Considerations


Building a Dual-Xeon Citrix Lab: Part 2 – Hardware
Building a Dual-Xeon Citrix Lab: Part 3 – Windows and Hyper-V installation
Lab: Part 4 – Hyper-V Networking
Lab: Part 5 – NetScaler 11 Architecture and Installation
Lab: Part 6 – Configure NetScaler 11 High Availability (HA Pair)
Lab: Part 7 – Upgrade NetScalers in HA
Lab: Part 8 – Save, Backup and Restore NetScaler 11 configuration
L b P t 9 I t ll Mi ft SQL S 2014 (D di t d)
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

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 2/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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 le explained

License format
1 #FILE FORMAT#
2 SERVER XXX_XX HOSTNAME=XXX:PORT
3 CITRIX VENDOR
4 USE_SERVER
5 INCREMENT feature vendor SA_expiry_date exp_date num_lic \
6 VENDOR_STRING=XXX;LT=XX;GP=XX;GP=XX;SA=X;LP=XX;ODP=X;NUDURMIN=XX;NUDURMAX=XX; \
7 OVERDRAFT=XX;DUP_GROUP=X;ISSUED=X;NOTICE="XXX"; \
8
SN=XX-XXXXXXXXXX-XXXXX:LICENSE_FILE_NAME \
9
START=DD-M-YYYY SIGN="XXXX XXXX XXXX XXXX \
10
11 XXXX XXXX XXXX XXXX XXXX \
12 XXXX XXXX XXXX XXXX XXXX"
13  
14 INCREMENT..
15 INCREMENT..
16 ..
#DESCRIPTION#

License details

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 3/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 4/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

17. SIGN
License signature

Example (most important elements are highlighted):

Citrix License file

Documented here.

License process

Schema

Citrix Licensing Schema

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 5/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

#3 – The product checks out a startup license (citrix_startup.lic) using the Vendor
daemon (default port 7279).

Allocating Startup license

Startup license

Startup license

New connection

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 6/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

#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

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.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 7/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 8/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

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)

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 9/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Con guration
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

Accept the Software License Agreement.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 10/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Accept the Software License Agreement

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.
https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 11/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Most of customers configure the license server with the default 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

Citrix license server is installed.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 12/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Successfully installed

Citrix licensing Ports

Citrix licensing ports

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 13/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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 le


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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 14/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

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

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

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 15/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Download the license

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

Download

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

Con gure Citrix License server


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

Administration console

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 16/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

To add new administrators, select New user.

Select Domain Administrator group

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 17/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Group added

Select Vendor Daemon configuration, and select Import License.

Import License

Browse to your license file.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 18/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Select License file

The license has been uploaded.

Import successful

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

C:\Program files (x86)\Citrix\Licensing\MyFiles

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 19/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

New license

Select Reread license files to apply the changes.

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.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 20/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

New license

How to test that the license server is working?


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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 21/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 22/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 23/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 24/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 25/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

LMUTIL

LMSTAT
1 .\LMUTIL.EXE LMSTAT -a –c “Path to license file”.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 26/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

LMSTAT

UDADMIN
1 .\UDADMIN.EXE -list

UDADMIN

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

1 .\UDADMIN.EXE -f <LICENSE_TYPE> -user <USER> -delete

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 27/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

UDADMIN – REMOVE

LMDIAG
1 .\LMUTIL.EXE lmdiag -c "Path to the license file"

LMDIAG

LMHOSTID
1 .\LMUTIL.EXE lmhostid

LMHOSTID

LSQUERY
Tool provided by Citrix to quickly get all the information about the license server.
https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 28/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Download LSQuery or from Citrix.

.NET 3.5 SP1 is required.

LSQUERY

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

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

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 29/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

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:

1 #Region Settings
2 #Your License Server
3 $CitrixLicenseServer = "ctxlic"
4
5 #Do you want to report on licenses with 0 users?
6 $ShowUnusedLicenses = $true
7
8
#Toggle an alert above this percentage of licenses used
9
10 $UsageAlertThreshold = 80
11
12 #EndRegion Settings
13
14 #Region CollectData
15 #retrieve license information from the license server
$LicenseData = Get-WmiObject -class "Citrix_GT_License_Pool" -namespace "ROOT\CitrixLicensing"
16   -ComputerName $CitrixLicenseServer
17
18 $usageReport = @()
19 $LicenseData |  select-object pld -unique | foreach {
20     $CurrentLicenseInfo = "" | Select-Object License, Count, Usage, pctUsed, Alert
21     $CurrentLicenseInfo.License = $_.pld    
    $CurrentLicenseInfo.Count   = ($LicenseData  | where-object {$_.PLD -eq $CurrentLicenseInf
22 o.License } | measure-object -property Count      -sum).sum
    $CurrentLicenseInfo.Usage   = ($LicenseData  | where-object {$_.PLD -eq $CurrentLicenseInf
23
o.License } | measure-object -property InUseCount -sum).sum
    $CurrentLicenseInfo.pctUsed = [Math]::Round($CurrentLicenseInfo.Usage / $CurrentLicenseInf
24
o.Count * 100,2)
    $CurrentLicenseInfo.Alert   = ($CurrentLicenseInfo.pctUsed -gt $UsageAlertThreshold)
25
26     if ($ShowUnusedLicenses -and $CurrentLicenseInfo.Usage -eq 0) {
27         $usageReport += $CurrentLicenseInfo
28     } elseif ($CurrentLicenseInfo.Usage -ne 0) {
29         $usageReport += $CurrentLicenseInfo
30     }
31 }
32 #EndRegion CollectData    
33 $usageReport | Format-Table -AutoSize
34 #$usageReport | Format-Table -AutoSize | out-file "c:\temp\usagereport.txt"
35
36 # If any record raises an alert, send an email.
37 if (($usagereport | where {$_.alert -eq "True"}) -ne $null) {
38
    #Send Email Here
}

More from the Lab!

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 30/31
8/9/2019 Lab: Part 10 - Citrix Licensing demystified - Nicolas Ignoto, CTP

Building a Dual-Xeon Citrix Lab: Part 1 – Considerations


Building a Dual-Xeon Citrix Lab: Part 2 – Hardware
Building a Dual-Xeon Citrix Lab: Part 3 – Windows and Hyper-V installation
Lab: Part 4 – Hyper-V Networking
Lab: Part 5 – NetScaler 11 Architecture and Installation
Lab: Part 6 – Configure NetScaler 11 High Availability (HA Pair)
Lab: Part 7 – Upgrade NetScalers in HA
Lab: Part 8 – Save, Backup and Restore NetScaler 11 configuration
L b P t 9 I t ll Mi ft SQL S 2014 (D di t d)

Nicolas Ignoto
https://www.citrixguru.com

Founder of citrixguru.com. Citrix Architect, Citrix CTP, CCE-V & CCP-N.

https://www.citrixguru.com/2015/11/12/lab-part-10-citrix-licensing-demystified/ 31/31

You might also like