VMmanager allows you to insert the value of an external parameter into the script for virtual machines (VMs). You can use the built-in VMmanager variables or create your own.
A variable can have a local or global visibility range. Variables with a global visibility range are available to all platform users, with a local visibility range — only to the user who created the variable. The VMmanager administrator can create a variable with any visibility range, while the user and advanced user can only create a variable with local visibility range. VMmanager built-in variables are available to all users.
External variables are specified in the script in the format ($NAME), where NAME is the variable name. For example, you can use the command echo ($IP) >> /tmp/ip.txt to write the VM IP address to a file.
VMmanager built-in variables
VMmanager built-in variables have dynamic values. The values depend on the settings of the particular VM on which the script is executed.
Built-in variables are not available for editing or deleting. To see their list, enter Scripts → Script variables.
The following variables are available in the current version:
Creating your own variables
To create a variable, enter Scripts → Script variables:
- Press Add variable.
- Enter the variable Name. For example, MY_PARAMETER.
- Enter the Value of the variable.
-
To prevent the variable value from being displayed in the platform interface, enable the Hide variable value option.
NoteWhen you change a variable, its value will be visible in the edit form. - Select the variable Scope — visibility range.
- Specify a discretionary Note.
- Press Add.
Example of adding a variable
Managing created variables
To manage variables, enter Scripts → Script variables.
To change a variable's parameters, press on its name or go to the menu → Edit.
You can enable/disable the use of the variable. Enter the menu → Enable (Disable) or use switch.
To delete a variable, enter the menu → Delete.
Interface of the "Script variables" section