Scripts allow you to set up virtual machines automatically: install software applications, modify configuration files, and perform other operations. Scripts from the ISPsystem repository are available per default.
On a Linux OS, you can run Shell scripts written in bash, and on a Windows OS, you can run Powershell scripts.
You can set parameters for the script. Their values will need to be entered or selected from the list when running the script. Variables can be used as parameters to be entered manually. Then, when the script is run, the value of the variable will be displayed in the parameter input field.
Note
The value of the built-in PASS variable, which contains the root password, cannot be changed when running the script. Use your own variable or parameter to pass the password to the script.
Creating a script
Add a caption...
To create a script:
.1Go to Scripts → Create a script.
.2Enter a script Name.
.3Specify a Description. It is displayed in the script list.
.4Specify Filters to run the script. The script is available to run on a VM if the conditions of all filters match. The OS tags filter is mandatory, the others are optional.
.5If necessary, specify the requested script parameters:
.aPress Add parameter.
.bSpecify the parameter Name and Description. If you use a variable name as a parameter, its description will be added automatically.
.cYou can specify parameter values that will be offered when the script is run. To do this, click Add:
Specify Parameter value and Describe value.
To add more parameters, press Add one more value. In the right part of the window, you can see what the parameter selection form will look like.
Example of the form
Press Add.
.dFor a mandatory parameter, enable the Required option.
.eTo add more parameters to the script, press Add one more parameter to script.
.6Select a Script type:
Shell script — for Linux OS;
Powershell script — for Windows OS.
.7Enter the Script in the editor window. To expand the editor window to the full screen, press
Add a caption...
.8. To return to the window mode, press
Add a caption...
.9. The editor has an auto-complete feature. For example, if you need to insert in a script the name of an external variable, start typing and the editor will suggest endings.
.10To send an email to the user after running the script, press Add in the Notification to email section.
.11By default, you are offered to set up an English email template — Email for EN.
.12Enter the Email subject.
.13Next, specify the content of the email in the Content field. In this field, you can use the same variables and parameters that you used in the script. Read more about creating email templates in Email templates in scripts.
.14Click Preview to preview the email.
.15If you need an email template in Russian, press Add the email for RU. If you no longer need any of the templates, press Delete the email for RU / Delete the email for EN.
.16Click on Create.
Operations with scripts
Add a caption...
To change script settings, go to Scripts → select script →
Add a caption...
menu → Edit.
To run the script on a VM, enter Virtual machines → select the VM →
Add a caption...
menu → Run script → select the script → enter the script parameters → Run .