If your target host reboots, you can use these script implementations to automatically start (or stop) your VDBs.
The VDB Startup and Shutdown script needs to be placed in /etc/init.d directory.
Create a VDBRestart script and grant the execute permissions to “root” user.
Delay of 2 minutes is purposefully provided while executing the VDB startup option so that Delphix is able to communicate to the target server once it starts back up after the reboot.
After creating the script under /etc/init.d directory, create soft links with “S”(start) and “K”(Kill) option for different run levels under /etc/rc.d directory to execute startup and shutdown script accordingly.
Ensure that Kill option is executed first (K01) and startup option is executed last (S99) so all server components (e.g. NFS) are up and running before starting the VDB.
In Windows environment, the scripts which need to be executed either when the server shuts down or when it comes up needs to be configured under Local Group Policy settings.
Click Start and under “Search Programs and Files” key in “gpedit.msc”
It will open "Local Group Policy Editor" as shown below.
Expand Windows Settings and Highlight “Scripts (Startup/Shutdown) option.
VDB Startup Script:
Click “PowerShell Scripts” tab
Click Add and key in the complete path and script for starting VDB.
Click the option “Run Windows PowerShell scripts last” option while starting VDB.
Start-Sleep -s 120
c:\Python33\python c:\Users\delphixtarget\Desktop\Delphix_VDB_Control.py -u delphix_admin -p delphix -s 192.168.0.100 -P 80 -v "Version 2.5" –start
VDB Stop Script:
Click Shutdown Properties
Click Add and key in the complete path and script for stopping VDB.
Click the option “Run Windows PowerShell scripts first” option while stopping VDB.
c:\Python33\python c:\Users\delphixtarget\Desktop\Delphix_VDB_Control.py -u delphix_admin -p delphix -s 192.168.0.100 -P 80 -v "Version 2.5" –stop