PlateSpin Migrate provides you with the capability to automatically execute custom actions, such as batch files and scripts.
To automate specific post-migration tasks on your target, you can include a custom action, such as a batch file, a shell script, or a program executable, in your migration job. At the end of the migration process, PlateSpin Migrate uploads the specified action, along with its dependencies, to the target and executes it.
Custom post-migration actions are supported for the following job types:
One-time Server Sync
Peer-to-peer workload migration
For the capability to select a post-migration action to run as part of a migration job, you must first save the action and its dependencies in a dedicated directory and add it to the PlateSpin Server’s library. The maximum size of the directory must not exceed 64 MB. For information about raising this limit, see Increasing the Size Limit on Post-migration Actions Uploaded to the PlateSpin Server.
Use the following procedure for adding a post-migration action to the PlateSpin Server’s library of custom actions.
Create the action, test it on a sample workload, and save it together with its dependencies in a directory that the PlateSpin Server can access.
Take special care when developing post-migration actions for Linux workloads, which allow different characters in file names and support different ACL (Access Control List) permissions. For Linux operating systems, amalgamate the action’s directory structure into a single file.
See KB Article 7970214.
In the PlateSpin Migrate Client, click
.Click
.In the Add Action window, type a name for your custom action, select the target operating system type, then browse to and select the directory that contains the required action with its dependencies.
PlateSpin Migrate populates the list with the contents of the selected folder.
In the
column, select the required executable, then click .In the
section, specify any required command line arguments and an execution timeout, then click .PlateSpin Migrate packages and uploads the library.
The action is now available for selection in migration jobs. See Including a Custom Post-migration Action in a Migration Job.
PlateSpin Migrate provides an additional means of control over your Linux block-level migration process — the freeze and thaw shell scripts.
These scripts are executed during Linux workload migrations, at the beginning and end of block-level data transfer sessions. Specifically, they interject in the migration process in the following fashion:
First pass of all volumes without snapshots:
Regular (non-LVM) volumes
LVM without enough space to take a snapshot
Freeze script
Take snapshots
Second pass of all non-snapshot volumes
Thaw script
Transfer volume snapshots
You can use this capability to complement the automated daemon control feature provided through the user interface (see Handling Source Workload Services or Daemons During Live Transfer (Windows and Linux).
For example, you might want to use this feature to cause an application to flush its data to disk so that the workload remains in a more consistent state during a Live Transfer migration.
To use the feature, do the following before setting up your migration job:
Create the following files:
platespin.freeze.sh— to contain the freeze shell script logic
platespin.thaw.sh— to contain the thaw shell script logic
platespin.conf. A text file defining any required arguments, along with a timeout value.
The required format for the contents of the platespin.conf file is:
[ServiceControl]
(optional) FreezeArguments=<arguments>
(optional) ThawArguments=<arguments>
(optional) TimeOut=<timeout>
Replace <arguments> with the required command arguments, separated by a space, and <timeout> with a timeout value in seconds. If unspecified, the default timeout is used (60 seconds).
Save the scripts, along with the .conf file, on your Linux source workload, in the following directory:
/etc/platespin/