Session Staging

By default, when users create a new Kasm session, the container for that session is created on-demand.

In some use-cases, administrators may wish to Stage (Pre-Provision) containers, so when a user requests a session, it pulls from a pool of staged containers that are already running. This may be useful to reduce the time it takes for a user to connect to a session, or if the Image has a lengthy run-time initialization routine.

As part of the configuration, administrators must configure a set of default permissions (e.g Allow Audio) that will be enabled/disabled for the session. Because these settings must be configured at the invocation of the container, for enhanced security, user’s who’s group permissions do not match these will not be assigned a staged session and instead will trigger the system to create one on demand.

Configuration

  • Log into the Kasm Web UI as an administrator.

  • Click Staging.

  • Click Create New Config.

../_images/create_staging_config.png

Staging Config

Property

Description

Zone

The Deployment Zone for the configuration

Workspace

The desired Workspace to be staged.

Desired Sessions

The number of sessions the system will attempt to have staged at any given time. As users are assigned sessions from the pool, the system will automatically attempt to provision more to keep the pool at this number. Reducing this number will cause the system to destroy excess staged sessions.

Expiration (Hours)

Staged sessions that have not been assigned to a user will expire after this amount of time. The system will destroy the staged sessions and re-created them.

Allow Audio

When enabled, the staged session will support streaming audio from the session to the user.

Allow Clipboard Down

When enabled, the staged session will allow copying data from the session to the users local computer via the clipboard

Allow Clipboard Up

When enabled, the staged session will allow copying data from the user’s local computer to the session.

Allow Downloads

When enabled, the staged session will allow download files from the session to their local computer via the control panel download widget.

Allow Microphone

When enabled, the staged session will allow the user to pass their local microphone into the session.

Allow Uploads

When enabled, the staged session will allow the user to upload files from their local computer to the session via the upload widget in the control panel.

Allow Gamepad

When enabled, the staged session will allow the user to pass through gamepads from their local computer to the session via the gamepads widget in the control panel.

  • Fill out the form then click Submit.

  • Click Zones.

  • Click Edit next to the desired Zone.

  • Update the Allow Origin Domain and the Upstream Auth Address settings to be the appropriate domain. The default $request_host$ variable cannot be used for staged sessions.

Desired Sessions

The system will begin creating the staged sessions a few moments after the configuration is applied. If the Current Sessions does not match the Desired Sessions after a few minutes , consult the logs for warning or error messages. It is likely the system doesn’t have enough resources (Agent Capacity) to fulfill the request, or an Image is disabled or unavailable

../_images/staging_list.png

Staging Configs

Session List

Staged sessions will appear without a User assigned in the Sessions list. Once the sessions are assigned to a user, the username will appear.

../_images/staged_sessions.png

Staged Sessions

Incompatible Settings

Certain Group and Image level settings are not compatible with Staged Sessions as they require the workspace to be originally created with the settings applied. If a user requests a Kasm session but has an incompatible setting applied, the violation will be logged, and the system will provision a workspace on-demand.

  • (Workspace) - Persistent Profile

  • (Workspace) - Volume Mappings*

    That use {username} or {user_id} tokens

  • (Group) - expose_user_environment_vars

  • (Group) - inject_ssh_keys

  • (Group) - run_config

  • (Group) - volume_mapping

  • (Group) - web_filter_policy

    Administrators can apply a filter policy to the Image instead.

../_images/incompatible_settings.png

Logged settings violation

Multi-Zone Behavior

When a user makes a request to launch a session the system will prefer to assign a staged session in all applicable Zones prior to attempting to create an on-demand container. The process is as follows:

  1. Attempt to assign a staged session in the current Zone.

  2. Attempt to assign a staged session in other Zones if Search Alternate Zones is configured on the current Zone.

  3. Attempt to create a new on-demand session in the existing Zone.

  4. Attempt to create a new on-demand session in other Zones if Search Alternate Zones is configured on the current Zone.

Docker Exec

The Docker Exec Config supports a top level key named assign. This command is executed when the user is assigned a staged session. For more information please see Docker Exec Config