Guest script manager package
Warning October 8 2020
Before upgrading to vRA 8.2 edit the version of the resource elements in the vRO designer (you can add a tag save and remove it for example).
This will create a version in the local GIT repository that is needed by the upgrade process.
Alternatively export these in a package.
In the following days I will update the package to use a new scripting method that does save a new version to the local repository to avoid this situation.
If you feel like adding it before or running it on your elements this method is called saveToVersionHistory()
Updating resource Elements and Configuration Elements programmatically requires to use this method to get the latest version of their content after a vRA 8.2 upgrade.
Script management : Add, edit, delete a script configuration. A script configuration contains:
- Script type (bash, batch, Powershell) : Each type involve a different way of starting the script and getting the output.
- Script content: The script itself. May contain parameters that will be replaced right before running the script.
- Timeout: The time after the script execution is
- Script interactivity: In case the script open a window that requires user interaction.
- Script working directory: Where the script will run. Where the optional file will be copied.
- File to copy: A file to be copied in addition to the script. For example a response file needed for the script.
The script configurations are stored as resource elements in the vCO database. This means :
- Updating a script does not require updating a workflow
- The scripts are in a much safer location compared to the file system
- If you run a vCO cluster, the scripts are available for every vCO nodes
- That you can export / import the script configurations in a package
The script configuration runner : "Run script in VM guest"
- Search replace specified strings in the additional file, copy it to the guest (optional).
- Search replace specified strings in the script, run it in the guest.
- Get output code and output result, display these (including special characters supported by ANSI thanks to the included cmdAnsi.exe), fails the workflow if script failed.