Part 1 – Prepare Dual Boot Windows Server 2012 using Native Boot to VHDX

Part 2 – Install & Configure Hyper-V

Part 3 – Create the Active Directory Virtual Machine

Part 4 – Create the Storage and Cluster Virtual Machines

Part 5 – Checkpoints(No longer called snapshots!!!)

 

Objectives

In this series of exercises, you will explore the following:

•Install Hyper-V

•Modify Hyper-V Settings.

•Create Virtual Machines and Differencing Disks.

•Modify Settings for Virtual Machines.

•Create Domain

•Get connectivity working between guest machines

•Add computer to domain

 

Prerequisites

◦ Computer running Windows 7, 8, or Windows Server 2008 R2 or later

◦ At least 60 GB of free disk space (75 GB preferred)

◦ 4gb memory (8gb preferred)

◦ x64 compatible processor with hardware assisted virtualization (Intel VT or AMD-V technology)

◦ At least one disk without encryption technology (Bitlocker or 3rd party)

◦ Disk Drives Configure as Basic Disks (Not Dynamic) – SSD drive preferred for speed but not required

NOTE: Before beginning this lab, please confirm that your computer is configured with hardware virtualization technology and hardware memory protection BOTH ENABLED. To confirm these settings, you may need to shut down and reboot your computer into BIOS Setup.

 

Part 1 – Prepare the Windows Server 2012 Virtual Hard Disks,  Setting Up Native Boot to VHD, Establishing a Base Disk

 

1. Log on to your computer as an Administrator account.

2. Download the VHD version of Windows Server 2012 R2 .  Open "File/Windows Explorer" and find the downloaded file, make sure that “File Name Extensions” is enabled from View tab, now rename the file to Server2012R2EVAL.VHD

3. Create the following Directory Structure at the root of Drive C: or D: [use the one with the most space and the fastest disk]

<drive letter>:\Images

<drive letter>:\Images\Base

4. From the Start Screen type in PowerShell, right click  and select to Run as Administrator.  Issue the following commands:

convert-vhd –Path <drive>:\Images\Server2012R2EVAL.VHD  -DestinationPath  <drive>:\Images\Server2012R2EVAL.VHDX

Once the VHDX is complete, make a copy of the Server2012 VHDX file in the \Images\Base folder then make sure both are named Server2012R2EVAL.vhdx

5. The Images\Server2012R2EVAL.VHDX file will be used for the Boot2VHD, if a native installation of 2012 is taking place then this file can be removed. The file under the Base directory will be used later as a Parent disk for VMs. Either right click and mount the VHDX as a drive or go into Disk Management (in Computer Management) and attach only the <drive>:\Images\Server2012R2EVAL.VHDX, note the new drive letter that is provided. Do not confuse this step with the copy placed in the Images\Base folder, it will be used later.

6. Open elevated Command Prompt by going to the Start screen, type cmd, right-click cmd, select Run as Administrator

7. Now we will execute the command to automatically setup the dual boot configuration: Important! Before you commit, first make sure the copy of Server2012R2.VHDX resides in Images\Base {this will be used for VM guests later.}

8. Enter in the following command:

bcdboot <mounted drive letter>:\windows <enter>

9. If any errors exist, examine the path and drive letters provided for each step.

10. When finished, type msconfig <ENTER> - click Boot tab = to see the new boot option. Click your original operating system (eg: Windows 7 or 8) click Set As Default, Click OK, Click Restart. You will be presented with the choice to boot to Server 2012. (Note when you finish with the labs and no longer wish to continue, you can delete the VHD files and the entry in this Boot tab to clean up the laptop.)

Select the proper operational settings(keyboard, password, etc)

For the password I chose: p@ssw0rd

11. Type in the password {p@ssw0rd}. Server Manager should launch momentarily.

12. Click on Local Server. Click on the server name and select to change it. Name the server HYPERV01. Leave the workgroup name as is. Click OK to Reboot.

13. Login and click on Local Server again. If you are connected to an Ethernet network, change the IP address to 192.168.1.8 subnet mask 255.255.255.0, default gateway 192.168.1.1, and first DNS server to 192.168.1.10.  If you are using a different subnet and wish to have internet connectivity be sure to note your own IP addresses, the ones provided above are strictly for example purposes.

14.  If you are using a laptop this might be a good time to change the Power Management Profile to High Performance so as to keep the machine from going to sleep while building virtual machines and such.

 

Part 2 – Install & Configure Hyper-V

1. In Server Manager click “Add roles and features”

2. Before You Begin: Next

3. Installation Type: “Roll-based feature-based installation”; click Next

4. Server Selection: You should see HYPERV01 listed. Click Next

5. Server Roles: Look to see if the checkbox next to Hyper-V is selected, in the popup, click Add Features, click Next.

6. On the Features page if wanting to utilize a wireless card as well, enable Wireless LAN Service, click Next.

7. Click Next for the next 3 screens leaving the defaults set.

8. On the Confirmation screen, select “Restart the destination server automatically if required” and click Install.

9. After Reboots, Login to server {password = p@ssw0rd}

10. Click Close on Installation Progress Page (may take a min or two for the box to come up}

11. Open Hyper-V Manager. {Go to the Start screen, type in Hyper-V Manager, right click, Pin to Taskbar} Click on Hyper-V Manager.

12. Click on your server name in the left pane

13. In Actions Pane, click Hyper-V Settings.

14. In left Pane click Virtual Hard Disks enter <drive>:\images\Hyper-V [substitute your drive letter, this will not be the C drive!]

15. In left Pane click Virtual Machines enter <drive>:\images\Hyper-V and click OK [substitute your drive letter, this will not be the C drive!]. Click on OK.

16. In the Actions Pane, click Virtual Switch Manager.

17. In the Create virtual switch pane, click External and then click Create Virtual Switch.

18. Enter IT Camp Lab for the Name and click OK.

19. Create one more virtual switch with following information:

Type: Internal

Name: IT Camp Heartbeat {This switch will be used later for the Cluster lab}

 

Part 3 – Create the Active Directory Virtual Machine

1. If not already logged in, login to Server as Administrator account.

2. Open Hyper-V Manager. Click the Server Name in the left pane

3. In Actions Pane, Click New ->Virtual Machine

4. Before You Begin screen: Click Next

5. Provide the name: DC.  Check the option to store the virtual machine in a different location option, select <drive letter>:\Images\Hyper-V\DC and click Next.

6. Select Generation 1. Click Next.

7. Assign Memory, if your machine has more than 8GBs of RAM, bump up the RAM to 1024[Optional: Turn on checkbox Use Dynamic Memory for this virtual machine] Click Next

8. Configure Networking, Set Connection to IT Camp Lab click Next

9. For Connect Virtual Hard Disk setting, select Attach a virtual hard disk later and click Finish

10. In Actions Pane, click New -> Hard Disk

11. Before You Begin screen, click Next.

12. Choose Disk Format: VHDX

13. Choose Disk Type: Differencing

14. Specify Name and Location:

Name: DC.vhdx

Location: <drive>:\Images\Hyper-V\DC

Select the parent disk: <drive>:\Images\Base\Server2012R2EVAL.vhdx, click Finish.

15. Right Click DC and choose Settings.

16. Click SCSI Controller, Click Hard Drive,  and click Add.

17. Click Browse and navigate directory structure to <drive>:\Images\Hyper-V\DC\DC.vhdx and click Open, Click on click OK.

18. Start DC. {Right-Click DC – Select Start}

19. Right click the VM and select Open Console. Issue a CTRL+ALT+END.

20. When Server has finalized configuring devices, log in to the server {Password is still p@ssw0rd}

21. Go to the Start Screen – Type Network – Click Settings – Click Network and Sharing Center.

22. Click Change Adapter Settings (Left Pane)

23. Right Click Ethernet – Select Properties; Click TCP/IP v4 – Select properties; Use the following IP Address:

IP Address: 192.168.1.10

Subnet Mask: 255.255.255.0

Default Gateway: <Leave Blank>

Preferred DNS: 127.0.0.1

24. Click OK, click Close, then close Network Connections, close Network and Sharing Center.

25. Start Screen, Right-Click “This PC”, Select Properties, click Change Settings, click Change; type DC in the computer name field, click OK, click OK, click Close, click Restart Now.

26. Login to server (CTRL-ALT-End: p@ssw0rd)

27. Go to the Start Screen, type in Powershell. Right click and run Powershell as Administrator.

28. Enter in the following command:

Add-windowsfeature Ad-Domain-Services <Enter>

29. The next step is to create the forest and Promote to Domain Controller. At the PowerShell prompt enter the following commands:

Install-ADDSForest –domainname "corp.contoso.loc" <Enter>

Ok to use different domain name if you like

Enter password p@ssw0rd <Enter>

Re-enter password p@ssw0rd <Enter>

A <ENTER> (for – Yes To All)

Important! Once installation has begun minimize the DC console and begin building the Storage and Cluster Virtual Machines by following the next Part of the Lab guide, checking back on the AD machine from time to time to see if it is ready for the    next step of creating the domain.

If waiting for the command to finish, once rebooted, log back into server with the password – you are now logged into the domain!

 

Part 4 - Create the Storage and Cluster Virtual Machines

1. Log on to Server as Administrator account.

2. Open Hyper-V Manager. Click the Server Name in the left pane

3. In Actions Pane, Click New ->Virtual Machine

4. Before You Begin screen, click Next

5. Specify Name: Storage

6. Check the option to store the virtual machine in a different location option, select <drive letter>:\Images\Hyper-V\Storage and click Next. Select Generation 1. Click Next.

7. Assign Memory, again more memory the better but only when hardware allows [Optional: Turn on checkbox Use Dynamic Memory for this virtual machine] Click Next

8. Configure Networking, Set Connection to IT Camp Lab click Next

9. For Connect Virtual Hard Disk setting, select Attach a virtual hard disk later and click Finish

10. In Actions Pane, click New -> Hard Disk

11. Before You Begin screen, click Next.

12. Choose Disk Format: VHDX

13. Choose Disk Type: Differencing

14. Specify Name and Location:

Name: Storage.vhdx

Location: D:\Images\Hyper-V\Storage

Select the parent disk: <drive>:\Images\Base\Server2012R2EVAL.vhdx click Finish.

15. Right Click the Storage Virtual Machine and choose Settings.

16. Click IDE Controller 0 and click Add.

17. Click Browse and navigate directory structure to <drive>:\Images\Hyper-V\Storage\Storage.vhdx and click Open, click OK.

18. Start Storage. {Right-Click Storage – Select Start} Open the Console.

21. Use p@ssw0rd as the password – Click Finish

22. Configure IP with the following settings by going to the Start screen, type Network, click Settings, click Network and Sharing Center, click Change Adapter Settings (Left Pane)

23. Right Click Ethernet – Select Properties, click TCP/IP v4 – Select properties; Use the following:

IP Address: 192.168.1.11

Subnet Mask: 255.255.255.0

Default Gateway: <Leave Blank>

Preferred DNS = 192.168.1.10

Check to see that the Domain Controller is back online and ready, by logging into the console for DC with the corp\administrator account.

24. On the Storage console, change the Computer Name to Storage and join corp.contoso.loc domain by going to the Start screen, type in Computer, Right-Click Computer, select Properties; click Change settings, click change, type Storage under Computer Name, Select Member of Domain, type corp.contoso.loc under Domain, click OK. In the popup use Administrator and p@ssw0rd for the credentials, click OK on the welcome dialog; click OK on the Restart dialog, click close on system properties.

25. Click Restart Now.

26. Click the left arrow and select “Other User”; Type corp\administrator for username and p@ssw0rd for the password then press <Enter>

27. You are now logged into the domain on the Storage machine.  Minimize this console and continue building the cluster virtual machines. .

Important! Repeat the steps in this part of the lab to create Cluster1 and Cluster2 machines in the same manner:

Name and Disk: Cluster1.vhd Location: <drive>:\Images\Hyper-V\Cluster1   IP: 192.168.1.12

Name and Disk: Cluster2.vhd Location: <drive>:\Images\Hyper-V\Cluster2   IP: 192.168.1.13

 

Part 5 – Checkpoints

1) In Hyper-V Manager, highlight all VMs (DC, Storage, Cluster1, and Cluster2). (Note: You can select multiple VMs by holding down the CTRL key while selecting VMs.)

2) Right Click and select Checkpoint. Provide a proper name(example, corp-domain-complete) for this point in time, and then you are done!

End of Lab  Guide - Part 1

 

Lab Guide 2 – Windows 2012 R2 - Storage

 

Stay Tuned for the Follow-Up Guides soon!

Lab Guide 3 – Windows 2012 R2 - Continuously Available File Shares

Lab Guide 4 – Windows 2012 R2 - Hyper-V Over SMB

Lab Guide 5 - Windows 2012 R2 - Enabling Hyper-V Replica

Lab Guide 6 - Windows 2012 R2 - Shared Nothing Live Migration

 

More Information

Windows Server 2012 Product Download

http://aka.ms/ws2012r2tplg

Microsoft Virtual Academy

http://aka.ms/tpva

Windows Server 2012 Virtual Labs

http://technet.microsoft.com/en-us/windowsserver/hh968267.aspx

Windows Azure 30-Day Free Trial Page

http://aka.ms/mshosting