Explain Citrix License and how it works?

The startup license is a Citrix system file that enables Citrix products to maintain a continuous connection to the license server. The Citrix product makes a continuous connection to the license server. The license server can support up to 4000 continuous connections

If product servers lose communication with the license server, the users and the products are protected by a grace period that allows the product servers to continue operations as if they were still in communication with the license server. After a startup license is checked out by the Citrix product, the product and the license server exchange “heartbeat” messages every 5 minutes to indicate to each other that they are still up and running. If the product and the license server fail to send or receive heartbeats, the product lapses into the licensing grace period and licenses itself through cached information.

The grace period is set by Citrix. It is typically 30 days but can vary depending upon the product. After communication is re-established between the product and the license server, the grace period is reset. The grace period takes place only if the product has successfully communicated with the license server at least once.
License Server Components

The license server comprises several licensing components:
•Citrix vendor daemon
•License files
•Options file
•Startup license

Citrix Vendor Daemon
Licenses are granted by the Citrix vendor daemon (Citrix.exe), a process that runs on the license server. The Citrix vendor daemon tracks the number of licenses that are checked out and which product has them. Citrix products communicate with the Citrix vendor daemon using TCP/IP. By default, the Citrix vendor daemon uses TCP/IP port 7279.

License Files
License files are text files (.lic) created by Citrix that store licensing data. They contain information about the product licenses and the number of licenses, as well as system information such as the name of the license server. The license server uses these files to determine whether to grant a license to a Citrix product.

Startup License
The startup license (citrix_startup.lic) allows Citrix products to communicate with the license server using a continuous open connection.
The startup license:
•Tracks which product servers are connected to the license server
•Stores licensing system information

The Startup license does not affect the license count. It is used to allow Citrix products to communicate with the license server using a continuous open connection. Every five minutes the license server and the products send a heartbeat message to each other to verify that they are mutually communicating.

Caution: Do not edit the startup license file, or any other license files.

Options File
The options file (Citrix.opt) is a license server configuration file that the Citrix vendor daemon reads every time it restarts or receives a command to reread the file. This configuration file defines licensing behavior—the number of licenses a product server can use, the location of the system logs, and other user-defined customizations.

The License Request Process

When a product requests a license from the license server, the Citrix vendor daemon determines whether a license is available for the request.
The license request process has two phases: the product startup phase and the user connection phase.

Product Start-Up Phase
•When a Citrix product starts, it retrieves the license server location from its data store
•The product connects to the Citrix vendor daemon
•The product checks out a startup license

User Connection Phase
•A user connects to a computer running the Citrix product
•The product requests a license from the license server
•The Citrix vendor daemon checks to see if any licenses are available and grants or denies the product’s request
•The license module in the product grants or denies the use of the product based on the response from the Citrix vendor daemon

Hacking Citrix license server console

Older versions of Citrix license server:
1. Open the file C:\Program Files\Citrix\licensing\LMC\Tomcat\conf\tomcat-users.xml
2. There would be a line like: <user username=”DOMAIN\USERNAME” password=”” fullName=”User Name” roles=”lmc-access-role,lmc-current-usage-role,lmc-historical-usage-role,lmc-configuration-role,lmc-user-admin-role”/>
3. Copy this line paste it, change it to your own username
4. Save the file and log in to the Citrix license server console

Newer versions of Citrix license server:
1. Open the file C:\Program Files\Citrix\Licensing\LS\conf\server.xml
2. There would be a line like: <user firstName=”System” id=”admin” lastName=”Administrator” password=”(ENC-01)E4kR4LnUN14dUSdkZS5eTsvkB+CD8Q65nEePr+4FQZjCkNjf” passwordExpired=”false” privileges=”admin” />
3. Change the password value to a temporary password and change the passwordExpired value to “true”.
4. So it should be like: <user firstName=”System” id=”admin” lastName=”Administrator” password=”password” passwordExpired=”true” privileges=”admin”/>
5. Save the file and restart the Citrix licensing service
6. Log in to the Citrix license server console with username “admin” and the temporary password.
7. It will prompt to change the password

LMSTAT command shows a Client Hardware ID, a license has been assigned to that device.
Lmstat is the license administration command shows what licenses are assigned to which client or server. This utility is run on a license server from a command prompt by browsing to \Program files\Citrix\Licensing\LS. The *.lic must be present in the \Program Files\Citrix\Licensing\MyFiles directory that excludes the built-in citrix_startup.lic file. Lmstat prints information that it receives from the license server but does not contact the product server.

lmstat [-a] [-A] [-c “license_file”]
Open the command prompt and change the directory to C:\Program Files\Citrix\Licensing\LS
Type: lmstat –a

Example output of an lmstat -a command indicating two user machines accessing the farm and consuming two user license assignments.

A Client with Hardware ID that consumed a Citrix license is shown in hexadecimal number like below
Hardware ID for Session 1     6f78c1bd
Hardware ID for Session 2     3a7379f6

Recover Citrix License Server
The Citrix servers can function without contacting the license server and it is 30-days fault tolerant, and in Enterprise version an alert can be set with Resource Manager to send an email in case of License Server Connection Failure. If the license server reconnects at any time in the thirty days the problem resolves itself. If the server is not going to come back up, then the license file, digitally signed with the case-sensitive hostname of the old license server, is the critical component. The license file, a *.lic file, can be backed up to a thumb drive separately, and restored to a new server with the same name of the old license server, and the Citrix License server software installed.

What is licenses auto-activation?
License auto-activation is a benefit offered to customers purchasing MetaFrame XP product through an electronic licensing program with Citrix.  License auto-activation removes the need to activate MetaFrame product licenses via the Citrix Activation System. With license auto-activation, MetaFrame XP product licenses purchased through an electronic licensing program are automatically activated when they are installed on the MetaFrame XP server.


About Murugan B Iyyappan

Working as a Consultant - Citrix solutions architect with 18 years of experience in the IT industry. Expertise in Citrix products and Windows platform.
This entry was posted in Citrix XenApp and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s