Connecting multiple machines on the same domain would be one of the requirement to all the network administrator to set up the environment for any scenario.
This post explains this scenario how administrators can they do this setup easily.
I pretend that you have a machine with a domain controller on it.
While creating another machine, you need to choose the first machine’s virtual network instead of creating a new one as like below.
Next, you can identify the IP address by typing ipconfig in command line tool.
Also, you can ping the machines each other. In case, if you are not able to ping then turn off your firewall.
Then, try to add the domain and it will throw an error message as like below.
To rectify the above issue, you need to add the domain control IP address on DNS Server. Go to Azure Portal and Network Interface.
In DNS Server add the domain controller IP address in custom and restart the machine.
Again log into the machine and now try to add the domain and this time you can add successfully. Share your comments, if any issues.