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
- Navigate to Storage -> Datastores.
- Select the files Datastore.
- Edit the
SAFE_DIRS
attribute by clicking on the.
-
Input the text
/dashboard/sunstone/tmp/var/tmp
. -
Press enter on keyboard to save the attribute configuration.
Upload a File
- Navigate to Storage -> Files.
- Click the green dropdown button and select Create.
- Input a Name for the File (a logical Name is suggested, i.e. the actual name of the File).
-
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.
-
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
- Navigate to Template -> VMs.
- Select a Template from the list to add the File.
- Click the blue Update button.
- Switch to the Context tab on the ribbon.
- Select Files in the left side menu and choose the newly added File from the list.
- Click the green Update button.
When this Template is used to instantiate a VM, the File will be in the Context CD.