You can add custom scripts to run on a dedicated VM during plan failover and test failover as a recovery step.
- . These recovery step types allow you to execute a script on the script VM once per-recovered VM. You can configure each recover step to be run on the script VM before and/or after failover or failback operations.
- recovery plan. For example, you can add one recover step action to launch a script before recovery is performed, in the middle of the VMs being recovered, and then another script launch after the VMs are recovered. . This recovery step executes a script on the script VM once, and can be placed before, in-between, or after other recovery steps. You can also add multiple other actions to run a script in a single
For more information on script VMs and recovery steps, see Recovery Steps.
Any script must be accessible to the script VM, since script execution is performed on the script VM.
Both Windows (Powershell) and Linux (Python) are supported for the script VM guest OS. You can use a script VM for testing and for real recovery operations.
Script VM restrictions:
- A recovery plan only runs on a single script VM.
- Scripts are run on the VM that you designate as the Script VM. Scripts are not run on other recovered VMs.
- VMware Tools must be installed and running on the script VM.
- The script VM must be available in the environment before the first step requiring a script call. The Script VM can be recovered as the first steps of a plan, or it must already running on the target recovery SDDC. For example, do one of the following:
-
Deploy the script VM on both the protected site and the recovery SDDC. The script is called from both locations during failover and failback. Or,
Deploy the script VM on the protected site and add it to a protection group. Then, the script VM must be failed over as part of the recovery plan, and it needs a separate recovery step where the script VM is recovered before other VMs are recovered.
-