Persistent Data

Overview

Kasm Server allows administrators to configure folders to be mapped inside a Kasm each time it is provisioned. This is done by configuring the Volume Mappings field on the Kasm Image.

../_images/volume_mappings.png

Configuring Volume Mappings on the Kasm Image

Volume Mappings may also be applied as a Group Setting . This may be useful if a certain set of users should have the mapping. When applied at the group level, all Kasms created by members of this group will have the mapping applied.

../_images/group_volume_mappings.png

Configuring Volume Mappings as a Group Setting

In this guide we will configure a folder on the host /var/kasm_persistent_data to be mapped inside the Kasm Desktop image to a folder named /data. This effectively will act as a file share. All users’s who have access to provision the image will have access to this folder.

Create Host Directory

On the Kasm Server create the directory and change the ownership to user and group 1000.

Note

If Kasm is installed in a multi-server deployment, this process must be repeated on each server that runs the Kasm Agent service. /var/kasm_persistent_data in this example should represent a centralized share that is mapped to each agent.

sudo mkdir /var/kasm_persistent_data
sudo chown 1000:1000 /var/kasm_persistent_data/
echo "test" > /var/kasm_persistent_data/test.txt

Configure Image Volume Mappings

  • Log into the Kasm UI as an administrator.

  • Select Images, and click edit (pencil) next to the Kasm Desktop image

  • In the Volume Mappings field, paste the following configuration and click Submit

    {
       "/var/kasm_persistent_data":{
          "bind":"/data",
          "mode":"rw"
       }
    }
    

Note

Although this guide demonstrate mapping a single volume, multiple volume mappings can be defined.

{
   "/var/kasm_persistent_data1":{
      "bind":"/data1",
      "mode":"rw"
   },
   "/var/kasm_persistent_data2":{
      "bind":"/data2",
      "mode":"ro"
   }
}

Verify Access

  • Launch the Kasm Desktop Image.

  • Verify the user can read and write to the /data location.

../_images/verification.png

Verifying Volume Access