Mac – How to join Azure VM to domain

azurednsvirtual machine

I created a new VM from Microsoft Azure portal. On that VM, I need to install my application (a windows service) which must run under an AD user account. In order to add that user on this VM, I need to join the VM to domain first. I tried regular way of connecting machine to domain through System Properties window but I get below error –

An Active Directory Domain Controller (AD DC) for the domain "*.com" could not
be contacted. Ensure that domain name is typed correctly.

Do I need to set any IP address? I checked my desktop's (which is connected to similar domain to which I want to join this VM) network properties but everything (IPV4, DNS IP address etc.) is set to obtain automatically. What do I need to know to join azure VM to domain?

Thanks.

Best Answer

You need two steps to make this work:

  1. Configure the Site-to-Site VPN between Azure and your corpnet.

  2. Manually configure the DNS to make sure that the VM uses domain controller as its' DNS server.

For the first part, please follow this guide to configure the S2S VPN.

Note: You needn't create the new VNET, just select the existing one when create the connection. Otherwise, you may need to re-create your VM to put it into the new VNET.

For the second part, please use the custom DNS settings. Here is the screenshot of my Azure:

enter image description here

Related Question