VMware Cloud Community
Tan201110141
Contributor
Contributor

UPDATE DNS script works fine on windows cmd, but not work in SRM

Hi there,


I'm having a problem while doing a test to update dns automatically during a SRM switching. Hope anyone can help.


I followed the instruction of this --> http://www.vmware.com/pdf/srm_dns_updater.pdf , making a script to update dns through dns_updates.pl.


The script is call.cmd

ScreenHunter_001.jpg

which call test.cmd

ScreenHunter_002.jpg

The script work fine on a windows commmand evironment. ( on vcenter )


C:\scripts>c:\windows\system32\cmd.exe /C "c:\scripts\call.cmd"

C:\scripts>C:\scripts\test.cmd

C:\scripts>"c:\Program Files\VMware\VMware vCenter Site Recovery Manager\scripts
\callouts\dns_updates.pl" --csv c:\example.csv --toolspath c:\bin
[2012-05-09 9:20:15 INFO] *** dns_updates.pl ver.1.0.0.9 ***


1. Verifying input data

2. Checking Recovery Plan Mode

3. Performing Windows DNS Server Records Updates...
---------------[Updating forward zone record for windows.abc.com.vn]-----
----------


PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com



Deleted A record(s) at abc.com.vn
Command completed successfully.
dnscmd.exe exited on 10.145.222.41 with error code 0.


PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com


Add A Record for windows.abc.com.vn at abc.com.vn
Command completed successfully.
dnscmd.exe exited on 10.145.222.41 with error code 0.

---------------[Updating reverse zone record for windows.abc.com.vn]-----
----------

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com


Deleted PTR record(s) at 222.145.10.in-addr.arpa
Command completed successfully.
dnscmd.exe exited on 10.145.222.41 with error code 0.


PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com



Add PTR Record for 60.222.145.10.in-addr.arpa at 222.145.10.in-addr.arpa
Command completed successfully.
dnscmd.exe exited on 10.145.222.41 with error code 0.


---------------[Finished updating records for windows.abc.com.vn]--------
-------

[2012-05-09 9:20:24 INFO] SUCCESS
[2012-05-09 9:20:24 INFO] *** Summary ***
[2012-05-09 9:20:24 INFO] 1 DNS updates.
[2012-05-09 9:20:24 INFO] ***************

-----------------------------------------------------------------------------------------------

But when add this cmd : c:\windows\system32\cmd.exe /C "c:\scripts\call.cmd" to SRM recovery plan, it return an error



Recovery StepResultExecution Time
1. Command: c:\windows\system32\cmd.exe /C  "c:\scripts\call.cmd"Error: User designed callout  'c:\windows\system32\cmd.exe /C "c:\scripts\call.cmd"' has returned a non-zero  value: 2.00:00:00

Thanks for any help!

Tan.



Reply
0 Kudos
3 Replies
tom_elder
Contributor
Contributor

having same problem did you find a solution?

Tom

Reply
0 Kudos
Tan201110141
Contributor
Contributor

Still could not find a sollution yet.

But I think if you want to update DNS, just do a very tiny action that double click on scipt. No need to add to recovery plan

Reply
0 Kudos
mal_michael
Commander
Commander

Hi,

Have you tried to run psexec.exe with /accepteula parameter? First time user runs psexec "Accept EULA" message box pops up and the execution hangs until it is accepted.

Michael.

Reply
0 Kudos