top of page
  • Writer's pictureLogan Toms

Setup Windows Server VM for Active Directory: Guide


If you've ever wanted to explore the Windows Server and Active Directory, you've come to the right place. This post will guide you through the foundational steps of setting up virtual hardware using VirtualBox and installing and setting up Windows Server 2019. These are essential steps before using Active Directory. This virtual machine can be a safe playground for learning, experimenting, and sharpening your skills in managing Active Directory. By the end, you'll have a fully functioning Windows Server 2019 running on your machine, acting as a domain controller within your private network.


 

Table of Contents


 

Terminology

  • VirtualBox: A free and open-source hypervisor software that allows users to create and run virtual machines on their physical machines.

  • Windows Server 2019: A version of Windows Server, an operating system by Microsoft designed for server environments.

  • ISO: A file format that contains all the data used for creating virtual disks.

  • Domain Controller (DC): A server that handles security authentication requests within a computer network domain.

  • Network Interface Card (NIC): A hardware component that connects computers to a network.

  • VirtualBox Guest Additions: A suite of drivers and system applications to improve guest operating system performances.

  • Dynamic Host Configuration Protocol (DHCP): A network management protocol used to dynamically assign IP addresses to devices on a network.

  • Active Directory: A directory service developed by Microsoft for Windows domain networks.

 

Choosing Your Tools and Preparing for Setup

I have chosen VirtualBox as the virtualization platform for our Active Directory Lab. We will also utilize the Windows Server 2019 ISO to set up our domain controller.


Essential Downloads for Setup

To follow along with this tutorial, please ensure you have downloaded and installed the following software:


 

Setting Up The Virtual Machine Hardware

In this section, we will walk through the process of configuring your new virtual machine's hardware settings in VirtualBox.


Step 1: Launch VirtualBox and Create a New Virtual Machine

Open the VirtualBox application on your computer and click on the "New" button. This will open the "Create Virtual Machine" window.

New Virtual Machine Button

Step 2: Configure Virtual Machine Name and Operating system

Once the "Create Virtual Machine" window opens, input the following details:

  • Name: Enter a name for your virtual machine. This helps to easily identify it later.

  • Folder: Specify the file location where the new virtual machine will be stored on your computer.

  • ISO Image: Leave this field blank for now. We will install the ISO image later in the setup process.

VM Name and Operating system window

Step 3: Allocate Memory and Processors

Next, move on to the hardware settings, where you will set the amount of RAM and CPU cores to allocate to your virtual machine.

  • Base Memory: This refers to the amount of RAM allocated to your virtual machine. For this lab setup, allocate at least 4 GB (4000 MB). You can adjust these allocations later if needed.

  • Processors: Determine the number of CPU cores allocated to your virtual machine. I assigned four cores for faster performance; however, one core will work as well.

VM Hardware Window

Step 4: Allocate Virtual Hard Disk Space

Lastly, designate the amount of hard drive space to assign from your computer to the virtual machine.

  • Disk Size: This is the amount of hard drive space allocated to your virtual machine. For this lab setup, assign 20 GB. Remember, you can always adjust these allocations later if necessary.

VM Virtual Hard Disk Window

Remember to save your settings before exiting the "Create Virtual Machine" window. Now that we have successfully set up the basic hardware for our virtual machine, there is one more network setting to adjust next.


 

Configuring VM Network Settings

In this next section, we'll configure the network settings for our virtual machine. We'll add a Network Interface Card (NIC), giving us a total of two NICs for our setup. The first NIC will allow our domain controller to communicate externally with the internet, and the second NIC will manage internal network communication.

What is a Network Interface Card or Domain Controller?

Network Interface Card (NIC):

A Network Interface Card, commonly known as a NIC, is a hardware component that allows computers to connect to a network. The NIC provides a physical interface for networking both wired and wireless connections. It translates the data on the computer into a format that can be transmitted over the local network or the internet. NICs are commonly found as Ethernet cards in computers, providing a connection to a local area network (LAN).


Domain Controller (DC):

A Domain Controller (DC) is a server that maintains the database of user account information and manages user interactions, such as logging on, authentication, and access to resources within a Windows Server domain. It's a critical part of the Windows Server's Active Directory technology.

Step 1: Access Network Settings

To start, right-click on your newly created virtual machine and select "Settings." Navigate to the "Network" tab.


Step 2: Adapter 1

By default, you should see Adapter 1 enabled with Network Address Translation (NAT). NAT allows the virtual machine to map multiple internal IP addresses into a single public IP address before communicating with the external internet.


Step 3: Adding a Second NIC (Adapter 2)

For internal network communication, we need to set up a second NIC.

  1. Click on the "Adapter 2" tab.

  2. Check the box that says "Enable Network Adapter."

  3. From the "Attached to:" dropdown menu, select "Internal Network."

  4. Assign a name that indicates this NIC will be used for internal network communication.

VM Network Settings Window

Now we have successfully added a second NIC for our virtual machine. This NIC will communicate on the internal network and allow us to connect other Windows desktops to our Windows server. Now that we have the hardware configured let's move on to installing the software.


 

Installing Windows Server 2019 ISO

In this section, we will install the Windows Server 2019 ISO onto our newly created virtual machine.


Step 1: Start the Virtual Machine and Mount the ISO

Start the virtual machine. Since we didn't add the ISO image during the setup, we will be prompted to do so now. Select the Windows Server 2019 ISO file that you've previously downloaded, then proceed with "Mount and Retry Boot."

VM Mount prompt

Step 2: Follow the Installation Prompts

During the initial startup, you'll encounter several prompts:


Prompt 1: Select "Next."

Prompt 2: Select "Install now."

Prompt 3: Choose the "Windows Server 2022 Standard Evaluation (Desktop Experience)" option. This option allows us to interact with the desktop Graphical User Interface (GUI). However, if you'd prefer to interact solely with the command line, then select the "Windows Server 2022 Standard Evaluation" option. Select "Next."

Prompt 4: Check the box to agree to terms, then select "Next."

Prompt 5: Select "Custom: Install Microsoft Server Operating System only."

Prompt 6: Choose the hard drive disk space that was previously allocated to our virtual machine, then select "Next."


Step 3: Complete the Installation

Allow the setup to complete. You will then be prompted to set a password for the administrator account. Choose a password that is secure yet easy to remember, and then select "Finish."


TIP: To open the lock screen on your VM, you can select Input > Keyboard > Insert Ctrl+Alt+Delete, or select the VM Host key+Del on your keyboard (typically, the host key for a virtual box will be the right ctrl button).

Login screen

Now we have successfully installed Windows Server 2019 on our virtual machine. Next, we will need to finish configuring VirtualBox Guest additions and setting up an internal NIC with private IP addressing so that it can communicate with other desktops we add later.


 

Setting Up VirtualBox Guest Additions

We'll install VirtualBox Guest Additions for a more user-friendly experience with VirtualBox. This will provide us with additional capabilities, such as adjusting the screen size, among other features. Here's how you can do it:


Step 1: Insert Guest Additions CD Image

Once you're logged into your Windows Server, navigate to "Devices" located at the top of the screen, then select "Insert Guest Additions CD image..."


Step 2: Open File Explorer

Open File Explorer and navigate to the "VirtualBox Guest Additions" that you've just inserted. Look for the '"VBoxWindowsAdditions-amd64" and select it.


Step 3: Install Guest Additions

You'll now walk through a series of prompts for the installation:

Click "Next" > "Next" > "Install"


Step 4: Reboot Your System

After the installation, choose the option for "Reboot now" and then click "Finish."


After rebooting and logging back in, you should notice a smoother user interface. Moreover, the screen size should automatically adjust when the window is enlarged. This completes the setup of VirtualBox Guest Additions, improving the overall usability of your virtual environment.


 

Configuring Windows Server Network Settings

Now we're going to configure the two Network Interface Cards (NICs) that we enabled earlier. This step is crucial to ensure proper network communication for your domain controller.


Step 1: Open Network Connections

First, go to the "Type here to search bar" on your Windows Server, enter "network connections," and select "View network connections" to open the control panel.

Network Connections Screenshot

Step 2: Identify Ethernet Items

Here, you'll see two Ethernet items. To set up our network configurations, we need to identify which NIC communicates externally with the internet and which one communicates internally within our network.

Control Panel Screenshot

Step 3: Determine NICs

To distinguish between the two, right-click on each Ethernet item, select "Status" > "Details", and look for the IPv4 Addresses. Here's what to look out for:

  • If the IPv4 Address starts with 10.x.x.x, it's the external NIC that communicates with the internet. Right-click and rename this to "EXTERNAL."

  • If the IPv4 Address starts with 169.x.x.x, it's the internal NIC. This NIC is getting an IP of 169.x.x.x because it couldn't communicate with a Dynamic Host Configuration Protocol (DHCP) server to obtain an IP address, meaning it can't communicate with the internet. Right-click and rename this to "INTERNAL."

Step 4: Set the Private IP Address for INTERNAL NIC

Finally, we are going to set up a private IP address for our INTERNAL NIC. Here's how:

  1. Right-click the INTERNAL NIC and select "Properties."

Properties Screenshot

2. In the properties window, select "Internet Protocol Version 4 (TCP/IPv4)".

Internal Properties Screenshot

3. Choose the option "Use the following IP address:" and enter the following:

  • IP address: 172.16.0.1

  • Subnet mask: 255.255.255.0

  • Default gateway: (leave this empty)

  • Preferred DNS server: 127.0.0.1

IPv4 Properties Screenshot

4. To finish, close the windows and click "Ok." Congratulations, you've successfully configured the network settings of your Windows Server!


 

Renaming the Virtual Machine for Easy Identification

In this final setup stage, we'll adjust the computer name of our virtual machine. This simple change can make it easier to identify our computer in future tasks and when we proceed to install Active Directory on our VM.


Here are the steps to change your device name:


Step 1: Accessing Device Name Settings

Begin by typing "device name" in the Windows search bar. This will direct you to the relevant settings page.


Windows Search bar


Step 2: Navigating to Rename Option

On the resultant "About" page, find and click on the "Rename this PC" option.

Windows About Page

Step 3: Renaming the Device

Now, you can assign a new, easily recognizable name to your device. In my case, I chose the name "DomainController".

Rename Device

Step 4: Restarting the VM

After this change, the system will suggest a restart for the modifications to take effect. Proceed by clicking on "Restart now."

Rename your PC screenshot

Remember, an easily identifiable device name can greatly help in distinguishing between different devices in a network, particularly in a complex setup with multiple devices.


 

We have successfully set up a virtual environment using VirtualBox, installed Windows Server 2019 on it, configured its network settings, and prepared it for further use. In our next post, we'll dive into installing and configuring Active Directory on your newly created Windows Server. Setting up Active Directory correctly is crucial for managing a secure and efficient network environment.

bottom of page