VM cannot connect to Azure AD, VM can PING the AD IP

Faruque 1 Reputation point

I have configured AD services, configured one VM. But the VM cannot connect to the AD Service domain. From VM i can ping the both IP of the AD DS ( &4) but when I try to change from WORKGROUP to the domain I get below error every time.

The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "datastats.com.au":

The error was: "DNS name does not exist."
(error code 0x0000232B RCODE_NAME_ERROR)

The query was for the SRV record for _ldap._tcp.dc._msdcs.XXXX.com.au

Common causes of this error include the following:

  • The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses:


  • One or more of the following zones do not include delegation to its child zone:

. (the root zone)

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
3,660 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JamesTran-MSFT 26,616 Reputation points Microsoft Employee

    Thank you for your post and I apologize for the delayed response!

    Based off your issue description, I've added the "windows-active-directory" tag to this thread so our active directory experts can look into this issue. In the meantime, these other links might help with your issue.

    Related issues:
    Unable to join domain "DNS name does not exist."
    0x0000232B RCODE_NAME_ERROR DNS name does not exist

    Thank you for your time and patience throughout this issue.


    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    No comments

  2. Daisy Zhou 12,921 Reputation points Microsoft Employee

    Hello @Faruque ,

    Thank you for posting here.

    Based on the description, I understand you have two DCs in the domain, the IP addresses are &4.

    Do you install DNS role on both DCs?

    If so, we should set the static IP address for both DCs, and we can set the Preferred DNS on the first DC as ( or, I assume the IP address of the first DC is

    IP address:
    Preferred DNS:


    We should set the static IP address for both DCs, and we can set the Preferred DNS on the second DC as (I assume the IP address of the second DC is

    IP address:
    Preferred DNS:IP address:

    And if you want to change one machine from WORKGROUP to the domain.

    You need to set Preferred DNS as or on this machine first (I assume both DCs are DNS servers, that means you install DNS role on both DCs).
    Then change machine from workgroup to domain.

    Hope the information above is helpful.

    Should you have any question or concern, please feel free to let us know.

    Best Regards,
    Daisy Zhou

    No comments