Reconnect Azure AD connect Local SQL DB after migration of AAD VM to Azure using On-Prem image

BalajiNext 20 Reputation points
2025-05-09T14:18:46.89+00:00

Dear Friends, I need advise on migration of Azure AD Connect Servers.

The scenario is, we want to migrate Azure AD Connect Two VM's (Primary & Standby) from On-Prem to Azure VM using AMT Tool (Rehost) i.e. using same On-Prem image. We will first migrate the Standby & then Primary VM. The SQL DB is integrated local to AD Connect Servers. We can keep the hostname same but IP address of the Target VM will change.

Because of the time constraints we are not able to use other solutions e.g. Entra connect or New build of AAD Connect VM's in Azure.

Question we have is,

  1. Will integrated SQL DB instance face any issue to start after migration because of the new IP?
  2. Does this migration method works, any experience, steps, attention points ? Any other alternate approach for migration?

Appreciate your advise on this. Thank you.

-BB

Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
905 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ashok Gandhi Kotnana 6,920 Reputation points Microsoft External Staff Moderator
    2025-05-12T13:34:08.17+00:00

    Hi @BalajiNext

    1. Will the integrated SQL DB instance face any issue to start after migration because of the new IP?

     Generally, no, the SQL instance should not face issues starting after migration as long as the hostname remains unchanged and:

     SQL Server is installed as a local instance (e.g., (local), localhost, or .) Azure AD Connect (AAD Connect) is configured to connect using hostname or localhost, not a hardcoded IP address

     

    How to verify:

    • Open AADConnectConfig.json or inspect the SQL connection settings in AAD Connect configuration (can also check via SQL Server Configuration Manager).
    •  Look for the SQL Server connection string and verify that it references localhost or the machine's hostname, not a static IP.
    •  Also check any custom scripts or services that may reference the database—look for hardcoded IPs.
    •  Conclusion: If AAD Connect and related services are configured using localhost or hostname, an IP change will not cause issues with the SQL instance or AAD Connect operation.

     2. Does this migration method work (any experience, steps, or attention points)?

     Yes, rehosting or migrating a server with the same image (e.g., VM snapshot or backup) can work effectively, but several considerations are critical.

     Key Steps & Recommendations:

     1. Migrate Standby/Secondary Server First:

     Ensures you have a rollback option if the migration introduces problems.

     2. Test Thoroughly Before Migrating Primary:

     Confirm AAD Connect functionality, SQL startup, sync health, and event logs on the standby.

     3. Maintain Hostname Consistency:

    Azure AD Connect is tightly coupled with the machine name and domain membership.     Changing the hostname will break AAD Connect, requiring reinstallation or reconfiguration.

     4. Validate IP Independence:

    Confirm that:

    No SQL connection strings use static IPs      

    No custom firewall rules, PowerShell scripts, or connectors depend on the old IP

     5. Post-Migration Checklist:

    Confirm SQL Server starts and is accessible    

    Ensure AAD Connect service is running

    Run a manual sync to validate:

      Start-ADSyncSyncCycle -PolicyType Delta
    

    Check:

     Event Viewer (Application and AAD Connect)  

    SQL logs    

    Run AAD Connect Health Troubleshooter (if enabled) to detect issues Ensure internal DNS resolves the correct new IP    

    • Update any DNS records if applicable    
    • Confirm outbound internet access (Azure AD endpoints, NTP, etc.)    
    • Review NSGs, firewalls, and proxy settings if the environment is hosted in Azure

     6. Networking & DNS Considerations:

     Summary: Rehosting with the same image is supported, and IP changes are safe if everything is configured via hostname. The most critical risk is a hostname change, which would break Azure AD Connect’s link to its database and configuration.

    Please let me know if you face any challenge here, I can help you to resolve this issue further

    Provide your valuable Comments.

    User's image

    Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.