Add a post script to a machine in a failover group to execute an action on the destination VM after a failover operation.
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 post script.
The Configure post-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.
-
UNC Credentials: Enter credentials or use a set of saved credentials:
-
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.
Related Topics
To use sample scripts to validate VMs that run applications, see Scripts for Application Validation.