locked
Joining Azure VMs to Azure DC? RRS feed

  • Question

  • I have VMs all on the same virtual network & subnet. Promoted one to Domain Controller with a Static IP. For some reason, I can't add the VMs to the Domain. I keep getting "DNS name does not exist"

    Any tips?

    Wednesday, July 10, 2019 8:40 PM

Answers

  • Okay. I was finally able to create a Domain-joined test lab completely in Azure. Here's how to do it for two VMs:

    1.) Create two VMs in Azure (One Server OS, one Win 10 OS) and ensure they are in the same VNET during creation. RDP into the server, run Server Manager and add Active Directory Domain Services and allow it to install all the way through. You'll be prompted to promote the server as the Domain Server. Do so. You'll be prompted to create a Forest and name the domain.

    2.) Make note of the Server's Private and Public IP address. Select the Virtual Networks blade in Azure >  DNS Servers and click on Custom. Add the Domain Controller's Private and Public IP address, one in each field and click save. If you were RDP'd into either VM, it might boot you out.

    3.) Run the IPconfig /flushDNS prompt and restart the computer.

    4.) RDP into the DC VM and select the network adapter > Properties > Internet Protocol Version (TCP/IPv4) and make the DNS server the public and private IP address of the VM.

    5.) RDP into the Win10 VM, select the network adapter >Properties > Internet Protocol Version (TCP/IPv4) and make the DNS server the same values you added for the Server/DC VM.

    6.) Probably a good idea to restart each computer. RDP into the Win10 computer, search for "System Info" and you'll see a window with the computer name and system information. Click "Change Settings" on the right hand side. Click "Change" next to "To rename this computer or change it's domain or workgroup. Click Change."

    7.) Enter the fully qualified domain name. ex (MicrosoftTest.local) and enter in the credentials when prompted.

    That's it!

    Tuesday, July 16, 2019 6:01 PM

All replies

  • I have VMs all on the same virtual network & subnet. Promoted one to Domain Controller with a Static IP. For some reason, I can't add the VMs to the Domain. I keep getting "DNS name does not exist"


              

    Please make sure all virtual machines either use the same virtual network (when within the same region) or that Vnet-to-Vnet peering is enabled between the virtual network where the virtual machines reside that you want to join to the domain and the virtual network where the Domain Controller(s) live.

    Please configure DNS to use the IP address of the Domain Controller for the virtual network.
    Follow these steps:

    1. Log into the Azure Portal with an account that has sufficient privileges to manage the Azure VNet.
    2. In the left navigation pane, click All resources.
    3. From the list of resources, pick the virtual network.
    4. In the Virtual Network properties, in its navigation bar, click DNS servers.
    5. Select Custom.
    6. Enter the IP address(es) for your Domain Controller(s)
    7. Click Save

          

    Repeat the above step for each virtual network that has virtual machines that you want to join to the domain and is connected through Vnet-to-Vnet peering.

    As a best practice, deploy at least two Domain Controllers for each Active Directory domain.

    Thursday, July 11, 2019 6:05 AM
  • Thank you Sander Berkouwer That is absolutely correct . @ LucioBen , I would request you to please go through the steps and it would certainly help you get the virtual machine's domain joined and you won't get the "DNS name does not exist" error. Do remember to mark Sander's answer in case this solution works for you . 

    Thank you. 


    Please take a moment to "Mark as Answer" and/or "Vote as Helpful" wherever applicable. Thanks!!


    Thursday, July 11, 2019 8:29 AM
    Owner
  • When you say "configure DNS to use the IP address of the DC" do you mean the Public or the Private IP address of the Azure DC?.

    To confirm, they're connected to the same virtual network

    Thursday, July 11, 2019 6:23 PM
  • As you mentioned all the VMs are in the same Vnet simply go to the VNet--> DNS servers--> Custom DNS

    By default Azure vm uses Azure DNS instead update your custome DNS iP that is your DC server IP and reboot all the VM to get the new DNS server IP.

    Post reboot all your VM's can communicate with the DC server. you must use private IP of your DC server


    Tuesday, July 16, 2019 8:05 AM
  • Okay. I was finally able to create a Domain-joined test lab completely in Azure. Here's how to do it for two VMs:

    1.) Create two VMs in Azure (One Server OS, one Win 10 OS) and ensure they are in the same VNET during creation. RDP into the server, run Server Manager and add Active Directory Domain Services and allow it to install all the way through. You'll be prompted to promote the server as the Domain Server. Do so. You'll be prompted to create a Forest and name the domain.

    2.) Make note of the Server's Private and Public IP address. Select the Virtual Networks blade in Azure >  DNS Servers and click on Custom. Add the Domain Controller's Private and Public IP address, one in each field and click save. If you were RDP'd into either VM, it might boot you out.

    3.) Run the IPconfig /flushDNS prompt and restart the computer.

    4.) RDP into the DC VM and select the network adapter > Properties > Internet Protocol Version (TCP/IPv4) and make the DNS server the public and private IP address of the VM.

    5.) RDP into the Win10 VM, select the network adapter >Properties > Internet Protocol Version (TCP/IPv4) and make the DNS server the same values you added for the Server/DC VM.

    6.) Probably a good idea to restart each computer. RDP into the Win10 computer, search for "System Info" and you'll see a window with the computer name and system information. Click "Change Settings" on the right hand side. Click "Change" next to "To rename this computer or change it's domain or workgroup. Click Change."

    7.) Enter the fully qualified domain name. ex (MicrosoftTest.local) and enter in the credentials when prompted.

    That's it!

    Tuesday, July 16, 2019 6:01 PM
  • Thanks for sharing your solution!

    Please take a moment to "Mark as Answer" and/or "Vote as Helpful" wherever applicable. Thanks!

    Friday, July 26, 2019 10:53 PM
    Owner