The Script VM page of the DR Plan wizard allows you to add custom scripts to run on a dedicated VM during plan execution as a recovery step.
In the
page of the DR Plan wizard, you can configure either Recover steps in the following ways:
- . 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.
- . 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 DR 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.
For more information on script VMs and recovery steps, see Recovery Steps
Any script you plan to run on a script VM 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 DR plan will only execute on a single script VM.
- Scripts are executed 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. In other words, the Script VM can be recovered as the first steps of a plan, or already running at the target site.
Note: A script VM configured to run on multiple VMs is run sequentially on each target VM in the batch. Be aware that depending on the number of VMs targeted by the script VM, and can tale longer by slowing the recovery completion process.