vSphere Lab-in-a-Box 13: Set up Secondary Domain Controller

In this post we’ll set up a secondary domain controller on a virtual ESXi server and move it to the other virtual ESXi server using vMotion.

Enable Nested VMs on the Virtual ESXi servers

Since we will be running nested VMs on these virtual ESXi servers, we need to enable the SSH service and then connect to them and add the line to /etc/vmware/config, just like we did for the Lab Host.

Follow the same instructions as in post 07, and perform the steps for both virtual ESXi servers.

Set up Virtual Machine

Open the vSphere Client and select your first virtual ESXi server.  Click on the Virtual Machines tab, then right-click and choose New Virtual Machine…


Select Custom and click Next.


Give the virtual machine a name, select the Lab-in-a-Box as the location and click Next.


Select the shared_iscsi datastore and click Next.


Leave the Virtual Machine version on 8 and click Next.


Select Microsoft Windows Server 2008 R2 (64-bit) and click Next.


Leave the CPUs on default and click Next.


Change the Memory Configuration to 1GB and click Next.


Leave the NICs on default and click Next.

SCSI controller can be left on default as well.  Just click Next.


Create a new virtual disk and click Next.


Set the disk Capacity to 20GB and change the Disk Provisioning to Thin Provision.  Click Next.


Leave the Advanced Options on defaults and click Next.


Tick Edit the virtual machine settings before completion and then click Continue.


Remove the Floppy Drive and click Finish.


Upload the Windows 2008 ISO

Before we can build the virtual domain controller, we need to upload the Windows 2008 ISO to the shared datastore.

Click on the Configuration tab and then StorageRight-click on the shared_nfs datastore and choose Browse Datastore…


Click on the button to create a new folder and name it ISOs.


Click into ISOs, then click the Upload button and choose Upload File…


Locate the Windows 2008 ISO and wait for it to upload to the datastore.


Click on the Virtual Machines tab, right-click on dc02 and choose Edit Settings…


Click CD/DVD drive 1 and choose Datastore ISO File.  Click Browse and locate the Windows 2008 ISO file on shared_nfs/ISOs. Tick Connect at power on and then OK to finish.


Install Operating System

Start the VM and connect to the console.  Install Windows 2008 as per the previous instructions for the first Domain Controller.

After installation and logging in, you should be assigned an IP address in the range.  Rename the server to “dc02” and install the VMware Tools before rebooting.

Assign the server a static IP address of, with DNS servers and, as per below:


Run “dcpromo“.  Click Next to Start.


Select Existing forest and Add a domain controller to an existing domain.  Click Next to continue.


Enter the name of the domain and then click the Set… button and enter credentials for the Administrator account.  Click Next.


Select the lab domain root and click Next.


Select the Default-First-Site-Name and click Next.


Leave the DNS server and Global catalog options selected and click Next.


You may receive a warning such as the following.  This is to be expected, so click Yes.


File locations can all be left on the defaults.  Click Next.


Enter the Active Directory Restore Mode password and click Next.


Click Next to start the installation of Active Directory.


While the components install, tick the box Reboot on completion and wait for the server to reboot.


This concludes the setup of the secondary domain controller.

In the final post of this series, we will use vMotion to move the above server between the hosts and datastores.


Lab-in-a-Box Series:
01 Introduction
02 ESXi Installation on Physical Hardware
03 Installation of vSphere Client
04 Lab Host Configuration
05 Domain Controller Setup
06 Domain and Related Services
07 Configuration of Virtual ESXi Servers
08 vCenter Server Setup
09 vCenter Server Configuration
10 Set up OpenFiler NAS
11 Set up iSCSI
12 Set up NFS
13 Set up Secondary Domain Controller
14 vMotion Tests