Knowledge Center Previous Next Index |
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
- Requirements
- Configuring Terminal Services for LSF
- Configuring LSF to run Terminal Services jobs
- Submitting LSF jobs to Terminal Services hosts (tssub)
- Limiting the number of Terminal Services jobs on a host
- Submitting LSF jobs to Terminal Services hosts from UNIX
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
- 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.
- tssub sets the LSB_TSJOB and LSF_LOGON_DESKTOP environment variables. These variables are then transferred to the execution host.
- If the job is dispatched to a host in which Terminal Services is not installed or properly configured, the job is set to the PEND state and a pending reason is written in sbatchd.log.host_name.
- If tssub -I is specified, a terminal display is visible on the submission host after the job has been started.
- If the job is not a GUI job, LSF runs a command window and output is displayed in the command window when something is written to stdout.
- Pre- and post-execution commands are executed within the terminal session. The job does not complete until post-execution commands complete.
- 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
- A job submitted as a Terminal Services job cannot be modified to become a non-Terminal Services job with bmod
- The bsub option -o out_file is not supported for tssub
- Compound resource requirements are not supported for Terminal Services jobs.
- Only Windows bsub options are supported for tssub. For example, you cannot use the options -Ip, -Is, -L login_shell of bsub with tssub.
- If user mapping is defined, the user who invokes tspeek must have the required privileges to access the session
- MultiCluster is not supported
Requirements
- All submission hosts must have the Terminal Services Full Client Windows Installer (MSI) package installed. This package contains the required Microsoft Terminal Services Advanced Client ActiveX Control. Download it from the Microsoft web site.
- All execution server hosts must have the Terminal Services and Terminal Services Full Client Windows Installer (MSI) packages installed.
- Terminal Services server hosts can be in a different domain from submission hosts as long as the user can be authenticated by both domains.
- The service account on Terminal Services server hosts must be a member of the local administrators group.
- Your LSF cluster must be working properly.
- All submission (client) hosts need the ActiveX control, but you don't necessarily have to use the specified MSI, it can also be there if Remote Desktop Connection software is installed (part of the OS installation).
- To run applications from a Terminal Services client, the FEATURE lines in your LSF license must contain the TS_OK keyword. FLEXlm detects when a node-locked uncounted license is running under Windows Terminal Server. Without TS_OK, a user running on a Terminal Server client is denied a license. See the FLEXlm End User Guide for more information.
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:
- Submit any job with tssub. If you have administrator privileges, tssub will register the ActiveX control automatically, or
- Register the ActiveX control manually. Type the following Windows command at an MS-DOS prompt:
C:\regsvr32.exe mstscax.dllOnce the control is registered on the host, the error does not occur. Non-administrator users can run tssub with no errors. The problem does not occur with the Terminal Service Full Client installation, or on newer versions of Windows or Windows XP. Configuring Terminal Services for LSF
By default, a Terminal Services connection always prompts for a password. You need to disable this option.
- Start the Microsoft Management Console (MMC) Terminal Services Configuration snap-in (Start | Programs | Administrative Tools | Terminal Services Configuration).
![]()
- Right-click the configuration for which you want to disable the default password setting, and select Properties.
- Select the Logon Settings tab.
- Select Use client provided logon information.
- This makes sure you are not using a predefined user to log on to Terminal Services.
- Clear the Always prompt for password check box.
- Future connections will no longer force a password entry.
![]()
- Click Apply, then click OK.
- 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 ResourceAdd 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 HostCreate 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 myjobView job output with tspeek
You can use tspeek from any LSF Windows to view the output of a Terminal Services job:
tspeek job_IDYou 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 23245Monitor 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 2The 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 ResourceSubmit a job with rusage
When submitting a job, use the rusage resource requirement string:
% tssub -R"rusage[term_server=1]" myjobSubmitting 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
- On the UNIX submission host, define the environment variables LSF_LOGON_DESKTOP=1 and LSB_TSJOB=1.
- When LSF_LOGON_DESKTOP=1, it allows GUIs to be displayed on the execution host.
- When the LSB_TSJOB variable is defined to any value, it indicates the job is a Terminal Services job.
- Submit the job with bsub and indicate the msts resource requirement. For example:
% bsub -R"msts" myjob
Platform Computing Inc.
www.platform.com |
Knowledge Center Previous Next Index |