Introduction:
Training Kit (Exam 70-462): Administering Microsoft SQL Server 2012 Databases, states that 6 machines are needed in order to complete the lessons and exercises. Though I consider it an overkill for a database administration certification (especially when one only needs 3 machines to try out all or most of Oracle High availability features RAC /DATA GUARD), I decided to go with a “Hyper V” virtualized environment and please the Book’s authors :(.
For this purpose I always like to mix all the articles that gather the information I am looking for my task. In this particular case I have found one blog post explaining the Hyper V preparation and going further with the book’s setup instruction including the network and domain configuration using Vmware. You got it! Since I have windows 10 that already includes a native Hyper V
We can just take the cheapest path to get to the book’s content.
I will start with Bruce Hendry article then swith to Todd Kleinhans‘ document. I will sometime just insert the original content since the purpose here is to consolidate information as opposed to reinventing the wheel or ignore people’s credit.
- Lab environment requirement & overview
Host requirement:
a. Hardware:
- RAM : min 8 GB – actual 16 GB ( in case I am running all the machines plus any other memory consuming Application
- DISK: min 80 GB – actual 500 GB (you never know 😉 )
- Internet connection
- For a complete listing of the hardware requirements of the host machine, see page xviii in the training kit (but I wouldn’t bother).
b. Software:
- Host: OS – Windows 10 Other – Hyper V (builtin)
- Guests: OS – Windows server 2012 R2 iso Other- SQL server 2012 R2 iso, sysprep
The lab environment machines and purposes is described by the following table:
VMachine Name Purpose Domain OS IP address |
DC Domain controller CONTOSO.COM Windows Server 2012 R2 (Full Install) 10.10.10.10 |
SQL-A MSSQL Domain member CONTOSO.COM Windows Server 2012 R2 (Full Install) 10.10.10.20 |
SQL-B MSSQL Domain member CONTOSO.COM Windows Server 2012 R2 (Full Install) 10.10.10.30 |
SQL-C MSSQL Domain member CONTOSO.COM Windows Server 2012 R2 (Full Install) 10.10.10.40 |
SQL-D MSSQL Domain member CONTOSO.COM Windows Server 2012 R2 (Full Install) 10.10.10.50 |
SQL-CORE MSSQL Domain member CONTOSO.COM Windows Server 2012 R2 (Core Install) 10.10.10.60 |
|
1. Lab Topology c. Enable Hyper-V Feature For those who aren’t seeing Hyper V in the application list (unlikely on windows 10) .You can enable Hyper-V, by entering Programs and Features / Turn On Windows features and select the checkbox for Hyper-V.
Close the dialog with the OK button and allow Windows to enable the feature. It should not require a reboot |
Create Virtual Switch on Hyper V
Virtual switch is necessary for the lab environment to work. This will configure an Internal virtual switch. If you already have a virtual switch, or you are familiar with configuring virtual switches, you can skip this section.
1. Launch Hyper-V Manager.
2. From the Actions pane, left click on Virtual Switch Manager… (you can also click left on the host Icon and select new –virtual switch)
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. Use the name you want, just remember to use it for when creating the future Vms.
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 Instructions
We can now focus on the Virtual machines that will host the different SQL servers and the domain controller . We will be using differencing disks in Hyper-V which is the equivalent of snapshots for Vmware and Virtual box.
One single disk resulted from a Windows server 2012 full installation will be the template for all our VM’s except the SQL-CORE since its installation is minimalist.
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.
- Launch Hyper-V Manager.
- Right click your host computer name and choose New, Virtual Machine to bring up the New Virtual Machine Wizard.
- If Before You Begin displays, click through to the next step.
-
For Specify Name and Location, enter a name for your VM, e.g. 2012R2Parent. This VM will be discarded so the name does not matter .
-
Choose a different value for Location or leave it as default. To follow the examples in this post, create a custom location off the root of your preferred drive, e.g. D:Hyper-V.
- 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.
- For Configure Networking, choose the connection, Internal LAN. or any other name you have configured previously.
- For Connect Virtual Hard Disk, choose Create a virtual hard disk and enter 2012R2Parent.vhdx for the name. Then enter a location. In the example below, we are using D:Hyper-V2012R2ParentVirtual Hard Disks. Leave the size at its default of 127 GB or change it to 30G since the size is dynamically allocated according to the size of the VM (OS+ software binaries+ database data).
-
Choose Install an operating system from a boot CD/DVD-ROM for Installation Options. Enter the path to your Windows Server 2012 R2 Standard ISO file.
-
Clicking Next will display the Summary section where you can verify your choices. Then click Finish.
-
In Hyper-V Manager, right click on the VM you just created and choose Connect.
-
Then click the green button on the menu to start the VM.
-
Starting the Virtual Machine will launch Windows Server 2012 R2 setup. Follow the setup instructions until you come to the dialog that asks you to select the operating system.
-
Choose Windows Server 2012 R2 standard (Server with GUI).
-
After you have accepted the license terms and are prompted about the type of installation, choose Custom (advanced).
-
Then choose Disk 0 Unallocated Space for the installation location. This should be the default selection.
-
After you click Next the installation will begin. This can take some time.
-
Once installation completes, the virtual machine will restart and you will be prompted to update your Administrator password.
-
And then login. In the upper left of the VMware Workstation window, you will see three buttons- this will issue a Ctrl+Alt+Delete to the virtual machine- otherwise if you just tried to do it from your keyboard, you would actually issue that command to the host computer which is not what you want:
20- 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 the correct time zone.
- Enable Remote Desktop: I prefer logging into the virtual machines with Remote Desktop for a number or reasons.
- Enable the required Framwork 3.5 for SQL server 2015 installation though Frawork 4 is already present.
- Note : Activation is not needed for this Lab If your test environment duration is less than 120 days,
.NET Framework 3.5 Features installation
– You will need to install .NET Framework 3.5 as a requirement for SQL Server 2012. Although .NET 4.0 comes installed by default in Windows Server 2012, 3.5 does not.