The following is a short guide for promoting a Windows Server 2012 Machine to be a domain controller. This assumes that there is no existing forest or domain. My reason for doing this is to create a test enviornment using virtual machines on Oracle Virtual Box. I'm planning to setup an AlwaysOn Availability group.
One of the prerequisite to creating an Always on Availability group is a Windows Server Failover Cluster (WSFC). To set up a WSFC I need a domain. Hence why I’m creating a domain controller. In future posts we will look creating an availability group
I have used Oracle Virtual box to create a server in my domain. I have used the same process previously using VMWare Workstation.
I'm going to assume you have run through create Virtual Machine wizard and generated the VM configuration. With the Windows Server ISO mounted and you have run through the install.
First you will configure the Windows Server. Set and Administrator Account and click Finish.
If your using a Virtual box you can press the host key + del (my host key is the right-hand Ctrl button) to send a Ctrl+Alt+Del to the VM guest
Log in to the VM using the password entered during setup.
Dcpromo has been deprecated, so if you have done this before using that command, you have a couple of options.
In this post we will be using Server Manager (UI).
Change the Computer Name
Click on the Server Manager Button in the start bar
Then click on the Local Server Option in the left-hand menu
Click on the Computer Name
Click on the Change button on the Computer Name tab and enter a meaningful name for the Domain Controller. I have called my GREDC
Changing the name requires a server restart, click Restart Later if prompted. We will change the IP address first
Set IP address
Right-click on the Network icon in the tool bar and click Open Network and Sharing Centre.
Click on Change adapter settings.
Right-click the Network adapter and chose Properties
Click on the Internet Protocol Version 4 (TCP/IPv4) option and then click the Properties button
I set the IP Address to be 10.10.10.1 accepted the default settings for subnet mask and set the preferred DNS Server to be 10.10.10.2 then click OK
Restart the VM
Reboot the VM
Install the AD DS Role
From the Server Manager Dashboard, click on Add roles and features.
Click next on the first screen of the wizard
Ensure that the Role-based or feature-based installation option is selected (it should be the default) and click Next
Ensure that the Select a server from the server pool option is selected and the server we have been working on is highlighted. Click Next
Click on the Active Directory Domain Services role. You will prompted with a message that says other roles and features need adding. Click Add Features
You can accept the default on the Features tab and click Next.
On the AD DS page click Next
On the Confirmation screen click Install Wait patiently while the wizard runs.
You'll get a screen that look like the following when the install succeeds
You will see a yellow explanation warning on the Server manager toolbar. Click the warning and you will see there is a post-deployment configuration needed. Click the link to promote this server to a domain controller
This will start the Deployment Configuration Wizard
Click on Add a new forest and give your root domain a valid name
You can then set the functional level of the domain. I accepted the defaults here which is Windows Server 2012 R2. If you have a reason to choose a different functional level you can do so using the drop-down list. Click Next
On the DNS Option page, as this is a root level domain you will get warning, you can just click Next here
The wizard will show you the NetBios name which it would have established from the domain name we entered earlier in the wizard.
I am happy to accept the default location for the database, log and SYSVOL locations. You can change these if you wish. Click Next
You will get an opportunity to review the options here and view the PowerShell script that you can reuse to recreate the DC if needed. Click Next
The pre-requisites review can take a few seconds to run. You will get a few warnings that for the purposes of demo domain I'm happy with.
Click Install and the virtual machine will become a domain controller.
The purpose of this post is to create a domain controller, which will enable me to create a Windows Server Failover Cluster (WSFC) later on. Using the Windows Server Failover cluster I will then implement an AlwaysOn Availability Group.
View our SQL Server and Cloud consulting pages for information on our SQL Server Consulting page.