Add a pre script to a machine in a failover group to execute an action on the source VM before a failover operation.
Pre scripts run only before planned failovers. Pre scripts do not run before unplanned failovers. Pre scripts do not run on UNIX access nodes.
Before You Begin
Review the following information before configuring a pre or post script for the failover group.
Required Components
To use pre or post scripts, you must have the following components configured:
-
Amazon: IAM role, SSM agent
-
Azure: Azure VM agent
-
VMware: Vmware Tools/Open VM tools
Supported Scripts
You can use the following scripts for each vendor:
Amazon
-
Windows: Powershell
-
Linux: Shell Scripts
Azure
-
Windows: Powershell
-
Linux: Shell Scripts
VMware
-
Windows: Batch Scripts
-
Linux: Shell Scripts
Procedure
-
When you add a failover group, in the Add failover group - Replication dialog box, under Virtual machines, beside a VM, click the action button, and then select Add pre script.
The Configure pre-failover script options dialog box appears.
-
Enter the following information:
-
Path type: For VMware only, select UNC or Local. For Amazon and Azure, configure a UNC path.
-
Path: Enter the full UNC network path for the pre script, including the name of the script.
-
For VMware only: You can also configure a local path.
-
UNC Credentials: Enter credentials or use a set of saved credentials that have access to the UNC network:
-
Enter credentials: Select this option to manually enter the user name and password for the UNC network.
Username: Enter the user name for a user account that has permissions to access the network path for the script.
Password: Enter the password for the user account.
-
Use saved credentials: Select this option to use a set of credentials that were previously saved for the UNC network.
Credentials: Select a saved set of credentials.
Add button : Click this button and then enter and save a set of credentials.
-
-
VM Guest Options: For VMware only, enter information for a VM Guest:
-
User name: Enter the user name for a user account that has permissions to access the network path for the script.
-
Password: Enter the password for the user account.
-
Confirm password: Enter the same password.
-
-
-
Click Save.