Changes can be made to Guest VMs after recovery by executing pre-scripts and post-scripts as part of runbook execution. Run-book scripts are custom scripts written in Python (.py) that can be created and applied by the user based upon their own specific requirements.
Steps to Execute Runbook Scripts
- Log in to the MSA and create a scripts folder under vme2 (/var/lib/vme2/).
- Upload a pre-script and/or post-script to the scripts folder.
- Make the uploaded scripts executable (Use the chmod +x option).
- In the JetStream DR UI (Create Runbook Group workflow) indicate the locations of the scripts and any parameters necessary to run the scripts.

Script Configuration Example
Copy scripts to MSA scripts folder
[root@fs074-msa3 scripts]# ls -lrh
total 12K
-rw-r--r--. 1 root root 5.9K Mar 24 15:36 pre-script.py
-rw-r--r--. 1 root root 4.0K Mar 24 10:16 post-script.py
Make scripts executable
[root@fs074-msa3 scripts]# chmod +x /var/lib/vme2/scripts/*
Verify executable status of scripts
[root@fs074-msa3 scripts]# ls -lrh
total 12K
-rwxr-xr-x. 1 root root 5.9K Mar 24 15:36 pre-script.py
-rwxr-xr-x. 1 root root 4.0K Mar 24 10:16 post-script.py
Test Script
A sample test script is available from JetStream Software for evaluation purposes and can be used per the following guidelines:
- Collect the sample script from the JetStream Software support team.
- The script is written in Python and requires Python pyVmomi SDK module version (8.0.0.1.2) to be installed on the MSA or manually updated.
- The script will not run correctly if the pyVmomi version is lower than (8.0.0.1.2).
- To check the version of pyVmomi currently installed, run the command:
pip3 show pyvmomi
- If the version is incorrect, upgrade the module using the command:
pip3 install -U pyvmomi
- To check the version of pyVmomi currently installed, run the command:
- The script will not run correctly if the pyVmomi version is lower than (8.0.0.1.2).
- After placing the script in the correct folder and making it executable, run the help command to view its required parameters:
python3 post-script.py -help
- The script can be also be tested manually by executing the following syntax:
Python3 post-script.py -vi VCHOSTNAME -vu VCUSER -vp VCPASSWD -cl CLUSTERNAME -l VMSLIST -vmu VMUSER -vmp VMPASSWD -vmpc VMPROCESS