Reserving Citrix Licenses to Server(s)

One major concern in my company regarding Citrix is license usage.  Because we have many different business units who all have different cost centers, budgets, etc., everyone wants their licenses for thir use only.  This was a strong argument from their side to have multiple farms, but where there’s a will there’s a way, and I don’t want multiple farms to manage.  I like the KISS method (Keep It Simple Stupid).  So, here is how I managed to reserve licenses for servers and make everyone happy.

Firstly, I am still awaiting official documentation from Citrix regarding these commands.  I attempted using their documentation and the results were not as expected.  If you have tried using the RESERVE and MAX commands, you may know what I am talking about.  After some support calls and working with the development team, we got everything straight and licensing is working correctly now.  Understand that moving to a license reservation scheme like this will no longer give a large pool for all servers to dip in.  Every server you add to the farm must be added to a reservation group in order to receive user licenses.

License reservations are constructed in the Citrix.opt file located in the program filescitrixlicensingmy files directory (unless you changed the path).  License reservations can be made at a server group boundary.  These groups can contain one or many servers.

I hardly remember my original Citrix.opt file, but I think it only had a couple of lines regarding Logging and the ReportLog file.  Be prepared for a long file after this. In this example, I will use the following scenario:

Server Group1 – ServerA.domain.com, ServerB.domain.com, ServerC.domain.com
Server Group2 – ServerD.domain.com, ServerE.domain.com
Server Group3 – ServerF.domain.com

This will give us 3 groups (pools) of licenses that only each group can “dive” into.

The first lines in the Citrix.opt file are server group reservations. Here is the syntax for our scenario:

HOST_GROUP GROUP1 servera.domain.com serverb.domain.com serverc.domain.com
HOST_GROUP GROUP2 serverd.domain.com servere.domain.com
HOST_GROUP GROUP3 serverf.domain.com

Each group reservation line can only contain a maximum of 2048 characters.  If you have more servers than will fit on a line, just start a new line and use the same HOST_GROUP _____ as before.  I.e. I can have multiple lines including servers in GROUP1.

*note: These FQDN’s are case sensitive. From my understanding, the licensing software is ported from Unix, so the server names are case sensitive.  If you are unsure of the case, go to program filesCitrixLicensingLS and run “lmstat.exe -a”, this will show you your current license usage by server and will show you the correct case usage.

Now that our group reservation are made, it’s time to assign licenses to the groups. Each License file in Citrix has an increment line like this:

INCREMENT MPS_ENT_CCU CITRIX 2009.1001 permanent 20
VENDOR_STRING=;LT=Retail;GP=720;CL=ENT,ADV,STD,AST;SA=1;ODP=0
DUP_GROUP=V ISSUED=21-Feb-2009 NOTICE=”Your Company”
SN=CM-1234567-12345:123456 START=7-dec-2008 SIGN=”xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx”

I removed a lot of the identifying material in the license, but you can see what I am referring to.  This particular license is for 20 concurrent users and is valid for enterprise, advanced, or standard versions.  The most important part of the license is the “SIGN=” and the version (MPS_ENT_CCU). In the next line, I will reserve this license for our “GROUP1” server group.

INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP1

You can see that the command is “INCLUDE”, followed by the license version, then the sign, then the group assignment. Also make note of the quotation mark locations and the fact that it is word wrapped, but should all be on one line. Now I have 20 licenses assigned to my GROUP1 server group.  Subsequent lines can follow that include any number of other licenses for this group or the other groups.  If I had 3 license files that I wanted to assign to GROUP2, for example, I would have lines like this:

INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP2
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP2
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP2

The above statements would assign 3 license files to the GROUP2 server group.

So, that’s the general idea.  The hardest part is keeping everything organized in the file.  You can comment as much as you want in the file, jsut begin each comment line with “#”.  An example comment line:

# This license is from the ABC123.lic file

To bring the idea altogether, here is an example of a complete Citrix.opt file after reservations:

# CAUTION:  Editing this file without understanding the
# license allocation scheme can really mess things up.  Please
# consult your Citrix administrator.
# NOTE: Server names are case sensitive
# NOTE: SA Renewals must use the UPGRADE SIGN for license reservations. Do not
# use the old SIGN from the INCREMENT portion

# Suppress Check-ins and Check-outs
# NOLOG IN
# NOLOG OUT
# Suppress denied and unsupported feature messages
# NOLOG DENIED
# NOLOG UNSUPPORTED

# Host Group Reservations start
# Note:  You can only enter a max of 2048 chars per line.  Please use additional
# lines if necessary, prepending each line
HOST_GROUP GROUP1 servera.domain.com serverb.domain.com
HOST_GROUP GROUP1 serverc.domain.com
HOST_GROUP GROUP2 serverd.domain.com servere.domain.com
HOST_GROUP GROUP3 serverf.domain.com

# License reservations start
#This license is for GROUP1
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP1

# These licenses are for GROUP2
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP2
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP2
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP2

# This license is for GROUP3
INCLUDE “MPS_ENT_CCU:SIGN=xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx” HOST_GROUP GROUP3

REPORTLOG +”D:Program FilesCitrixLicensingReportLog.rl”

Above, we made three server groups (using four lines), reserved one license for GROUP1, three licenses for GROUP2, and one license for GROUP3. Now, we can restart our license service or use the re-read option in the LMC to begin using these reservations.

To verify that licenses are being allocated correctly, use the LMSTAT command mentioned above.  I typically run an “LMSTAT -a > usage.txt” command and then open the usage.txt file to view the results.  You should see each license listed followed by which servers are using it.  With these reservations, you should only see members of the assigned server group using the license.

Advertisements