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.
This article explains that how you can access virtual machine applications outside of network with the help of DNS.
Consider you have installed SQL Server on Azure Virtual machine and created few databases on the server. If you want to access those databases on your local machine, then you need to follow the below steps.
Once you have configured all the above steps, you can access your databases on another machine in SQL Server Management Studio.
Refer the below link to know in detail about the above steps.