Friday, September 30, 2011

Setting up a domain controller in a virtual machine

If you need to set up any variety of Windows Server Applications such as Active Directory Federation Services, SharePoint, Windows Server Update Services and a whole variety of other applications, there is a high likelihood that you will need to set up a domain controller.

If you are setting up a domain controller on a home network where you have a router performing all of your DHCP operations, it is likely that you will not want to set up your domain controller to act as your DHCP server as well.  Therefore, the easiest thing to do is to simply set aside a block of static IP addresses that you can use to assign for your virtual environments.

Once you have done that, you should be able to follow these steps to install and configure your domain controller.  For this example, I have installed Windows Server 2008 R2 and using this OS as my base configuration.  For ease of use, I also use VMWare Workstation or VMWare Player to build and configure my virtual machines.

  1. Open up the Network Adapter settings and assign a static IP address to the IPv4 configuration from the block of static IP addresses that you have set aside.
  2. If you need to enter a default gateway, configure the default gateway as the IP address of your router (usually something like
  3. If you need to enter a Primary DNS server, you can enter the IP address of your router as well (such as
  4. Once you have entered your settings, click OK to save all of your network adapter settings.
  5. If everything is configured correctly, you should still be able to access the Internet from within your virtual machine using a web browser.
  6. If you have customized or disabled any Windows Services, you will need to ensure that the appropriate Windows services are enabled and started:
    1. Remote Procedure Call (RPC) Service
    2. Remote Registry Service
  7. Now, at the run command, you can run dcpromo
  8. This should now initiate the process to install the Active Directory binaries on your machine as well as launch the Active Directory configuration wizard. 
  9. While configuring Active Directory through the configuration wizard, you will be prompted for setting up a new forest or using an existing forest.  Since you probably do not have an existing domain infrastructure in place, you will want to create a new forest.  In terms of forest compatibility, I would recommend either configuring the compatibility to either Windows Server 2008 or Windows Server 2008 R2 compatibility mode.
  10. After proceeding through several other configuration steps, you will be prompted to configure DNS on the server.  You can allow the domain controller to be configured as its own DNS Server.  This will effectively modify the network adapter settings to include as the Primary DNS Server IP Address.
  11. If there were no hiccups in the configuration wizard process, you should be done with successfully configuring a domain controller within your virtual machine!


  1. I am very much impressed from your post.It has amazing information.I learned lot of new things which explores my knowledge in various developments.So i must appreciate your efforts on posting these information.
    domain name hosting

    1. I am glad that you found the content useful! :-)