VMware Cloud Community
nsnidanko8
Contributor
Contributor
Jump to solution

SRM Custom Recovery Steps delay

Hi All,

We have custom recovery step, which includes Powershell script to do DR for our database servers. Since this script has to be executed under specific account I've followed these commendations:

Running SRM Server Commands With Specific Credentials | VMware vSphere Blog - VMware Blogs

I am facing a problem where SRM executes this step and moves to a next step, thus not waiting for a script (i.e running task) to finish executing. How do I specify "delay" before moving onto the next step.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
ikiris
Enthusiast
Enthusiast
Jump to solution

The scheduled task is probably backgrounded. You would probably need to either put a prompt so that you can manually validate the script is done or do another call out step that checks that the previous scheduled task finished before exiting.

windows - How do you wait on a Task Scheduler task to finish in a batch file or C#? - Stack Overflow

-Chris- http://www.twitter.com/ikiris http://blog.chrischua.net

View solution in original post

0 Kudos
5 Replies
ikiris
Enthusiast
Enthusiast
Jump to solution

The scheduled task is probably backgrounded. You would probably need to either put a prompt so that you can manually validate the script is done or do another call out step that checks that the previous scheduled task finished before exiting.

windows - How do you wait on a Task Scheduler task to finish in a batch file or C#? - Stack Overflow

-Chris- http://www.twitter.com/ikiris http://blog.chrischua.net
0 Kudos
nsnidanko8
Contributor
Contributor
Jump to solution

Very good solution but it seems better option would be to change SRM service account. Does anyone run SRM as a dedicated account (other than default Local System)?

0 Kudos
ikiris
Enthusiast
Enthusiast
Jump to solution

I do run it as a Windows Service Account for this reason (though I haven't done a call out yet), modify the service directly, don't go through the modify/change installer.

-Chris- http://www.twitter.com/ikiris http://blog.chrischua.net
admin
Immortal
Immortal
Jump to solution

Chris is right that you can change the account via the services console directly.

If you are using SQL server with integrated authentication you do need to ensure that the account you are running under has appropriate access to the database, see the installation guide for a detailed list of pre-requisites -> Requirements when Using Microsoft SQL Server with Site Recovery Manager

In the just release SRM 5.8 we enable you to set the service account as part of the installer itself.

nsnidanko8
Contributor
Contributor
Jump to solution

I've decided to change it as well to run under AD account as it makes thinks so much simpler.

Thanks you!

0 Kudos