Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

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 customer based on their own specific requirements.

NOTE: Runbook scripts reside on and are executed from the management server (MSA).

 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.

Note: Script execution logs can be reviewed from the MSA tasks logs.

 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.

    • Note: 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).

  • 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

  • No labels