Knowledge Center         Previous  Next    Index  
Platform Computing Corp.

Displaying GUIs in LSF with Microsoft Terminal Services

This chapter describes how to configure Microsoft Terminal Services and LSF to work together and how to submit and monitor jobs that display GUIs.

Contents

How LSF Works with Terminal Services

It is possible to run jobs to display graphical GUIs on remote hosts in LSF by using Microsoft Terminal Services.

Environment variables

The following environment variables are available for Terminal Services jobs:

LSF_LOGON_DESKTOP

When LSF_LOGON_DESKTOP=1, jobs run in interactive foreground sessions. This allows GUIs to be displayed on the execution host. If this parameter is not defined, jobs run in the background.

LSB_TSJOB

When the LSB_TSJOB variable is defined to any value, it indicates to LSF that the job is a Terminal Services job.

LSF_TS_LOGON_TIME

Specifies the time to create a Windows Terminal Service session. You should configure LSF_TS_LOGON_TIME according to your network enviroment.

The default, 300000 milliseconds is suitable for most environments. For a congested network. set LSF_TS_LOGON_TIME=1000000

Job submission

  1. Submit the job with tssub instead of bsub. tssub is a wrapper around the bsub command which only submits jobs to hosts that have the msts resource.
  2. tssub sets the LSB_TSJOB and LSF_LOGON_DESKTOP environment variables. These variables are then transferred to the execution host.
  3. View job output with the command tspeek. If the terminal window is closed, the job remains running. You can reconnect to view the job with tspeek.

Limitations

Requirements

Registering the Microsoft Terminal Services Advanced Client ActiveX Control

For clients running Windows 2000 or earlier with Remote Desktop Connection, the necessary ActiveX control is installed, but it is not registered by default. The LSF tssub command attempts to register the control automatically, but that requires administrator privileges. If you are not an administrator, and the control is not yet registered, tssub returns the following error:

checkTSAC: Failed to initialize Terminal Services Client. Check that 
it is installed and registered: Microsoft Terminal Services Advanced 
Client ActiveX Control must be installed and registered. 

You must be a Local Administrator on the host to register the control. Choose either method:

Configuring Terminal Services for LSF

By default, a Terminal Services connection always prompts for a password. You need to disable this option.

  1. Start the Microsoft Management Console (MMC) Terminal Services Configuration snap-in (Start | Programs | Administrative Tools | Terminal Services Configuration).
  2. Right-click the configuration for which you want to disable the default password setting, and select Properties.
  3. Select the Logon Settings tab.
    1. Select Use client provided logon information.
  4. This makes sure you are not using a predefined user to log on to Terminal Services.
    1. Clear the Always prompt for password check box.
  5. Future connections will no longer force a password entry.
  6. Click Apply, then click OK.
  7. Close the dialog box.

Configuring LSF to run Terminal Services jobs

Define the msts static resource

Edit LSF_CONFDIR\lsf.shared and define the msts static resource. Note that the resource name must be msts and values for the resource must be exactly as shown.

Begin Resource
RESOURCENAME TYPE  INTERVAL INCREASING DESCRIPTION
...
msts         Boolean  ()    ()        (Windows Terminal Server)
...
End Resource 

Add the msts resource to hosts

Edit LSF_CONFDIR\lsf.cluster.cluster_name and add the msts resource to each host on which Terminal Server is installed. For example:

Begin Host
HOSTNAME   model   type   server r1m pg tmp RESOURCES
...
hostA      !       NTX86    1     -   -   - (msts)
...
End Host 

Create job starters to preserve a user's environment settings (optional)

You may need to create a job starter script to preserve a user's environment settings on the execution host. For details, refer to Administering Platform LSF.

Submitting LSF jobs to Terminal Services hosts (tssub)

Terminal Services Full Client Windows Installer (MSI) package must be installed on submission hosts.

Submit a job with tssub

tssub [bsub_options]

The bsub option -o out_file is not supported for tssub.

Only Windows bsub options are supported for tssub. For example, you cannot use the options -Ip, -Is, -L login_shell of bsub with tssub.

Submit a job to a host with Terminal Services installed by using the tssub command. For example:

tssub myjob 

View job output with tspeek

You can use tspeek from any LSF Windows to view the output of a Terminal Services job:

tspeek job_ID 

You can also use tspeek to monitor job output from a Linux host with rdesktop installed. You cannot use tspeek to monitor job output from UNIX.

For example, if your job ID is 23245:

tspeek 23245 

Monitor the job with bjobs

If you use bjobs -l to monitor the job, you will see a message such as:

External Message 2 was posted from LSF\lsfadmin to message box 2 

The body of the message contains the ID of the terminal session that was created.

Limiting the number of Terminal Services jobs on a host

The msts resource indicates to LSF whether an execution host has Terminal Server installed or not.

To limit the number of Terminal Services jobs that run on a host and keep track of how many jobs are running, define a numeric resource in addition to the msts boolean resource. You can alternatively use an elim to report how many terminal servers are available for each host.

Configure a numeric Terminal Server resource

Define the resource in LSF_CONFDIR\lsf.shared. For example:

Begin Resource
RESOURCENAME TYPE  INTERVAL INCREASING DESCRIPTION
...
term_server   Numeric 60      N         (Terminal Server)
...
End Resource 

Submit a job with rusage

When submitting a job, use the rusage resource requirement string:

% tssub -R"rusage[term_server=1]" myjob 

Submitting LSF jobs to Terminal Services hosts from UNIX

In mixed cluster environments, it is possible to submit a Terminal Services job with bsub from a UNIX host. You can use tspeek to monitor job output from a Linux host with rdesktop installed. You cannot use tspeek to monitor job output from UNIX.

Submit a Terminal Services job from UNIX

  1. On the UNIX submission host, define the environment variables LSF_LOGON_DESKTOP=1 and LSB_TSJOB=1.
  2. Submit the job with bsub and indicate the msts resource requirement. For example:
  3. % bsub -R"msts" myjob 
    

Platform Computing Inc.
www.platform.com
Knowledge Center         Previous  Next    Index