SQL Server Virtual Lab Section 2
F.Install Windows 2012 Core Base Image
1. Create a new VM as you have done in Step C and run the windows installation again but select Windows 2012 Core (no GUI) this time.
2. Once the installation is done, login with a new password you will create and then shut down the virtual machine.
3. We will use this installation as a Base for our Windows Server Core Installations just as we did in Part E.
4. In Hyper-V Manager right click on that new VM you just created and press Delete.
***We will be doing the exact same thing we did for Part E but with this new Windows Core VM that we just created***
5. OK remember where you stored the Virtual HD you created for the VM? Great… because it has not been deleted and we will use it to create our Windows Core installation.
G. Creating your first Windows 2012 Core machine using a Base Windows 2012 Core Installation
1. In Hyper-V Manager click ACTION > New > Hard Disk
2. Click Next on the First screen and keep the default (VHDX) and click next
3. Select Differencing Disk on the next screen
4. On the next screen name your drive and select the location.
5. On the next screen specify the parent… the Virtual Hard Drive we created fone Windows 2012 Core Installation in Part F.
6. Click Finish then ACTION > New > Virtual Machine
7. Name your VM and select the save location. I would use an easy name to idenify the type of server we are going to create using this particular VM.
Something like Win2012CoreAD (we are going to use this as our Domain Controller when installing Active Directory).
8. Select 512MB for Memory and select your Virtual Switch in the networking section as you did the when you created your first VM.
9. Now for your Hard Disk, select the Differencing Disk you just created. Click Next and Finish.
10. You can verify your hard disk configuration if you like as you did in Steps 10 and 11 of Part E.
11. You now have a Windows Core VM that runs off of a Base installation of Windows Core. You can create more Differencing disks and create more VMs off of that without having to reinstall Windows Core. This is exactly what we did for the Full Windows Installation.
***At this point you should have two functional VMs. One is based on a base installation for Windows 2012 Full and the other one is based on a base installation for Windows 2012 Core.***
H.Create your Active Directory Domain and Domain Controller using your new Windows Core VM Configuration
1. Start up your Windows Core AD server. After computer starts, enter your admin password, at command prompt type PowerShell and press enter.
2. Type sconfig and hit enter. Change computer name by pressing 2 on the menu. Restart once the name has changed. My personal preference is change the computer name to the VM name to keep it consistent.
1. After the computer restarts, make sure you are logged in and start PowerShell. Type sconfig and hit enter.
2. Pick option 8 for Networking and then select the network interface you want to configure. Description will be something like “Microsoft Hyper-V Network Adapter.”
3. Type 1 to Set Network Adapter Address and press enter.
Type S for static and hit enter. Change your IP address as desired (make a note of the address you pick). Hit enter and then for the next select (Subnet Mask) just hit enter to take the default and the same for Default Gateway.
4. Once the settings are saved, the new changes will be displayed. It make look a little confusing, so type 4 and hit enter to go to the main menu, then
type 8 and hit enter to go back to Network Settings. You will now see your new settings.
5. At the Network Adapter Settings screen, type 2 and hit enter to configure DNS Servers. Type 127.0.0.1 as the prefered DNS and hit enter. Hit enter for
Alternate DNS without typing anything. You should see the results of your change. Exit Sconfig by pressing 4 and hitting enter then pressing 15 and hitting enter.
6. Verify the setting from the PowerShell prompt by typing IPConfig /All and pressing enter or just use the PowerShell Command: Get-NetIPAddress.
Active Directory and DNS Install
1. Install Active Directory
PowerShell Command: Install-windowsfeature -name AD-Domain-Services
2. Create Your Domain
PowerShell Command: Install-ADDSForest –DomainName “SQLLAB.LOCAL” -DomainMode Win2012 -DomainNetbiosName “SQLLAB” -ForestMode Win2012
Replace “SQLLAB.LOCAL” with the domain name you want. I used SQLLAB.LOCAL as my domain (yep cheesy but easy).
Remember to select a complex password for the SafeModeAdministrationPassword or this portion will fail.
3. A prompt will ask you if you want the machine configured as a domain controller press Y and hit enter. After the installation, the computer should automatically restart but if it doesn’t go ahead and restart it using this simple PowerShell Command: restart-computer
4. You now have a new domain with a new domain controller running on Windows 2012 Core.
I. Adding your VM to the domain you created
***Make sure your Windows Core Domain server is running before you attempt this***
1. Start your VM that you installed the full version of Windows 2012 on (SQL2012NodeA in my case). The first thing that should come up when you start your VM is server manager. Minimize this and then go to the Start Menu (just move your mouse down to the lower left corner of the screen). Control Panel should be displayed, if not type out the words, click on the icon.
2. When the control panel comes up, on the right hand there is a drop down labeled “View By” click it and select Large Icons.
3. Click on Network and Sharing Center. On the left side click, Change Adapter Settings. Right click on your Ethernet Adapter and click Properties. On the pop-up click on Internet Protocol Version 4 (TCP/IPv4) and click Properties.
4. Setup Static IPs for your server and make sure you use the same subnet mask as your AD Server and use the AD Server’s IP Address as your Primary DNS. If you cannot remember the IP address or subnet mask, just go to your AD Server and type IPConfig in the command or PowerShell prompt and the information
should be displayed. The screen shot should help out. ***Make sure you use your settings not mine as they may be different***
5. Go back to the control panel and find System and open it. Click on Change Settings. On the Computer Name tab click on Change. Another pop should appear.
Change the name of your computer and then enter the domain. The screen shot should be a good guide for you **Notice I used my VM Name for my computer name, I just like to keep consistency it is in no way a best practice of any sort, or worst practice**
6. Click Ok and enter your Administrator as the user and Domain Admin Password (the one you made when you created your domain).
7. You should get a Welcome message and a request to restart. Restart and Log into the domain. This might not be obvious from the get go, but after pressing CRTL+ALT+Delete you need to click on the arrow pointing left next to the “picture” and select Other User. This screen shot should help you login properly.
J. Create a Windows Core VM for iSCSI
Why you ask? Because you need Shared Storage for your cluster.
1. Create a new VM and use the instructions from Part G so that you can use your Base install of Windows 2012 Core. Make sure you give this new VM a good identifying name like WinCoreiSCSI or something. This should allow you to start your new VM right away.
2. Once your new server loads login. You will need to create a new SID for it before you put it on the Domain. At the command prompt issue the following command to create a new SID for your VM.
Just leave the defaults on the pop-up and press OK. The computer should restart and ask you you enter a new password, you can use your old password if you like.The reason for this is because no two computers should have the same SID and since you used a base image for your install, you are technically using the same SID. It may take a while, but it saves you space (since you are using the same Hard drive for the Base install) and time (since you don’t have to go through another Windows Installation).
4. Once logged in start PowerShell and then run sconfig.
5. Type 2 and press enter to change the computer name. Give it an easy name to remember (whatever you named your VM should be fine). Allow the computer to restart after that.
6. Get back into sconfig and this time change the Domain. Add your server to the domain you created. To do this you need to first setup a Static IP. See Networking Setup in Part H ***Make sure you use the IP Address of the domain controller for your Primary DNS and not 127.0.0.1***
7. Once this is done, select option 1 in sconfig. Type D and hit enter at the prompt to join a domain.
8. You will be asked to specify the authorized domain\user (SQLLAB\Administrator for example). Type it in and hit enter. Another screen should popup asking for the password, enter it and hit enter. Take note that you cannot see anything being typed so make sure you enter it properly.
***At this point you should have the following***
1. VM Running Windows 2012 Core that is a Domain Controller
2. VM Running Windows 2012 Core that is a iSCSI server
3. VM Running Windows 2012 FULL that will have SQL Installed (our First Node for the Cluster)