VMware Cloud Community
UsmanGh
Contributor
Contributor

DNS Update on Protected and Recovery Site

Hi,

I have 2 DNS Update scripts one for DR site(B) and Other for Protected site (A) , Once site A fails after VM power On DR Site , Script will run and remove the existing DNS entries A and PTR record , and will add new A & PTR record according to DR Site subnets.  My Question is that now if i have Site A up again , where i can setup the dns script so VM will have old IPs in DNS again. Infact I am looking for Failover and Failback automated with DNS scripts , no manual change in DNS server's A /PTR records

Regards

Usman Ghani

0 Kudos
1 Reply
larsonm
VMware Employee
VMware Employee

There are a couple of options:

1.  Keep two scripts on the system, one to change the IP/DNS from production to DR during failover, and one to change the IP/DNS from DR to production.  Simply rename the script you what to have run to whatever is in the recovery plan.  It works, but does not scale well.

2.  Write a script with logic to read the IP address of the system and change the IP/DNS to whatever it should be in that environment via an if/then statement.  For example, if you are doing from production to DR, the script will see a production IP and change it to the DR IP and update DNS for the new address.

I did option 1, as I found it to be easier.

0 Kudos