Configuring a domain controller (optional)
In a production environment, it is not recommended that you install the domain controller with any of your other server software. Doing so will have a negative impact on your SQL Server installation, as outlined in https://msdn.microsoft.com/en-us/library/ms143506.aspx#DC_support.
It is still helpful to have access to a domain controller to get a feel of how a "production environment" works, or understand how to create and manage domain accounts, among other tasks. If you have a spare VM (or if you can create another one), it would be best to install your domain controller on a different VM. However, if you are working with only a single VM, we can install this role on the same machine. Make sure you note down the limitations as specified in https://msdn.microsoft.com/en-us/library/ms143506.aspx#DC_support.
If you want to mimic a production setup, you can create another Windows Server 2012 R2 VM with a different computer name, and perform...