Configuring the Domain Controller on the Azure VM and then putting another VM in domain.
While working as part of the monitoring team I have to test multiple scenarios. Often, I get a need of the Domain Controller and a machines part of the domain. Mostly it comes up when I want to test the application that can only be installed on the machines which are part of the domains. For example, I want to test the monitoring for Citrix Environment. Here I have to configure the Citrix Environment which can only be done on machines which are part of the domain. This installation needs lot of service accounts as well.
Mostly for these kinds of research and proof of concepts I prefer doing things on the Azure VMs that are part of my dev\test subscription. I spin of the VM, test the things and delete the VM.
Once I thought of installing the domain controller on Azure VM’s so I did research on it and came across lot of articles. Most of these article are too much technical and suggest high level of customization. These kinds of article are mostly for creating the production environment. Mostly I use this configuration for doing a testing and POC’s. However, for me requirement is a temporary DC where I can do the testing and delete the VM when my testing is over. So, here I will talk about a very easy way of creating the domain controller on Azure and adding a machine in that domain. I suggest you to not use this configuration for production environment.
Here are the steps to configure the Domain Controller and a machine in Azure.
Creating the Virtual Machines
Create two Windows 2016 VM’s in Azure. I prefer using the low cost vm’s like “Standard DS1 v2 (1 vcpus, 3.5 GiB memory)”. Make sure both the agent uses the same “Virtual network/subnet”.
Define the Basic details
Define the Disks Details
Define Network Details ***Important Section***
Define the Management details
Use all the default options under Advanced and Tags. Review the details. Click on Create.
While creating other VM follow the same steps. Make sure you are selecting correct size, Network options and marking this VM to shutdown during Off hours.
Installing the ADDS, DNS ad DHCP roles.
Login to first VM and go the server manager and add the roles: –
Active Directory Domain Services
And simply do next and next. Ignore the warning specific to “Static IP Addresses”. We will fix these errors at the end. Just proceed with Default options. Do not make any changes to NIC from inside the VM. Ignore the below validation warning.
After creating the domain controller, create the users and groups.
Configuring the DNS from Azure Portal.
Installation of these components will reboot the server.
Login again to server and right down the IP address of the DNS server. To do this go to server manager.
Now come back to Azure Portal. Go the Virtual Machine.
Click on the “Virtual network/subnet”. This will take you the Virtual Network which we created while creating the VM.
Under the Virtual Network, search for DNS. Under DNS, Select Custom and put the IP address which we copied from the Server DNS.
Now put second VM in the domain.
Now Login to second VM. Open the Server Manager. Under Domain click on it and put this VM in the Domain. It will ask for Global Admin user name and password.
With these steps, you can have a domain controller and the machine part of this domain. Remember these are the steps for doing the testing. Please don’t follow these if you are planning the Production Environment.