In my vSphere 5 U2 environment I am running SRM 5.02 with SAN replication.
My question is about post power on scripting. Since my VM's have to have their IP Addresses changed, I find that I need to manually log in to some systems and run an ipconfig /registerdns.
I was wondering if I can just put that in as a post power on script by simply putting in ipconfig /registerdns right in the the "Content" field of the post power on step.
Thanks.
I believe you can do this from a PowerCLI script. In 4.1 and higher you should have the ability to use the invoke-vmscript commandlet. From there you can gain access to the ipconfig /registerdns command.
For more information, check out Alan Renouf's site below:
http://www.virtu-al.net/2010/02/05/powercli-changing-a-vm-ip-address-with-invoke-vmscript/
To simply answer your question - yes, you can.
I'm curious, what is specific about these VMs, that require running this command? Are they set by DHCP?
Thanks
Stefan Tsonev
No these all have static ip's. But we are changing the ip addresses on the DR side, so I want to make sure the servers update DNS properly.
What SRM does is it restarts the VM after IP customization. When Windows re-boots it should update DNS.
But I guess you can force this update using ipconfig /registerdns command in a call-out.
Exactly, but we have seen it register just fine, then 10-15 minutes later we noticed several of the VM's drop out of DNS until we manually run /registerdns... So this is more of a CYA type thing.
Just throwing in some ideas:
Is this during test or during actual failover? Could it be that somehow the production and the test/recovered VM are modifying a shared DNS server? Or do you have DNS replication and the DNS server at the protected site overriding the updated DNS record on the recovery site?
Stefan Tsonev
This was on an actual failover, which we did on 9 sandbox servers, so all "prod" systems were off and datastores disconnected from prod ESX hosts. We have domain controllers in our DR site which all are AD integrated DNS.
No answer to your original question sorry, but we use DHCP reservations where servers really need "static" IP addresses, otherwise just plain old DHCP whereever possible.
I was finding the script to reconfigure IP addresses was getting affected by automated windows restart to apply the windows patches that had invariably applied just prior to wanting to failover.