Building an Exchange 2013 LAB Environment using Windows Server 2012 from scratch – Part 1: Active Directory Domain Controller O/S Install…

by Andy Grogan on January 19, 2013 · 9 comments

in Exchange 2013 (General), Hyper-V, Test Labs, Windows Hyper-V Server 2012, Windows Server 2012 [ Active Directory ], Windows Server 2012 [ Install ]

Times change, people change – and as well all know, technology changes as well. The last part of that sentence could not be more true of Windows, Active Directory and Exchange Server recently.

Back in the day (from around 2000 / 2001) – you could set up a working Active Directory / Exchange environment up in your test lab probably in a day. However as the products have evolved over the years the feature set has expanded there is much more to consider, and a number of traditionally familiar ways of doing things have changed.

Whereas it is probably wrong to say that things have become more complex (although to a certain degree this is also true) – the gap between terminology and processes to get your environments up and running has expanded between Windows 2000, 2003, 2008, and Windows 2012.

So, with this borne in mind I have decided to put out an article series which takes you through the process of setting up a simple Exchange 2013 test lab from scratch on Windows Hyper-V server. As I go through the series I will pass on some tips and Powershell scripts which hopefully will make you lives easier – as well as demonstrate some of the areas that have had a major overhaul in both Windows and Exchange.

Configuring Hyper-V

This article is based around Hyper-V 3.0 which shipped with Windows 2012. I am personally using Windows 2012 Core with the Hyper-V role installed, but the processes within this article also apply to Windows Server 2012 Hyper-V installed with the full Windows GUI.

First of all – it is probably best to give you an overview of the topology of the lab environment that I have provisioned for this set of articles along with the specification of each Virtual Machine.

artTestLocalSchematic

The Hyper-V host is provisioned with a single Inter i7 Quad Core processor and 32 GB of RAM. The server has around 4 Terabytes of usable storage connected via SATA 3, full specifications of the test rig can be found here: http://www.telnetport25.com/2011/11/the-new-test-lab-rig-is-born/

I am running Windows Server 2012 Data Centre Core – with Hyper-V installed on the server.

At the networking layer – I have created two V-Switches within Hyper-V:

  • Public V-Switch – used for Public network communications (as an External within the Hyper-V Manager)
  • Private V-Switch – used for Private network communications – this will be used as the replication network for Exchange 2013 Mailbox DAGs (as Private within the Hyper-V Manager)

The environment consists of the following servers:

Name:

art-DC-01

 

Role:

Domain Controller (GC and all FSMO Roles)

Memory:

1.5 GB

V-CPU:

1

Disk:

C:\ [100 GB] T:\ [20 GB]

NIC:

1 [Public V-Switch]

O/S:

Windows 2012 Standard

 

 

Name:

art-MBXCAS-01

 

Role:

Exchange 2013 Server with MBX and CAS roles

Memory:

5 GB

V-CPU:

2

Disk:

C:\ [100 GB] X:\ [60 GB]

NIC:

2 [Public V-Switch] and [Private V-Switch]

O/S:

Windows 2012 Data Centre

 

 

Name:

art-MBXCAS-02

 

Role:

Exchange 2013 Server with MBX and CAS roles

Memory:

5 GB

V-CPU:

2

Disk:

C:\ [100 GB] X:\ [60 GB]

NIC:

2 [Public V-Switch] and [Private V-Switch]

O/S:

Windows 2012 Data Centre

 

 

Name:

art-MBX-01

 

Role:

Exchange 2013 Server with MBX and CAS roles

Memory:

5 GB

V-CPU:

2

Disk:

C:\ [100 GB] X:\ [60 GB]

NIC:

2 [Public V-Switch] and [Private V-Switch]

O/S:

Windows 2012 Data Centre

 

Provisioning the Domain Controller in Hyper-V

To provision the Domain Controller within Windows Server Hyper-V 2012 open the the Hyper-V Manager tool. When the management interface has loaded, from the “Actions” menu (on the right hand side) select [ New-> Virtual Machine ]. This will begin the New Virtual Machine Wizard.

You will be asked to provide a name for your VM (I have used art-DC-01 – but you can call your domain controller whatever your would like). You should also choose the location where you would like the Virtual Machines files – you can either accept the default location that is configured within Hyper-V – or you can tick the “Store the virtual machine in a different location” tick box and select another disk.

When you are done click on the “Next” button.

18-01-201318-58-35

You will then be asked how much RAM you would like to allocate to your Virtual Machine – in my LAB I have chosen 1.5 GB – you can allocate more, but I would not recommend less. You can also choose to use Dynamic Memory for the VM. When you have finished click on the “Next” button.

18-01-201318-59-30

You will now need to configure the Network connection that you wish to make available to the Virtual machine. As I mentioned above, in my environment I have two connections, one Public and one Private. Select the connection in your environment that will allow for the VM to be visible to all machines on your network. When you are done click on the “Next” button.

18-01-201319-00-51

You will then be asked to configure a system disk for your VM. You will need to give it a name, provide the location where you would like it stored (this should be with the VM configuration files), the size of the disk (I am using 110GB). When you are happy click on the “Next” button.

19-01-201314-33-08

You will then be asked to provide the location of the Installation files for your operating system. I have downloaded the Windows 2012 installation ISO to a location on my Hyper-V host, therefore I choose the option “Install an operating system from a boot CD/DVD-ROM” and located the ISO. You will need to select the option which suites your own and then click on the “Next” button.

18-01-201319-03-00

You will then be presented with a summary of your configuration options – please take time to review them, then click on the “Finish” button.

18-01-201319-03-58

Installing Windows Server 2012

When your VM has been provisioned and appears in the Hyper-V Management Console – right click on its entry and from the context menu that appears choose the “Start” option. When then machine has started, again right click on its entry and from the context menu choose “Connect”.

The Windows 2012 setup process should have begun and you should be presented with the Locale screen as per the example below. Choose the options that suit your own configuration best and then click on the “Next” button.

18-01-201319-05-49

On the next screen click on the “Install Now” option.

18-01-201319-06-49

You will then be asked to provide your license key for the edition of Windows that you intend to install. Within my LAB the domain controller is going to be running on Windows Server 2012 Standard Edition, but you can provide a key for whatever version you are licensed for. When done click on the “Next” button.

18-01-201319-08-27

On the “Select the operating system that you want to install” screen – choose the GUI version of the O/S that you provided the license key for in the previous step. When you are done click on the “Next” button.

18-01-201319-13-32

You will then be asked to confirm that you accept the licensing agreement for the operating system, select the “I accept the license terms” and then click on the “Next” button.

18-01-201319-14-23

You will then be asked if you would like to upgrade an existing install of Windows, or choose a custom install – select the custom install option. This will give you the chance (should you wish) to customise the disk partitions of your VM. When you are done click on the “Next” button. For the purposes of my LAB I made no changes and gave the entire 100GB to the O/S.

18-01-201319-15-15

Windows setup will then proceed to install the O/S on your VM – there may be several reboots during this process.

18-01-201319-16-09

When Windows setup has completed you will be asked to provide a local administrator password for the VM.

18-01-201319-24-03

When the password has been set – you will be able to log into your new VM and begin the process of configuring it as a LAB domain controller.

18-01-201319-25-05

Configuring your Virtual Machine

When you have logged onto the VM you will need to configure a number of settings within your Operating System. In order to do this I will take you through how you can use Powershell to modify the following:

  • Local Computer Name (as Windows Setup provides you with a default name)
  • IP Addressing

Configure Your Computer Name

Open a Powershell session on your VM and at the prompt type:

Rename-Computer <computername>


Therefore in my LAB – my domain controller is to be called art-DC-01 – therefore the command is:

Rename-Computer art-DC-01

18-01-201320-02-13

You need to restart the VM for the new name to take effect – and this can be done by typing:

Restart-Computer

However if you wish to save time, hold off on restarting your machine until you have configured your IP settings.

Configuring your IP settings

As Powershell has advanced – there are now a number of new cmdlets that let you control a huge number of aspects of your Operating System configuration. Once such advance is the ability to configure IP settings from the shell.

From within your Powershell Window type in the following command:

New-NetIPAddress –InterfaceAlias “Ethernet” –IPAddress <your chosen IP> –AddressFamily IPv4 –PrefixLength 24 –DefaultGateway <Gateway address>

Breaking this command down – some of the parameters might seem a little unfamiliar – therefore:

  • InterfaceAlias – the name of the Network adapter on your system that you wish to apply the address to. When Windows Server 2012 was setup the network adapter that you assigned to the VM will be given the default name of “Ethernet”
  • -AddressFamily – stipulates if you are providing a IP4 address or IP6 – in our example we are using IPv4
  • -PrefixLength – This is essentially the subnet mask – in my LAB I am using a /24 subnet which translates to 255.255.255.0

Given the above the command for my server looks like:

New-NetIPAddress –InterfaceAlias “Ethernet” –IPAddress 172.31.253.107 –AddressFamily IPv4 –PrefixLength 24 –DefaultGateway 172.31.253.129

18-01-201319-40-00

It is also a good idea at this point to configure a DNS server (as in the next step you should install any available Windows updates). You can do this from the shell by using the following command:

Set-DNSClientServerAddress –InterfaceAlias “Ethernet” –ServerAddresses <DNS Servers separated via a comma>


Therefore in my LAB I have assigned a DNS server address of 172.31.253.130 using:

Set-DNSClientServerAddress –InterfaceAlias “Ethernet” –ServerAddresses 172.31.253.130


Reboot your computer using the

Restart-Computer

Powershell command and then install any required windows updates.

In the next part

I will take you through how you can install Active Directory on your new Domain Controller.

Social

{ 4 comments… read them below or add one }

appliance repairs July 13, 2013 at 2:17 pm

Greetings! I just found your website: Building an Exchange 2013 LAB Environment using
Windows Server 2012 from scratch when I was exploring delicious.

com. It looks as though someone loved your site so much they decided to
bookmark it. I’ll surely be coming back here more often.

Reply

LionelC January 12, 2015 at 8:25 pm

pretty good to discover your website at least 2 years after your lab’s done. howether would like to say not sure you private switch will works when running under a hyper-V cluster. Can you confirm?

Reply

Joe April 14, 2016 at 6:08 pm

My concern is how do you rebuild your environment quickly if you have to refresh every 180 days due to eval timeout? Is there any easy ways to keep the mailstore’s and just rebuild the server? That way you don’t have to recreate all test users and mailboxes and you can also export your AD environment… SO just curious if anyone has found a good solution.

Reply

Salman May 9, 2017 at 1:19 pm

Good Explanation

Reply

Leave a Comment

{ 5 trackbacks }

Previous post:

Next post: