Professional Documents
Culture Documents
Introduction
The Microsoft Press book, Exam 70-462: Administering Microsoft SQL Server 2012 Databases,
requires a substantial lab environment for the reader to follow along with the instructions in the kit. It
recommends utilizing Hyper-V to setup a Domain Controller (DC) and an additional five domain
members, all running Windows Server 2008 R2 Enterprise. While the book covers the hardware
requirements needed to support the virtual lab, it does not provide the instructions for creating it.
This article will provide step-by-step instructions for creating the Hyper-V lab environment described
in the 70-462 Training Kit. It assumes the reader has the necessary materials and software. Familiarity
with Windows Hyper-V is not required. The instructions provided were documented using Hyper-V
with Windows 8 Enterprise as the host machine and Windows Server 2008 R2 for the Hyper-V virtual
machines.
Following the steps outlined in this post should leave the reader with the lab environment necessary to
work through the entire 70-462 Training Kit book.
Close the dialog with the OK button and allow Windows to enable the feature. It should not require a
reboot. For detailed instructions about enabling Hyper-V, see the following post on How-To Geek:
http://www.howtogeek.com/76532/.
3. In the Virtual Switch Manager dialog, select New virtual network switch and Internal. Then
click Create Virtual Switch.
4. Enter Internal LAN for the name in Virtual Switch Properties. Feel free to use a custom name,
just remember to use it for subsequent steps.
5. Click OK. This will add the Internal LAN virtual switch. It will be available for use when we
are setting up the Virtual Machines in later steps.
Lab Environment Setup Steps
This section will take you through all the steps necessary to create the lab environment. We will be
leveraging differencing disks in Hyper-V. The instructions are contained below. For more detailed
information regarding this configuration, visit Hyper-V Virtual Machine (VM) Parent-Child
Configuration Using Differencing Disks.
Create the Parent Virtual Machine (VM) & Virtual Hard Disk
(VHD)
This will be the “template” that will be used to create your lab VM’s. Once we create it and get it
configured correctly, we will remove the VM and just keep the VHD. The VHD will serve as the parent
VHD for the subsequent children VHD’s.
1. Launch Hyper-V Manager.
2. Right click your host computer name and choose New, Virtual Machine to bring up the New
Virtual Machine Wizard.
6. Leave Assign Memory at the default value of 512. You can leave Use Dynamic Memory for
this virtual machine unchecked as we will be deleting this VM after setting up the VHD.
7. For Configure Networking, choose the connection, Internal LAN. Feel free to use your own if
you are already familiar with Hyper-V networking and you have a preferred configuration. For
more about virtual networking, see Microsoft’s Configuring Virtual Networks page at
http://technet.microsoft.com/en-us/library/cc816585.aspx.
8. For Connect Virtual Hard Disk, choose Create a virtual hard disk and enter
WSE2008R2Parent.vhdx for the name. Then enter a location. In the example below, we are
using D:\Hyper-V\WSE2008R2Parent\Virtual Hard Disks\. Leave the size at its default of 127
GB.
9. Choose Install an operating system from a boot CD/DVD-ROM for Installation Options.
Enter the path to your Windows Server 2008 R2 Enterprise ISO file.
10. Clicking Next will display the Summary section where you can verify your choices.
Then click Finish.
11. In Hyper-V Manager, right click on the VM you just created and choose Connect.
12. Then click the green button on the menu to start the VM.
13. Starting the Virtual Machine will launch Windows Server 2008 R2 setup. Follow the
setup instructions until you come to the dialog that asks you to select the operating system.
14. Choose Windows Server 2008 R2 Enterprise (Full Installation).
15. After you have accepted the license terms and are prompted about the type of
installation, choose Custom (advanced).
16. Then choose Disk 0 Unallocated Space for the installation location. This should be the
default selection.
17. After you click Next the installation will begin. This can take some time.
18. Once installation completes, the virtual machine will restart and you will be prompted to
update your Administrator password.
19. Enter a password of your choosing that you are sure to remember. You can skip creating
a password reset disk.
Once you have logged in, you will want to make any changes to the install that you want propagated to
all your child virtual machines; this will be your virtual hard drive template. A few suggestions I
incorporate into my environment before I start creating children from this parent Virtual Hard Drive:
Adjust date/time to use my time zone.
Enable Remote Desktop: I prefer logging into the virtual machines with Remote Desktop for a
number or reasons.
Remember that you are going to be using Microsoft’s System Preparation (Sysprep) tool to generalize
your VHD installations; profile specific updates will not be propagated, e.g. adding an item to the
taskbar. We will be using Sysprep a little later in this section. For more information on Sysprep see
http://technet.microsoft.com/en-us/library/hh824816.aspx.
Activation
Unless you have an explicit reason to do so, do not Activate Windows on your VM. If your test
environment duration is less than 120 days, Microsoft recommends not activating the software and
extending your activation grace period using the slmgr.vbs command-line interface. You can extend
your grace period to a total of 120 days using this rearm functionality. You can read more about that at
the following link: http://technet.microsoft.com/en-us/library/dd981009.aspx (see the section on this
page titled Leverage the Activation Grace Period.) The following Activation Flowchart is also found
there.
Activation Flowchart below from http://technet.microsoft.com/en-us/library/dd981009.aspx.
2. This will launch the System Preparation Tool dialog. Leave the System Cleanup Action
selection as Enter System Out-of-Box Experience (OOBE).
3. Select the Generalize checkbox and then Shutdown for Shutdown Options. The dialog should
appear as follows:
4. Choose OK.
5. Sysprep will run and then shut down the virtual machine.
2. When prompted, confirm that you want to delete the Virtual Machine.
3. Navigate to your virtual hard drive file and set it as read-only. This is going to be your template
(parent) Virtual Hard Drive file; it is important that it does not change. Setting the file to read-
only will help prevent unintended updates.
4. From the Hyper-V Manager interface, right click on your machine name and choose New, Hard
Disk… from the menu.
8. For Configure Disk, enter the path to the parent VHD file that we created in the previous steps.
9. Review the Summary for accuracy and click Finish if everything looks as expected.
10. Now repeat steps 3 through 9 to create the Virtual Hard Drives listed below. Set the
location for each VHD file as the same to follow the examples in this tutorial, e.g. D:\Hyper-
V\WSE2008R2Parent\Virtual Hard Disks\. These VHD names resemble the naming
conventions used in the training kit for the Virtual Hard Drives and naming them as shown will
make the exercises in the book easier to follow.
a.SQL-A.vhdx
b.SQL-B.vhdx
c.SQL-C.vhdx
d.SQL-D.vhdx
11. If you’ve followed the steps up to this point and saved all of your VHD files to the same
location, you should have a directory with six new VHD files:
2. For Specify Name and Location, use the name DC. To use a custom location, place a check in
the Store the virtual machine in a different location checkbox and enter the path in Location.
The example below uses the Virtual Machines directory alongside the directory for the Virtual
Hard Drive files, D:\Hyper-V\WSE2008R2Parent\Virtual Machines\.
3. Leave the default value of 512 MB for Assign Memory and place a check in the Use Dynamic
Memory for this virtual machine checkbox.
5. Select Use an existing virtual hard disk for Connect Virtual Hard Disk. Enter or browse to
the DC.vhdx Virtual Hard Drive file. In this example, the VHD file is located at D:\Hyper-
V\WSE2008R2Parent\Virtual Hard Disks\DC.vhdx.
6. Review the Summary page for accuracy and choose Finish if everything looks as expected.
7. Now repeat steps 1 through 6 to create the Virtual Machines listed below. The VM names
resemble the Virtual Machine naming conventions used in the book. The VM name should be
matched up with the similarly named VHD file, e.g. the VM named SQL-A should use the
VHD named SQL-A.vhdx. Pay close attention while repeating these steps. Mismatching VM’s
to VHD’s will likely cause confusion when working through the training kit.
a. SQL-A
b. SQL-B
c. SQL-C
d. SQL-D
8. If you’ve followed the steps up to this point and saved all of your VM files to the same location,
e.g. D:\Hyper-V\WSE2008R2Parent\Virtual Machines\, you should have a directory with five
new folders that contain your VM files:
Create SQL-CORE
The 70-462 Training Kit requires one more Virtual Machine for the lab environment. This VM will use
the Server Core Installation of Windows Server 2008 R2 Enterprise. As this is a unique installation,
there is no need to leverage our existing VHD parent. We will install this as a new Virtual Machine
with a new Virtual Hard Drive.
1. In Hyper-V Manager, right click your host computer name and choose New, Virtual Machine
to bring up the New Virtual Machine Wizard.
2. For Specify Name and Location, enter SQL-CORE as the name for your VM. To follow this
example, choose a custom Location and place the VM in the same directory as the other VM’s,
e.g. D:\Hyper-V\WSE2008R2Parent\Virtual Machines\.
3. Leave the default value of 512 MB for Assign Memory and place a check in the Use Dynamic
Memory for this virtual machine checkbox.
4. For Configure Networking, choose the built-in connection, Internal LAN. Feel free to use
your own if you are already familiar with Hyper-V networking and you have a preferred
configuration. For more about virtual networking, see Microsoft’s Configuring Virtual
Networks page at http://technet.microsoft.com/en-us/library/cc816585.aspx.
5. For Connect Virtual Hard Disk, choose Create a virtual hard disk and enter SQL-
CORE.vhdx for the name. Then enter a location. If you are following the example in this post,
use the same location as the other VHD files, e.g. D:\Hyper-V\WSE2008R2Parent\Virtual Hard
Disks\. Leave the size at its default of 127 GB.
6. Choose Install an operating system from a boot CD/DVD-ROM for Installation Options.
Enter the path to your Windows Server 2008 R2 Enterprise ISO file.
7. Clicking Next will display the Summary section where you can verify your choices. Then click
Finish.
8. In Hyper-V Manager, right click on the SQL-CORE VM you just created and choose Connect.
9. Then click the green button on the menu to start the VM.
10. Starting the Virtual Machine will launch Windows Server 2008 R2 setup. Choose
Windows Server 2008 R2 Enterprise (Server Core Installation).
11. After you have accepted the license terms and are prompted about the type of
installation, choose Custom (advanced).
12. Then choose Disk 0 Unallocated Space for the installation location. This should be the
default selection.
13. Click Next and installation will begin. This can take some time.
14. After installation completes, the virtual machine will restart and you will be prompted to
update your Administrator password.
Your directory structure for the Virtual Machines will look like this:
And your directory with the Virtual Hard Drive files will look like this:
The first time you start your new Virtual Machines it will launch the setup process. This is because the
Sysprep tool left them in a generic state. Each VM will need to collect information from you, e.g.
accept the license terms, set a password, etc. After setup starts services, installs devices and applies
system settings, it will restart your Virtual Machine.
The product key is not required as there is no need to activate Windows on the VM’s. Be sure to
uncheck Automatically activate Windows when I’m online, unless you explicitly want to activate for
some reason. As noted in earlier steps, Microsoft recommends against activation for lab environments
with a life expectancy of less than 120 days.
Accept the license terms and enter a password when prompted. The 70-462 Training Kit recommends a
particular password throughout the book. I recommend using your own if you have an old standby for
your personal lab environments.
After you have completed setup on each Virtual Machine, you are now ready to begin using your VM's
by following the Practice Setup Instructions from page xix in the Introduction section of the
Administering Microsoft SQL Server 2012 Databases book for Exam: 70-462. The book picks up
from this point, first walking you through the creation of your Domain Controller in the contoso.com
network.
Conclusion
This guide walked through the steps necessary to create a complete Hyper-V networked lab
environment with a Domain Controller and five domain member machines. Anyone wishing to work
through the Microsoft Press book, Exam 70-462: Administering Microsoft SQL Server 2012 Databases,
will find this helpful as this environment is necessary to perform the exercises in the book. The book
recommends utilizing Hyper-V but does not provide instructions for creating the environment; it
assumes the reader has done this. Completing the steps in this guide will leave the reader with the
Hyper-V lab environment prepared and ready to begin working through the 70-462 Training Kit. The
guide is also useful for anyone wishing to understand more about how to utilize Hyper-V, Hyper-V’s
Parent-Child Configuration Using Differencing Disks, or creating an environment for other purposes,
e.g. experimenting with AlwaysOn Availability Groups in SQL Server 2012, etc. Please let me know if
you find this information worthwhile, especially if you have any questions or input that will help
improve it.
References
The following links were either linked directly in this post or were used when researching information
to support it.
How to Install or Enable Hyper-V Virtualization in Windows 8
http://www.howtogeek.com/76532/
Configuring Virtual Networks
http://technet.microsoft.com/en-us/library/cc816585.aspx
How to extend the Windows Server 2008 evaluation period
http://support.microsoft.com/kb/948472
Hyper-V Virtual Machine (VM) Parent-Child Configuration Using Differencing Disks
http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-
child-configuration-using-differencing-disks.aspx
Sysprep Overview
http://technet.microsoft.com/en-us/library/hh824816.aspx
Windows Activation in Development and Test Environments
http://technet.microsoft.com/en-us/library/dd981009.aspx
Windows Server 2008 R2 Evaluation (180 days)
http://www.microsoft.com/en-us/download/details.aspx?id=11093
Windows Server 2008 System Requirements
http://technet.microsoft.com/en-us/windowsserver/bb414778
Rate
★★★★★★★★★★
4.87 (79)
Log in or register to rate
Share
Categories
70-462 Exam
Join the discussion and add your comment
Recent comments
Hi Bruce, like my friend here Koen, I am as well a BI groopy and as much as this topic intrigue,
...
amsalemronen
Hopefully someone can help me here. I'm running Windows 8.1 on my host machine. I went
through all...
smacq
Seem to be having a problem starting two of the VMs. I went through this document and
the instructi...