How to set the Terminal Server Licensing Services (TSLS) server for container?
Assuming that you have the server with Remote Desktop Licensing (RDS-Licensing) role installed in your environment, it should be activated and configured according to Microsoft TechNet article about TS Licensing Step-by-Step deployment.
The ip address of the server with Remote Desktop Licensing role can be set as TSLS server address for the containers that are required to receive the terminal sessions licences.
The Terminal Server Licensing Services (TSLS) server can be set for containers on these two conditions:
On Windows Server 2008, the TS-Terminal-Server role must be preliminarily installed on the respective containers. You can install this role with the following command:
vzctl addrole CTID --role TS-Terminal-Server
On Windows Server 2008 R2 and 2012, the name of the role has changed to Remote Desktop Session Host, so the command should be the following:
vzctl addrole CTID --role RDS-RD-Server
The TS licensing mode must be preliminarily set for the respective containers.
On Windows Server 2003, the TS licensing mode can be configured for all containers at once by using the following KB article:
1669 How to configure default TS mode for newly created containers
On Windows Server 2008, 2008 R2 and 2012, the TS licensing mode must be set for all containers individually with this command:
vzctl set CTID --tsmode app_user --save
vzctl set CTID --tsmode app_device --save
depending on whether you want to use the per-user or per-device licensing mode.
Provided the conditions above are satisfied, the TSLS server can be set for all containers on the physical server or for individual containers.
By default, the TSLS server for all containers is set to the Virtuozzo Virtual Adapter IP address. The default TSLS server can be changed with the following command:
vzcfgt set 0 TerminalServerLicensingServers 192.168.123.141
All containers will be using the TSLS server at the IP address above unless it is redefined for particular containers.
To assign the TSLS server IP address on a per-container basis, run the following command:
vzctl set CTID --tslicservers TS.LS.IP.ADD