--- myst: html_meta: "description lang=en": "Manage active sessions in Kasm Workspaces" "keywords": "Kasm, Sessions, Create Image from Session, Snapshot" "property=og:locale": "en_US" --- ```{title} Session Casting ``` # Sessions Administrators can view the active sessions by visiting the Sessions page from the Admin panel. ```{figure} /images/sessions/sessions_table.webp :align: center **Active Sessions** ``` Clicking the arrow for the session will present a list of potential actions: - **View** - View more details about the session. - **Stop** - The session is stopped, preserving the disk state. Sessions resumed from a stopped state will have the previous files intact, but previously running programs will need to be restarted. This option is applicable to container-based Workspaces only. - **Pause** - The session is paused, preserving the disk, process and memory state. Paused sessions will still consume resources in physical memory and/or swap. Sessions resumed from a paused state will still have the previous programs launched and active. This action is only applicable to container-based Workspaces. - **Start** - Re-start a stopped or paused session. - **Delete** - The session is deleted. (create-image-from-session)= ## Create Image from Session Administrators can create new docker images from active container-based Workspace sessions. While it is recommended to utilize a more formal {doc}`build process <../../how_to/building_images>` for creating images, automatically creating them from active sessions presents a simple process creating images that may require steps that cannot be automated. 1. From the Sessions page, click the arrow to show the actions menu. 2. Select **Create Image** ```{figure} /images/sessions/actions.webp :align: center **Create Image Icon** ``` 3. A form is displayed. The only required entry is **New Docker Image** (repo + tag). A name will automatically be generated with the current date and time. If registry information is provided, the system will attempt a push of the newly created image. ```{figure} /images/sessions/create_image.webp :align: center **Create Image from Session** ``` The **Additional Changes** field accepts a limited number of `DOCKERFILE` instructions that can be called during the commit. The following instructions are supported: `CMD|ENTRYPOINT|ENV|EXPOSE|LABEL|ONBUILD|USER|VOLUME|WORKDIR` See for more details. Below are examples of Image/Registry configurations for common Docker registries. `````{tabs} ````{tab} Dockerhub Example | Field | Value | |------|--------| | New Docker Image| `myrepo/firefox:2023-03-13.00.40` | | Registry URL | `https://index.docker.io/v1/` | ```` ````{tab} Gitlab Example | Field | Value | |------|--------| | New Docker Image| `registry.gitlab.com/mygroup/image-repo/firefox:2023-03-13.00.40` | | Registry URL | `https://registry.gitlab.com` | ```` ````` When finished, click **Submit**. 4. A task will be sent to the Kasm Agent, to conduct a `docker commit` with the new image, and if configured in the previous from will attempt a `docker push` to the registry provided. This is a background task, so administrators may need to review the logs to identify failures in the process. For example, an error is shown below for a failed image push. ```{figure} /images/sessions/example_error.webp :align: center **Example Error** ``` 5. A Workspace entry is automatically created and presented to the Administrator for additional configurations. When complete, click **Submit** ```{figure} /images/sessions/update_workspace.webp :align: center **Update Workspace** ``` 6. Back on the Workspace Launcher, the new Workspace should be visible. (e.g `Snapshot of Firefox - (develop-2023-03-12.23.44)`) . If the commit succeeds, the image will be marked as available. Depending on the size of the image, this process may take several minutes. ```{figure} /images/sessions/launcher.webp :align: center **Workspaces Launcher** ```