Skip to content

Managing files

Files can be very useful if you need to add a file to every new Host created from a Template, before Infrastructure as Code (IaC) modification.

Added files appear in the Context CD drive attached to VMs - usually /dev/sr0 in Linux, or the D: drive in Windows

Note

  • Before uploading from your local machine will work, you must edit the 'files' datastore
  • Uploading from a URL will work without this step

Configure Files Datastore

  1. Navigate to Storage -> Datastores.
  2. Select the files Datastore.
  3. Edit the SAFE_DIRS attribute by clicking on the Pen and Pad Icon.
  4. Input the text /dashboard/sunstone/tmp/var/tmp.

    Safe Directories Attribute Pathway

  5. Press enter on keyboard to save the attribute configuration.

Upload a File

  1. Navigate to Storage -> Files.
  2. Click the green dropdown button and select Create.
  3. Input a Name for the File (a logical Name is suggested, i.e. the actual name of the File).
  4. Two options are available to route the File to the Datastore, either:

    • Select the Upload button, and choose the File from the local machine to upload.
    • Enter a URL to download the File from a web server.

    Create File

  5. Click the green Create button.

    • The File will now be available in the files Datastore and can be added to a Template.

Add to Template

  1. Navigate to Template -> VMs.
  2. Select a Template from the list to add the File.
  3. Click the blue Update button.
  4. Switch to the Context tab on the ribbon.
  5. Select Files in the left side menu and choose the newly added File from the list.
  6. Click the green Update button.

When this Template is used to instantiate a VM, the File will be in the Context CD.