Hello Rob McNees,
Here’s how you can achieve that:
- Ensure Identical Networks: Before the failover, make sure that the network architecture in the DR region is identical to the source region. This means having the same address spaces and subnets in both the source and the DR regions. This setup allows the Azure Site Recovery (ASR) to map the IP addresses correctly.
- Use Static IPs: If possible, switch your VM's NIC (Network Interface Card) configuration from Dynamic to Static IP. Azure Site Recovery typically tries to retain the original static IP address during failover if it's not in use.
- Pre-assign IP Addresses: In the SQL Server Always On availability groups example, they assign or verify target IP addresses for the replicated items. Before initiating the failover, verify and assign the target IP addresses in the DR region to match those from the primary. Make sure that before you initiate failover, these assignments are correctly in place.
- Perform the Failover: Once everything is set and you have verified the configurations, follow the failover process as detailed in the Azure documentation. Azure Site Recovery will attempt to allocate the IP addresses as per the configurations you set.
You referred to stopping the applications and shutting down the VM in your primary region, which is good practice. Just ensure that all your IP assignments are done before you start the failover process.
For more detailed guidance, you can check out the Azure documentation on retaining IP addresses during failover here.