How to Build an MCSA Test Lab Environment
- Lab Design
- Adding Hyper-V
- Configure Virtual Adapters
- Creating a Virtual Machine
- Installing Windows on VM
- Configuring your VM Network
- Constructing Domain Controller
- Post Configuration
Introduction to MCSA Test Lab Environment
Building test labs is imperative for ironing out brand new technologies or software – the student, or professional who doesn’t first build themselves a lab environment for experimentation, examination and tweaking is somebody openly courting disaster. Never let your product or technology make it anywhere near production before being rigorously tested first – this is the golden rule to manufacturing and designing a professional piece of kit, in any medium.
Luckily, lab testing has come light-years since the already archaic days of the early 2000s or late 1990s, where constructing a lab environment was a solely physical ordeal, containing multiple computer systems, arduous setups and a cumbersome amount of data which could scarcely be transported from system to system. Not only do we know have easy access to incredible storage devices and user friendly data transference systems (USBs being the key example), but we also have excellent software which structures and creates a workable lab environment on an already established computer system – meaning the entire process is thousands of times simpler, and a much more pleasant experience than previous eras.
This tutorial will take you through, step by step, the stages of building a coherent and effective lab environment for those undertaking the MCSA/MCSE Server 2012 exams (or Windows 7/8 MCSA exams), using Hyper-V.
Hyper-V provides a completely isolated testing, lab environment all on a single workstation. Isolation is key, as it takes you away from some of the daunting pitfalls of production networks, such as fears of duplicate domain controllers or maverick DHCP servers. This cut-off system means that you harbor the ability to rapidly reproduce complications and certain outcomes, to verify or fix particular behaviors, in the safety of your own solo lab environment.
What Will be Covered
Requirements – Breakdown of hardware/software recommendations and requirements
Lab Design – Suggestion for a lab design for Server and Windows MSCA labs
Adding HyperV – Run through of how to add hyper-V to your host
Configure Virtual Adapters – Difference between adapter types and how to configure
Creating a Virtual Machine – How to create a VM
Installing Windows on VM – Preparing your VM and installing an OS
Configure your VM Network – 3 ways to configure your network and how to configure it
Constructing a Domain Controller – How to Add a domain to your lab
Post Configure – Tasks to consider after your lab is configured
What this Lab is Valid for
The main focus of this lab is to provide a test environment for your MCSA Server 2012 and MCSA Windows 7/8 journey. However, it may also be extremely useful for personal troubleshooting or testing in your work environment. Below are a list of exams which you may want to configure these labs for:
MCSA Windows 7
Lab System Specs and Requirements
1. Minimum Requirements
With this configuration you will easily be able to run your lab, however not all VMs will be able to be on at the same time. When all are running you may start to notice slow downs mostly due to disk bottlenecking and RAM limitations. Many people may suggest SSD or high RPM disk, but it is NOT required and is a waste of money for a simple test environment. With the below specs you will be able to easily find a computer (or even laptop) within a fair price range.
CPU – i5 or greater
RAM – 8 GB or more
1 Disk – 200 GB or more
Due to the economical approach of this configuration, you will have to make some adjustments to make your lab environment functional. If you have 5 VM’s as I outline in the design section, you may not be able to run all of them concurrently. The only server that requires to be running at all times in the domain controller (and possibly the RRAS server). The additional application servers and client servers can be shut down and booted only when needed.
In addition, dynamic memory is recommended to ensure you maximize your memory usage. Also if you are hurting for disk space, I recommend also using dynamic disk rather than fixed disk.
2. Recommended Requirements
With this configuration you should be able to run all of your VMs at the same time while noticing little to no slowdown. At the very worst, one server may need to be shutdown to enhance lab performance.
CPU – I7 +
RAM – 12-16 GB of RAM
2 Disks – 200 GB or more (split VMs between disks to limit disk bottleneck)
It is still recommended to use both dynamic memory and dynamic disk to maximize memory and preserve disk space. Since this is just a test lab, performance is not as crucial as it would be in a production environment. We are more concerned with stretching your resources as far as they can to provide a functional lab.
You are going to need multiple versions of Server 2012 R2 and Windows 7/8. Luckily Microsoft offers full free evaluation versions of their software that can be utilized in test environments.
Windows Server 2012 R2 – MSCA Test Lab Design
In order to create an effective lab for Server 2012 R2 testing, you need to “manipulate” a real-life network environment, therefor it is important to have multiple VMs acting as independent servers. In my test lab, I always run 5 VMs (with a 6th for deploying images to).
The Hyper-V Lab is on a separate subnet (in the above example I use 192.168.2.0) from the home network. This will isolate the lab and its services from your home network. The RRAS/Nat server has an external virtual adapter as well as a private adapter and is capable of routing information from the internal private network to the internet.
Below is a breakdown of each VM.
Domain controller – A dedicated server used for hosting core domain services. The foundation for our lab configuration always includes ADDS. DNS and DHCP. In addition, this is usually where I put services such as ADCS and ADRMS if I require those in the lab.
Application Server (GUI) – this is the main server I install and test the majority of applications. This may include file services, WSUS, WDS etc. In addition this server is usually where I conduct most of my general testing in Server 2012 R2.
Application Server (Core) – This server has the exact same use as the other application Server. However, most of the work that I do in GUI, I replicate in core to become familiar with powershell/commandline.
Windows 7/8 Test – This is your client machine. I often use this for testing client based GPOs, making sure hosted services/applications from our other servers are pushing to the domain etc.
RRAS/NAT – This server is in charge of routing information between the private lab subnet and the home network. It has two NICs (one being external and connects to the home network – the other being private with the lab subnet IP). Refer to the LAN connectivity section of this guide for additional information.
Windows 7/8 – MSCA Test Lab Design
Your windows 7 Lab will be configured very similarly to a Windows Server 2012 R2 Lab. Unfortunately, to get the most benefits from your lab, you will need to set up a domain environment to utilize applications like WDS. Also it is very important to become familiar with domain environments such as working with user accounts etc. If configuring an RRAS/NAT server is overcomplicated, you can you’re your entire lab network isolated (wont have internet access) or run external virtual adapters and configure them to be on the same subnet as your home network (will allow network access). Visit the C onfiguring LAN section for more details.
Below is a breakdown of each VM.
Domain controller – A dedicated server used for hosting core domain services. Your domain environment for your windows 7/8 MCSA lab only needs ADDS as well as DNS and (possibly DHCP)
Application Server (GUI) – This server will be used for server based applications that may be required during your MSCA labs. This includes SCCM, WDS etc.
Windows 7/8 Test – This computer will be your test client for configuring and troubleshooting all Windows 7/8 based objectives from the MSCA exams.
Windows 7/8 Test – This will be your second computer for troubleshooting.
RRAS/NAT – This server is in charge of routing information between the private lab subnet and the home network. It has two NICs (one being external and connects to the home network – the other being private with the lab subnet IP). Refer to the LAN connectivity section of this guide for additional information. This is only needed if you wish to have a private network for your lab and still have internet access.
Adding Hyper-V to your Physical Computer
To first utilise Hyper-V, and create the virtualised, personal testing environment, you must first add Hyper-V to your server, which can be installed through a number of different means (external methods such as Windows Powershell, or simply through server manager command line or GUI).
The simplest method is most likely GUI, so: simply begin by opening your start menu and navigating to ‘administrative tools’, then ‘server manager’ (or launch it from your task menu) in order to launch Windows’ Server Manager software.
Once into this interface, locate ‘Manage’ in the top right of server manager, and select ‘add roles and features’. Naturally, when you are given the options, you want to choose Hyper-V then continue onto the next menu.
You will then be presented with a confirmation screen. Click through this, renaming things as you see fit (‘HyperV’ being the obvious moniker), then install. Your server will then reboot and continue installation upon restarting. You will now find the Hyper-V role under your server management tree.
Setting up the Virtual Adapters for Hyper-V Test Lab
It is important to note that there are three types of virtual network adapters you can create for your hyper-v.
External – Allows communication between VMs on same host, the hyper-v host and external servers/computers
Internal – Allows communication between VMs on same host and the host
Private – Allows communication between VMs on the same host
In the example below, we will be using an external configuration which will potentially allow network connectivity between your VMs and home network/internet.
Usually, this will already be setup, but it’s worth checking at any rate. Open Hyper-V’s manager, and look for the Virtual Switch Manager.
Make sure there is an external network already setup, and shared with the management OS.
You may wish to rename the network in the physical body, by going to control panel – network and internet – network connections and right clicking on the external LAN and renaming it to something functional such as ‘External LAN – SHARED’. Additionally, you can rename the virtual switch by right clicking and selecting rename in virtual switch manager.
In order to create an addition private or internal switch, click on “New Virtual Switch” in the left hand side. Additionally, you can click on a virtual private network and change it between connection types.
Configuring a Virtual Machine for your Test Lab
We are now ready to create your first virtual machine.
From Hyper-V Manager (tools hyper-V from server manager), click “new” from the action pain and select virtual machine.
Specify the name of the virtual machine. Also choose an appropriate location (to save the VM metadata – you can keep this as default)
Assign the appropriate amount of memory (I usually recommend 4 GB for most test lab VMs)
Select the virtual network adapter you created in the previous step, and under ‘connect virtual hard disk’, select “create a virtual hard-disk and select 60GB for the size. Make sure you choose a location with enough space to support your new VM. Once you finish, you will now see your new VM in the virtual machine window under Hyper-V.
Installing Windows on Virtual Machine
We first have to mount your Windows Server 2012 Image (or windows 7/8) into the virtual machine. To do this right click on the virtual machine and select “Settings”. Select Add hardware at the top and add a SCSI controller. Select DVD-Drive as your SCSI controller option.
Select Image file and browse to your Operating System ISO and select ok.
Select firmware and ensure that “DVD Drive” is at the top of the order. This will allow your VM to boot to the CD first.
Select Network Adapter and select your appropriate Virtual Adapter that you configure in “Configure Virtual Adapter” section of this guide. If you want to add an addition Network Adapter, go to “Add new Hardware” at the top and select Network Adapter. Here you can choose your section adapter if needed (you may have to do this for your RRAS server when configuring your VM Network)
Now right click your VM and select start. Go through the Windows installation as you normally would.
Configure your VM Network
There are three methods to configure your Virtual Lab environment. Each of them ranges in difficult and time required. Select which method best suits your environment.
Private Lab (requires Private Virtual Adapter for Vms)
In this method, the lab is completely segregated from the rest of your home network. The virtual NICs should be configured as private. Each NIC IP will be configured for a private network subnet (for example, if your home network is 192.168.1.0, configure your test lab for 192.168.2.0).
The advantage to using this method is that it is extremely simple to set up. Furthermore, it separates your virtual private network test lab from your home network. This method does not even need a NIC configured on your host (private virtual adapters do not to be links to a physical adapter).
This disadvantage to configuring your environment this way is that you will not have any internet access. You can do all of your testing without an internet connection, however, if you need to download any files you will have to inconveniently transport them from another computer VIA USB key.
Add Lab environment to same network (requires external virtual adapter for VMs)
In this method you simply add your hyper-v network to the same subnet that the rest of your home network is on. In addition, configure your gateway the same as the rest of your home network. If your Hyper-V configuration is set to “external” and you are on the same subnet, then you should have internet connection on your VMS as well as be able to communicate with any device on your home network. This configuration is simple, but may not be ideal. It is best to isolate your virtual network on a different subnet to avoid services interacting with your home network (such as NAT translation of an isolated private network).
Connect subnets with NAT translation (Requires External and Private Virtual Adapter for VMs)
With NAT translation, you will be able to configure a private subnet for your test lab, and still communicate with the internet through NAT routing. This is the best of both worlds, as it keeps your lab separate and still allows connectivity to the outside world. Unfortunately, this method takes a lot of time to configure and a little bit of research to get going. Luckily, the skills you learn setting this up will be put to good use if you are pursing your MCSA 2012 certification.
In order to configure NAT routing, we are going to need to set up a VM that will host the Routing and Remote Access Service role. If you looked at the Lab design earlier in this tutorial, you should have already planned for a RRAS/NAT VM. In addition, we are going to have to make sure our Hyper-V host has two virtual switches configured. The first virtual adapter will be a private switch (for the private subnet that the rest of your VM network is on). The second virtual adapter will be external (which will be configured with the same subnet your home network/gateway is on). It is important to note that your VM Host needs to have an active NIC connection to your home network as the external virtual adapter needs to bind to this NIC (See configure virtual adapter section which shows how to choose a NIC for the external adapter).
Now that both networks are setup, you will need to create a bridge between them both, in order to connect the virtual LAN with the external LAN – to do this; you will have to construct a NAT Server (Network Address Translation). In doing so, this guide will use Routing and Remote Access Service (RRAS) as part of Microsoft’s API server software.
If you havnt done so already, please go ahead and create a VM that will host the RRAS role by following the previous steps in this tutorial. Next, you’ll want to shutdown and edit this VM – specifying that Network Adapter #1 as the External, shared LAN you created earlier, and Network Adapter #2 is the private LAN. Please see “Installing Windows on a VM” to review how to do this step. ***To Clarify, you should have two network adapters attached to your VM. One adapter is an External Virtual Adapter and the other is a Private Virtual Adapter
You are now ready to boot your VM and configure your network adapters. Go to start -> Control Panel-> Network and Sharing and then Network Adapters. Rename your External NIC and Private NIC to something more descriptive so you do not get them mixed up. Now go into your external NIC and configure it with the IP Subnet of your home network/gateway (Most likely 192.168.1.x). Go into your private NIC and configure it as the same subnet that the rest of your VM Lab is on (I used 192.168.2.x in my examples).
Once you’ve done all of this renaming and NIC configuring, you are ready to install the RRAS role. In order to do so, you begin by navigating through the start menu to administrative tools and then choose server manager
Once in here, follow previous steps to add a new role, this time selecting ‘Remote Access’. When going through the installation, make sure you place a checkmark beside “routing” as this is the main feature we want to add from Remote Access. When the installation is complete, reboot your server.
Upon rebooting, go to server manager and select tools > routing & remote access. Right click your server name and select Enable and configure Remote Routing
The wizard is fairly straight forward, simply select NAT, then ‘use this public interface to connect to the internet’ and choose your external LAN. Following this, select ‘enable basic name and address services’, and then you should be rocking!
Configuring a Domain Controller for Your Lab
It is recommended that a new VM is configured for your Domain controller. Please follow previous steps for VM creation.
Now that your VM is configured through the previous stages, you now need to work on constructing a domain controller. This is started by adding the Active Directory and Domain Services role to the server.
Navigate to start, then administrative tools, and into server manager. Work through to roles, and ‘add roles’ just as before. Select Active Directory Domain under Server Roles and then click next, to start the configuration process of your domain.
Once this is all installed, go to AD DS on the left pane and select “More” where it states “Configuration required for Active Directory Domain Services. Work your way through the installation wizard until you are into the deployment configuration setup.
Select ‘Add a new Forest” and select your Hyper-V test lab domain name (can be anything you want).
Select Windows Server 2012 for the Forest and domain functional level. Ensure DNS server is selected and type in a recovery password.
Skip the DNS delegation option and configure a NetBios name for your domain (basically a short name for your domain)
Confirm or change the location of your database folder, log folder and SYSvol folder.
You are now ready to select Install at the Pre-req check to Install AD DS
Test Lab Post Configuration Tasks
There is some option configuration that may be required to optimize your lab environment. Please see some of the links below to help with some further post installation tasks.
You now, essentially, have a functional testing lab environment via Hyper-V in which you can experiment with the MCSA Server capabilities to the best of your abilities. The best, next step is to check event logs and make sure nothing is untoward, to do this, jump back into server manager and click ‘active directory domain services’, which will display a list of events and currently running systems (in relations to ADDS) or browse to Start, control panel, Administrative Tools and select Event viewer to see system wide events.
From here, make any corrections which might be outstanding, or hindering the ability of your lab. Otherwise, feel free to take full use of your new lab environment.