You are on page 1of 160

Virtualizing your Datacenter

with Windows Server 2012 R2 & System Center 2012 R2



Hands-On Lab | Step-by-Step Guide



For the VMs the following credentials:
Username: Contoso\Administrator
Password: Passw0rd!





Lab version: 2.0.1
Last updated: November 6, 2013

Important: these VMs were built using evaluation software. To ensure that the labs continue to
function after the evaluation period has expired, hosters will start the VMs from a saved state and so
the VMs will not resync their time unless they are rebooted. Avoid rebooting any VMs during this lab.

Please share any feedback with the IT Camps Planning Team: ITCampPlan@Microsoft.com
Copyright 2013 by Microsoft Corporation. All rights reserved.

2
CONTENTS
LAB TIMING ........................................................................................ 4
LAB 1: VIRTUAL MACHINE STORAGE ............................................ 5
EXERCISE 1.1: CONFIGURE A STORAGE POOL ............................ 5
EXERCISE 1.2: CONFIGURE A STORAGE SPACE .......................... 8
EXERCISE 1.3: MANAGE A FILE SERVER ..................................... 13
EXERCISE 1.4: MANAGE A STORAGE AREA NETWORK ............. 19
LAB 2: VIRTUAL MACHINE NETWORKING................................... 23
EXERCISE 2.1: CONFIGURE A HOST NIC TEAM .......................... 23
EXERCISE 2.2: MANAGE HYPER-V HOSTS .................................. 26
EXERCISE 2.3: CREATING A VIRTUAL SWITCH ........................... 30
LAB 3: ADVANCED VIRTUAL MACHINE NETWORKING ............. 33
EXERCISE 3.1: CREATE A LOGICAL NETWORK .......................... 33
EXERCISE 3.2: APPLY A LOGICAL NETWORKS ........................... 37
EXERCISE 3.3: CREATE A PORT PROFILE & CLASSIFICATION . 40
EXERCISE 3.4: CREATE & APPLY A LOGICAL SWITCH ............... 44
LAB 4: VIRTUAL MACHINE CLUSTERING & RESILIENCY .......... 49
EXERCISE 4.1: CREATE SHARED STORAGE OVER SMB ........... 49
EXERCISE 4.2: BUILD A HYPER-V CLUSTER................................ 51
EXERCISE 4.3: ASSIGN SHARED STORAGE USING ISCSI ......... 57
EXERCISE 4.4: OPTIMIZE A CLUSTER .......................................... 62
EXERCISE 4.5: CONFIGURE CLUSTER PATCHING ..................... 65
LAB 5: VIRTUAL MACHINE CONFIGURATION ............................. 71
EXERCISE 5.1: CREATE A GENERATION 1 VM ............................ 71
EXERCISE 5.2: CREATE A VM WITH POWERSHELL .................... 77
EXERCISE 5.3: CREATE A GENERATION 2 VM ............................ 81
LAB 6: VIRTUAL MACHINE MOBILITY .......................................... 86
EXERCISE 6.1: CONFIGURE HOSTS FOR MIGRATION ............... 86
EXERCISE 6.2: TEST A VM MIGRATION ........................................ 88
EXERCISE 6.3: TEST A STORAGE MIGRATION ............................ 90
EXERCISE 6.4: TEST A SHARED NOTHING LIVE MIGRATION .... 92

3
LAB 7: VIRTUAL MACHINE REPLICATION & PROTECTION ....... 99
EXERCISE 7.1: CONFIGURE A HYPER-V REPLICA ...................... 99
EXERCISE 7.2: CONFIGURE A HYPER-V REPLICA BROKER .... 101
EXERCISE 7.3: REPLICATE A VM ................................................ 104
LAB 8: NETWORK VIRTUALIZATION .......................................... 109
EXERCISE 8.1: CREATE A VM NETWORK .................................. 109
EXERCISE 8.2: ASSIGN A VM NETWORK ................................... 113
LAB 9: VIRTUAL MACHINE TEMPLATES .................................... 116
EXERCISE 9.1: CREATE A VM TEMPLATE .................................. 116
EXERCISE 9.2: REVIEW A SQL SERVER PROFILE .................... 124
EXERCISE 9.3: REVIEW A WEB APPLICATION PROFILE .......... 130
EXERCISE 9.4: CREATE A VM FROM A TEMPLATE ................... 134
LAB 10: SERVICE TEMPLATES ................................................... 137
EXERCISE 10.1: CREATE A SERVICE TEMPLATE ...................... 137
EXERCISE 10.2: DEPLOY A SERVICE TEMPLATE ...................... 144
LAB 11: PRIVATE CLOUDS & USER ROLES .............................. 146
EXERCISE 11.1: CREATE A USER ROLE .................................... 146
EXERCISE 11.2: CREATE A PRIVATE CLOUD ............................ 151
EXERCISE 11.3: DELEGATE ACCESS TO A CLOUD .................. 154



4
Lab Timing
The following table shows the estimated time to complete each lab and task.
Title Estimated Time (V 2.0)
Lab 1: Virtual Machine Storage
Exercise 1.1: Configure a Storage Pool 5
Exercise 1.2: Configure a Storage Space 5
Exercise 1.3: Manage a File Server 10
Exercise 1.4: Manage a Storage Area Network 5
Lab 2: Virtual Machine Networking
Exercise 2.1: Configure a Host NIC Team 5
Exercise 2.2: Manage Hyper-V Hosts 5
Exercise 2.3: Creating a Virtual Switch 5
Lab 3: Advanced Virtual Machine Networking
Exercise 3.1: Create a Logical Network 5
Exercise 3.2: Apply a Logical Networks 5
Exercise 3.3: Create a Port Profile & Classification 5
Exercise 3.4: Create & Apply a Logical Switch 10
Lab 4: Virtual Machine Clustering & Resiliency
Exercise 4.1: Create Shared Storage over SMB 5
Exercise 4.2: Build a Hyper-V Cluster 10
Exercise 4.3: Assign Shared Storage using iSCSI 10
Exercise 4.4: Optimize a Cluster 5
Exercise 4.5: Configure Cluster Patching 10
Lab 5: Virtual Machine Configuration
Exercise 5.1: Create a Generation 1 VM 5
Exercise 5.2: Create a VM with PowerShell 5
Exercise 5.3: Create a Generation 2 VM 5
Lab 6: Virtual Machine Mobility
Exercise 6.1: Configure Hosts for Migration 5
Exercise 6.2: Test a VM Migration 5
Exercise 6.3: Test a Storage Migration 5
Exercise 6.4: Test a Shared Nothing Live Migration 5
Lab 7: Virtual Machine Replication & Protection
Exercise 7.1: Configure a Hyper-V Replica 5
Exercise 7.2: Configure a Hyper-V Replica Broker 5
Exercise 7.3: Replicate a VM 5
Lab 8: Network Virtualization
Exercise 8.1: Create a VM Network 10
Exercise 8.2: Assign a VM Network 5
Lab 9: Virtual Machine Templates
Exercise 9.1: Create a VM Template 10
Exercise 9.2: Review a SQL Server Profile 5
Exercise 9.3: Review a Web Application Profile 5
Exercise 9.4: Create a VM from a Template 5
Lab 10: Service Templates
Exercise 10.1: Create a Service Template 10
Exercise 10.2: Deploy a Service Template 5
Lab 11: Private Clouds & User Roles
Exercise 11.1: Create a User Role 5
Exercise 11.2: Create a Private Cloud 5
Exercise 11.3: Delegate Access to a Cloud 5

Total 225 minutes (3:45 hours)

5
Lab 1: Virtual Machine Storage
Estimated time to complete Lab 1: 25 minutes
Exercise 1.1: Configure a Storage Pool
In this exercise Windows Server 2012 R2 Server Manager will be used to create a new Storage Pool. A Storage Pool
aggregates individual physical disks that have been presented to the operating system. This enables the creation of
Storage Spaces, which is done in the next exercise.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. On SCVMM01, open Server Manager.

2. Click All Servers.
3. Right click All Servers, and select Add Servers.






6
4. Click Find Now, select FS01, and click the add arrow, and then click OK.

5. When FS01 has been imported the IP addresses will be displayed, and under Manageability Online will be
listed.

6. Click File and Storage Services.
7. Ensure that FS01 is selected in main window, and then click Storage Pools.

8. Notice that there are 2 pools, Primordial and POOL1 (TIERED). POOL1 (TIERED) has been created in advance.
9. Click the Primordial pool, and look at the four 500GB disks that are available for use in the Physical Disks pane.
The primordial pool simply aggregates spare, unallocated physical disks.


7
10. Within the Storage Pools pane Primordial selected, click Tasks and then New Storage Pool.

11. In the New Storage Pool Wizard, then click Next.
12. In the Name field, type POOL2, and then click Next.

13. Select all 4 physical disks then mark the bottom disk as a hot spare by selecting Hot Spare in the Allocation
dropdown, and then click Next.

14. Click Create.
15. Leave the Create a virtual disk when this wizard closes checkbox unselected, and then click Close.

16. Click on POOL1 (TIERED), and scroll down the page to view the Physical Disks.
17. Scroll to the right in the Physical Disks pane, to view the Media Type. Notice that the pool consists of a mixture
of 126GB SSDs and 2TB HDDs.


8
Exercise 1.2: Configure a Storage Space
In this exercise a Tiered Storage Space will be created. A Tiered Storage Space will take advantage of a Storage Pool
that contains a mix of high-speed SSD and HDD physical disks. The wizard will provide guidance through the creation,
allocation of capacity, resiliency and more. After the Storage Spaces are configured they can be store data.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. On SCVMM01, Open Server Manager

2. In File and Storage Services | Volumes | Storage Pools, in the Virtual Disks pane, click Tasks and select New
Virtual Disk.

3. Click Next.
4. On the Select the storage pool page, select POOL1 (TIERED), and then click Next.
5. On the Specify the virtual disk name page, type Tiered Space 1 in the Name field. Check the Create storage
tiers on this virtual disk checkbox, and then click Next.

6. On the Select the storage layout page, select each of the layout choices to view the description, select Mirror,
and then click Next.


9
7. On the Configure the resiliency settings page, select Two-way mirror, and then click Next.

8. On the Specify the provisioning type page, select the default Fixed, then click Next.

9. On the Specify the size of the virtual disk page, select Maximum Size for the SSD Tier and the HDD Tier, and
then click Next.

10. On the Confirm selections page, ensure that the settings match those in the image below, and then click Create.


10
11. On the View results page, ensure that the Create a volume when this wizard closes checkbox is selected, and
then click Close. The New Volume Wizard starts automatically and this is expected.

12. On the Before you begin page, click Next.
13. On the Select server and disk page, ensure that FS01 is selected, and then click Next.

14. On the Specify the size of the volume page, review the volume size information. Change the Volume size
increment to GB and type 4344 in the Volume size field, and then click Next.

15. On the Assign to a drive letter or folder page, select V from the Drive letter dropdown, and then click Next.




11
16. On the Select file system settings page, type VMs in the Volume label field, and then click Next.

17. On the Confirm selections page, ensure that the settings match those in the image. Once confirmed, click
Create.

18. On the Completion page, click Close.

19. In Server Manager on the dashboard pane, select File and Storage Services | Volumes.
20. In the Volumes pane under FS01 (3), ensure that volume V: with the File System Label VMs is present.


12
21. In Server Manager on the dashboard pane, select File and Storage Services | Shares. Notice that FS01 is not
listed, because there are no shares associated with FS01 at this time.

22. Minimize Server Manager.



13
Exercise 1.3: Manage a File Server
In this exercise System Center 2012 R2 Virtual Machine Manager will be used to manage file servers and SMB shares
which can be used to store Hyper-V VMs. First the file server FS01 is added under management, then VMM can
provision new file-based storage from FS01. Additionally the View Script button will be used which shows the
underlying PowerShell script for a wizard or template. This makes it easier to learn PowerShell, and these scripts can
be saved and updated to enable automating repetitive tasks. Click on this button throughout different labs to see the
output from other wizards.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appears, ensure Use current
Microsoft Windows session identity is selected, and click Connect.

2. Select the Fabric workspace.

3. On the navigation pane, expand Storage and click File Servers.


14
4. On the ribbon, click Add Resources, and then click Storage Devices.

5. The Add Storage Devices Wizard will open.
6. On the Select Provider Type page, select Windows-based file server, and then click Next.

7. On the Specify Discovery Scope page, in the Provider IP address or FQDN field, type FS01.contoso.com, and
leave the This computer is in an untrusted Active Directory domain box unchecked.









15
8. For the Run As account, click Browse.

9. In the Select a Run As Account window, click Create Run As Account.
10. In the Create Run As Account window, ensure that Validate domain credentials is selected, type the following,
then click OK:
Name: Storage Admin
User Name: Contoso\Administrator
Password: Passw0rd!
Confirm password: Passw0rd!
11. On the Select a Run As Account window, select Storage Admin and click OK.


16
12. After returning to the Specify Discovery Scope page, click Next.

13. VMM will automatically scan FS01 and return the results below. On the Gather Information page, review the
results, and then click Next.

14. On the Select Storage Devices page, click Next.

15. On the Summary page, ensure the settings match the image below, and then click Finish.

16. The Jobs window will appear. Select Adds Storage Provider, review the results, and then close the Jobs screen.
There should be no File Shares listed.




17
17. On the Fabric navigation pane, select Providers.

18. Select FS01.contoso.com and, on the ribbon, click Create File Share.

19. In the Name field, type in VMShare1.

20. Next to the Classification dropdown, click New.
21. In the New Classification window, type Gold Tier in the Name field, and then click Add.


18
22. In the Local path field, type V:\Shares\VMShare1.

23. Click View Script at the bottom. Notepad will open displaying the PowerShell script that will be used to execute
these actions. This can be saved as a PowerShell script (.ps1) that can be edited and reused to help automate
repetitive tasks.

24. Click Create. If the jobs window does not appear, click the Jobs workspace and then click either Running or
History to see this new job which may already have finished. Observe the job through to completion.
25. Return to the Fabric workspace.
26. Repeat steps 17-24 with the following information:
Name: VMShare2
New Classification Name: Silver Tier
Local Path: V:\Shares\VMShare2
27. Minimize the Virtual Machine Manager Console, and maximize Server Manager.
28. VMShare1 and VMShare2 should now appear in the list of shares on FS01. The Shares pane may need to be
refreshed to see the newly created file shares. Minimize Server Manager.




19
Exercise 1.4: Manage a Storage Area Network
In this exercise VMMs storage management capabilities will be explored using an iSCSI SAN. First an iSCSI SAN will be
brought under VMMs management. Next VMM will apply a classification, then provision a new LUN from the iSCSI
SAN showing VMMs powerful storage integration capabilities for the virtualized infrastructure.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. From the Virtual Machine Manager Console, select the Fabric workspace.
2. On the navigation pane, expand Storage and click Arrays.

3. Right-click Arrays and select Add Storage Devices.

4. On the Select Provider Type page, select SAN and NAS devices discovered and managed by a SMI-S provider,
and click then Next.



20
5. On the Specify Discovery Scope page, in the Protocol dropdown select SMI-S WMI, and in the Provider IP
address or FQDN field, type DC01.contoso.com.

6. Next to the Run As Account field, click Browse.
7. Select Storage Admin, and then click OK.

8. After returning to the Specify Discovery Scope page, click Next.
9. Discovery against the target will now take place. On the Gather Information page, select DC01 when discovery
has completed, and then click Next.

10. On the Select Storage Devices page, click Create classification.
11. In the Name field, type Bronze Tier, and then click Add.


21
12. Back on the Select Storage Devices page, select the box next to iSCSITarget: DC01: C:, then select Bronze Tier
from the Classification dropdown, and then click Next.

13. On the Summary page, ensure the settings match those in the screenshot below, and then click Finish.

14. The Jobs window will open. Review the job, then close the Jobs window when it has finished.
15. On the navigation pane, under Storage, select Arrays.

16. In the detail pane, select DC01.


22
17. On the ribbon, click Create Logical Unit.

18. In the Create Logical Unit window, leave the default Storage Pool, in the Name field, type CSV01, leave the
default 1GB size, and then click OK.

19. On the navigation pane, under Storage, select Classifications and Pools.

20. In the detail pane, expand Bronze Tier| iSCSI Target: DC01: C:, and observe the newly created Storage LUN that
was created on the iSCSI SAN.

21. Minimize the Virtual Machine manager console.
------------------------------------------------------------END OF LAB 1------------------------------------------------------------

23
Lab 2: Virtual Machine Networking
Estimated time to complete Lab 2: 15 minutes
Exercise 2.1: Configure a Host NIC Team
In this exercise Windows Server 2012 R2 Server Manager will be used to create a new NIC Team on the two Hyper-V
hosts. This task will be executed remotely from SCVMM01, against both Hyper-V hosts on the network. VMM can
also be used to create NIC Teams on Hyper-V hosts, however due to limitations of this virtualized lab environment, it
is not possible to complete this task using VMM.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. From SCVMM01 open Server Manager.
2. From the navigation pane, select All Servers.
3. Right-click All Servers, and click Add Servers.
4. In the Add Servers window, click Find Now.
5. Select HYPER-V01 and HYPER-V02, click the right arrow, and then click OK. It will take a few moments to add
HYPER-V01 and HYPER-V02.


24
6. Once the list of IP addresses appears next to HYPER-V01 and HYPER-V02, navigate to Server Manager | All
Servers, right-click HYPER-V01 and click Configure NIC Teaming to start the NIC Teaming work pane.

7. In the Teams pane, select Tasks, then New Team.

8. In the NIC Teaming window, type VMTEAM1 in the Team name field.
9. In the Member adapters box, select VMNIC1 and VMNIC2 and click Additional properties to expand the
window.







25
10. Expand the Standby adapter dropdown to view the options but leave the selection at None (all adapters
active), and then click OK. Not all of the NIC teaming options are available because the Hyper-V Hosts are
themselves virtualized. The creation may take a few moments to complete, and there may be a warning notice
while the NIC team is created. Once the process is complete the NIC team will appear online and healthy.

11. In the Teams pane, select VMTEAM1.
12. In the Adapters and Interfaces pane, scroll down and view VMNIC1 and VMNIC2 as members of VMTEAM1 in
the Network Adapters tab.

13. Close the NIC Teaming window.
14. Repeat steps 6-13 for HYPER-V02. The creation may take a few moments to complete, and there may be a
warning notice while the NIC team is created. The next exercise can be started.
15. Minimize Server Manager.



26
Exercise 2.2: Manage Hyper-V Hosts
In this exercise the two Hyper-V hosts will be brought under the management of VMM through the deployment of an
agent.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.

2. Select the Fabric workspace.

3. Expand Servers, and click All Hosts.
4. On the ribbon, click Add Resources and select Hyper-V Hosts and Clusters.


27
5. In the Add Resource Wizard, on the Resource Location page, leave the default selection of Windows Server
computers in a trusted Active Directory domain, and then click Next.

6. On the Credentials page, ensure that Use an existing Run As account is selected, and then click Browse.

7. In the Select a Run As Account window, click Create Run As Account.
8. In the Create Run As Account window, ensure that Validate domain credentials is selected, type the following,
and then click OK:
Name: VMM Admin
User Name: contoso\vmmadmin
Password: Passw0rd!
Confirm password: Passw0rd!
9. In the Select a Run As Account window, select VMM Admin, and then click OK.




28
10. On the Credentials page, click Next.

11. On the Discovery Scope page, ensure that Specify Windows Server computers by names is selected, and type
HYPER-V01 and HYPER-V02 on separate lines, in the Computer names box. Ensure that the Skip AD verification
box is not selected, and then click Next.

12. The wizard will scan for HYPER-V01 and HYPER-V02. If an error pops up, click OK to ignore it, and then click
Refresh.
13. On the Target resources page, select HYPER-V01 and HYPER-V02, and then click Next.





29
14. On the Host Settings page, accept the defaults, and then click Next.

15. On the Summary page, ensure the settings match those of the screenshot below, and then click Finish.

16. The Jobs window will automatically open and the Add virtual machine host process will begin. This will take
several moments to complete. A warning will appear about a restart, but this can be safely ignored. Do not
restart the VMs. Close the Jobs window.



30
Exercise 2.3: Creating a Virtual Switch
In this exercise VMM will be used to create a Hyper-V Extensible vSwitch, and this virtual switch will be bound to the
NIC team that was created earlier. This will convert that NIC team into a vSwitch, which will later allow VMs to
communicate through the physical host to other networks.

Estimated time to complete: 5 minutes
Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. Expand Servers, and click All Hosts.
4. In the main detail pane, right-click HYPER-V01, and select Properties.

5. On the General tab, review the details about this Hyper-V host. Note that the Operating System is Microsoft
Hyper-V Server 2012 R2, a free SKU for Hyper-V hosts.

31
6. Click Hardware, and review the hardware on this particular Hyper-V host. Note that this host has a number of
network adapters.
7. Within the Hardware tab, scroll down to Advanced, and click BMC Settings. Review the BMC options available
for Out of band Management.

8. Click the Virtual Switches tab, click New Virtual Switch, and select New Standard Switch. Note the option to
select a regular Hyper-V vSwitch, or a VMM-specific Logical Switch. Logical Switches will be covered in later labs.

9. In the Name field, type vSwitch1.
Note: It is important to match the case for this vSwitch, so type the name exactly.
10. Select the External radio button, and, from the Network adapter dropdown, select VMTEAM1 Microsoft
Network Adapter Multiplexor Driver. This will bind the vSwitch to this physical adapter. Click OK.


32
11. In warning dialog, click OK to dismiss the warning.
12. Click the Jobs workspace, and observe the running Change properties of virtual machine host job and wait until
it to completion.
13. Return to the Fabric workspace.
14. Repeat steps 4 to 14 for Hyper-V02 with the same switch name (vSwitch1) and network adapter (VMTEAM1)

------------------------------------------------------------END OF LAB 2------------------------------------------------------------


33
Lab 3: Advanced Virtual Machine Networking
Estimated time to complete Lab 3: 25 minutes
Exercise 3.1: Create a Logical Network
In this exercise System Center 2012 R2 Virtual Machine Manager will create a Logical Network which represents a
specific network in this lab environment. A logical network, together with one or more associated network sites, is a
user-defined named grouping of IP subnets, VLANs, or IP subnet/VLAN pairs that are used to organize and simplify
network assignments. Some possible examples include BACKEND, FRONTEND, LAB, MANAGEMENT,
LIVEMIGRATION and BACKUP. Since logical networks represent an abstraction of the underlying physical network
infrastructure, they enable administrators to model the network based on business needs and connectivity
properties.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. On the navigation pane, expand Networking, and click Logical Networks.

4. In the upper left hand corner of the ribbon navigation, click Create | Create Logical Network.

5. In the Create Logical Network Wizard window, in the Name page, type Contoso LAN in the Name field.

34
6. Ensure that the One connected network radio button is selected, check the boxes for Allow new VM networks
created on this logical network to use network virtualization and Create a VM network with the same name to
allow virtual machines to access this logical network directly, and then click Next.

7. On the Network Site page, under Network sites click Add.
8. Contoso LAN_0 populates in the pane. Under Host groups that can use this network site select All Hosts.
9. Under Associated VLANs and IP subnets click Insert row, type the following settings, and then click Next:
VLAN: 0
IP subnet: 192.168.1.0/24

10. On the Summary page, review the settings, and then click Finish.

11. Review the completed jobs in the Jobs window, and then close the window.

35
12. In the Logical Networks and IP Pools pane, right-click Contoso LAN, and click Create IP Pool.

13. In the Create Static IP Address Pool Wizard, on the Name page, type Contoso LAN IP Pool in the Name field,
ensure that the Logical Network selected is Contoso LAN, and then click Next.

14. On the Network Site page, ensure that the Use an existing network site radio button is selected, and then click
Next.

15. On the IP address range page, change the Starting IP address to 192.168.1.10 and the Ending IP address to
192.168.1.100, and then click Next.

16. On the Gateway page, click Insert, enter 192.168.1.254, and then click Next.


36
17. On the DNS page, next to DNS server addresses in the order of use, click Insert, and type 192.168.1.1 as the
DNS Server address. Next to DNS search suffixes to append (in order), click Insert, and type contoso.com, and
then click Next.

18. On the WINS page, leave the entry blank, and click Next.

19. On the Summary page, ensure the settings match the screenshot below, and then click Finish.

20. Review the completed jobs on the Jobs screen, and then close the window.



37
Exercise 3.2: Apply a Logical Networks
In this exercise the Logical Network which was created earlier, along with other pre-created Logical Networks, will be
applied. VMM will not apply new IP addresses to the NICs that are being attached to the Logical Networks, but it will
help VMM to map the existing IP assignments to the Logical Networks. This prevents those IP addresses from being
deployed to other hosts in order to avoid network conflicts.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. Expand Servers, and click All Hosts.
4. In the main detail pane, right-click HYPER-V01, and select Properties.




38
5. Click the Hardware tab, scroll down to the NIC labeled VMTEAM1, and select Logical Network.

6. In the results pane, click the box for Contoso LAN.

7. Scroll to the NIC labeled Live Migration, select the Logical network connectivity tab, then select the box for Live
Migration.



39
8. Scroll to the NIC labeled Heartbeat, select the Logical network connectivity tab, then click the box for
Heartbeat.

9. Scroll to the NIC labeled Storage 1, select the Logical network connectivity tab, then click the box for Storage 1.

10. Scroll to the NIC labeled Storage 2, select the Logical network connectivity tab, then click the box for Storage 2.

11. Click OK in HYPER-V01 Properties.
12. Repeat steps 4 to 10 with Hyper-V02.




40
Exercise 3.3: Create a Port Profile & Classification
In this exercise Hyper-V Port Profiles and Port Classifications will be created. The first port profile will enable physical
network adaptor settings to be defined, and the second will enable specific types of virtual network adaptors to be
defined. These port profiles are similar to templates, and after they are configured and applied to a particular NIC,
they automatically configure that NIC with those port profile settings. A port classification provides a name and
abstraction for a particular type of network adaptor. This becomes more powerful when combined with a particular
port profile during a Logical Switch deployment, which is done in the next exercise.

Estimated time to complete: 5 minutes
Perform the following on SCVMM01
1. Open SCVMM01 then open the Virtual Machine Manager Console. If the Connect to Server window appear,
ensure Use current Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. On the navigation pane, expand Networking, and click Port Profiles.
4. Right-click Port Profiles, and select Create Hyper-V Port Profile.

5. In the Create Hyper-V Port Profile Wizard, on the General page, type Contoso-Uplink in the Name field.
6. Select the Uplink port profile radio button, select Address Hash from the Load balancing algorithm dropdown,
and then click Next.



41
7. On the Network configuration page, under Network sites, select Contoso LAN_0, click the box for Enable
Hyper-V Network Virtualization, and then click Next.

8. On the Summary page, ensure the settings match the screenshot below, and then click Finish.

9. Review the completed jobs on the Jobs screen, and then close the window.
10. On the navigation pane, right-click Port Profiles and select Create Hyper-V Port Profile.
11. On the General page, type Contoso-vNIC in the Name field, ensure that the Virtual network adapter port
profile radio button is selected, and then click Next.

12. On the Offload Settings page, review the choices that can be enabled for this particular vNIC port profile, but
leave them all unselected, and then click Next.


42
13. On the Security Settings page, select Enable DHCP guard, Allow router guard, and Allow guest specified IP
addresses, and then click Next.

14. On the Bandwidth Settings page, change the Maximum bandwidth (Mbps) to 100, and then click Next.

15. On the Summary page, ensure the settings match the screenshot below, and then click Finish.

16. Review the completed jobs on the Jobs screen, and then close the window.
17. Select the Fabric workspace.





43
18. On the navigation pane, expand Networking, right-click Port Classifications and select Create Port
Classification.

19. In the Create Port Classification Wizard, type Contoso Standard Port in the Name field, and then click OK.



44
Exercise 3.4: Create & Apply a Logical Switch
In this exercise the Logical Networks, Port Profiles, and Port Classifications will be used in order to provide a more
standardized, controlled, and granular vSwitch that can be deployed across multiple hosts, known as a Logical Switch.
The logical switch also has compliance capabilities, such as detecting unplanned switch configuration changes, and
offering remediation capabilities to return it to its desired configuration. First a logical switch is created, then it is
deployed on a spare network adaptor on each of the Hyper-V hosts. This will reconfigure that particular physical
adaptor into a vSwitch, using the settings defined by that Logical Switch. In this lab the logical switch is applied to a
single NIC, however VMM could also deploy it across multiple NICs on a host while automatically configuring teaming.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. On the navigation pane, expand Networking, right-click Logical Switches, and click Create Logical Switch.

4. On the Getting Started page, read the information, and then click Next.





45
5. On the General page, type Contoso-LS in the Name field, and then click Next.

6. On the Extensions page, review the currently installed Extensions, note that one of them is already enabled, and
then click Next.

7. On the Uplink page, ensure that in the Uplink mode dropdown No Uplink Team is selected, and click Add.
8. The Add Uplink Port Profile window opens. Ensure that the Contoso-Uplink is selected. This already has the
information about the Network sites it will support, and that Network virtualization support is enabled. Click
OK.
9. After returning to the Uplink page, review the selection, and then click Next.

10. On the Virtual Port page, it is possible to specify which vNIC configurations can be used with this particular
logical switch. Click Add.
11. The Add Virtual Port window will open. Next to Port Classification, click Browse.
12. On the Select a Port Profile Classification window, select Contoso Standard Port, and then click OK.



46
13. Back in the Add Virtual Port window, at the bottom, select the Include a virtual network adapter port profile in
this virtual port box, and select Contoso-vNIC from the drop-down list, and then click OK.

14. After returning to the Create Logical Switch Wizard page, select the Contoso Standard Port, click Set Default,
and then click Next.

15. Repeat steps 10 to 13 with the following information:
a. Classification: Bandwidth - Low | Include a virtual network adapter port profile: Bandwidth - Low
b. Classification: Bandwidth - Medium | Include a virtual network adapter port profile: Bandwidth -
Medium
c. Classification: Bandwidth - High | Include a virtual network adapter port profile: Bandwidth - High
16. Back on the Create Logical Switch Wizard page, ensure the settings match those below, and then click Next.


47
17. On the Summary screen, ensure the settings match the screenshot below, and click Finish.

18. Review the completed jobs on the Jobs screen, and then close the window.
19. Return to the Fabric workspace, expand Servers, and click All Hosts.
20. In the main detail pane, right-click HYPER-V01, and select Properties.
21. Click the Virtual Switches tab.
22. Click New Virtual Switch and select New Logical Switch. Note that the Contoso-LS is automatically selected as
the logical switch.

23. Under Physical Adapters, select VMNIC3. Note that the Contoso-Uplink is automatically selected as the Uplink
Port Profile.


48
24. Click OK.
25. At the prompt click OK.
26. Repeat steps 19 to 25 for HYPER-V02.

------------------------------------------------------------END OF LAB 3------------------------------------------------------------



49
Lab 4: Virtual Machine Clustering & Resiliency
Estimated time to complete Lab 4: 40 minutes
Exercise 4.1: Create Shared Storage over SMB
In this exercise System Center 2012 R2 Virtual Machine Manager will use the File Server storage to assign file shares
to Hyper-V hosts. The hosts can store the virtual machine on this shared storage using the SMB file sharing protocol.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Conect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. Expand Servers, and click All Hosts.
4. In the main detail pane, right-click HYPER-V01 and select Properties.
5. Click the Storage tab.
6. Click Add, and select Add File Share.

7. From the File share path dropdown, select \\FS01.contoso.com\VMShare1.
8. Click Add, and select Add File Share.
9. From the File share path dropdown, select \\FS01.contoso.com\VMShare2.

50

10. Click OK.
11. Repeat steps 4 to 10 for HYPER-V02.



51
Exercise 4.2: Build a Hyper-V Cluster
In this exercise VMM will create a Windows Server 2012 R2 Failover Cluster using the Hyper-V hosts. Any VMs that
are deployed on the cluster will be made highly available, so after a host failure the VMs would automatically restart
on another node in that cluster, providing resiliency to both planned and unplanned downtime.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. Select the Home tab above the ribbon.
4. Click Create, and select Hyper-V Cluster.

5. In the Create Cluster Wizard, on the General page, type CLUSTER1 in the Name field.


52

6. Next to Use an existing Run As account, click Browse, select VMM Admin, and then click OK. Click Next.

7. On the Nodes page, multi-select HYPER-V01 and HYPER-V02, click Add, and then click Next.

8. On the IP Address page, check the box next to 192.168.1.0/24, select Contoso LAN IP Pool from the Static IP
Pool dropdown. VMM will automatically allocate an IP address to the Cluster from that pool of IP Addresses.
Click Next.

9. On the Storage page, click Next. A SAN does not need to be selected as this cluster will use the storage on the
File Server.
10. On the Networks page, click Next. The Virtual Switches and Logical Switches for these hosts were already
created.





53
11. On the Summary page, ensure the settings match below, and then click Finish.

12. Observe the running job in the Jobs window. Maximize the Jobs window. In the results pane at the bottom,
select the Validate Cluster job, and click the Details tab. Observe the job through to completion.

13. This will take a few minutes to complete. Once complete, in the jobs window, click the Summary tab. Observe
there is a warning with the configuration. Close the jobs window.
14. In the Fabric workspace, expand All Hosts, right-click CLUSTER1, and select Properties.


54
15. On the General tab, type 0 in the Cluster reserve (nodes) field.

16. Click the Status tab and, in the detail pane, click the link for the cluster validation report.
17. The validation report opens in IE. Maximize the window.

18. Notice there is a warning for Network and Storage. A warning means that the cluster is supported and will
function correctly, however a best practice is not being followed.


55
19. Click Network, then click Validate IP Configuration.
20. Scroll down until the yellow warnings about the APIPA address are displayed and review the information.

21. Press the Back Arrow twice to return to the top of the report.
22. Click Storage.
23. Select Validate Disk Access Latency. Note that no disks were found. This warning occurs because there is no
SAN storage attached to the cluster. The cluster uses the SMB 3.0 File Shares created earlier for shared storage
because these provide shared access and are often cheaper and easier to configure.

24. Close Internet Explorer window.
25. From the CLUSTER1.contoso.com Properties click the File Share Storage tab.


56
26. In the detail pane, click Add. From the File share path dropdown, select \\FS01.contoso.com\VMShare1, and
then click OK.

27. In the detail pane, click Add. From the File share path dropdown, select \\FS01.contoso.com\VMShare2, and
then click OK.

28. Click the Virtual Switches tab. Note that the standard and logical switches that were created earlier are
attached to this node.

29. Click OK to close the CLUSTER1 Properties.



57
Exercise 4.3: Assign Shared Storage using iSCSI
In this exercise VMM assigns an iSCSI LUN that was created earlier to the cluster nodes to provide shared storage.
VMM manages the iSCSI connectivity between the hosts and the iSCSI SAN through multiple sessions, as well as
configuring the LUN correctly. The files of a clustered VM would be hosted on this SAN and accessible by both node.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. In the Storage node, select Classification and Pools.

4. From the central pane, expand Bronze Tier, then expand iSCSITarget: DC01: C:, then select CSV01.
5. On the upper ribbon, select Allocate Capacity.

6. In the Allocate Storage Capacity window, click Allocate Storage Pools.


58
7. In the Allocate Storage Pools window, under Available storage pools, select iSCSITarget: DC01: C:, click Add,
and then click OK.

8. In the Allocate Storage Capacity window, click Allocate Logical Units.

9. In the Allocate Logical Units window, under Available Logical units, select CSV01, then click Add, and then click
OK.


59
10. In Allocate Storage Capacity window, click Close.

11. In the Fabric workspace, expand Servers, and then click All Hosts.

12. Right-click HYPER-V01, and click Properties.
13. Click the Storage tab, click Add, and then select Add iSCSI Array.



60
14. In the Create New iSCSI Session window, select DC01 from the Array dropdown, and then click Create.
15. In the Hyper-V01 Properties window, click OK.

16. Repeat steps 12 to 15 for Hyper-V02.
17. Under All Hosts, right click CLUSTER1, and select Properties.

18. Click the Shared Volumes tab, and then click Add.


61
19. In the Add Cluster Shared Volume window, select CSV01. In the Volume Label field, type CSV01, click the boxes
for Quick Format and Force Format, and then click OK.

20. In the CLUSTER1.contoso.com Properties window, click OK. VMM will then assign the LUN to both nodes in the
cluster, format the volume, convert it to a Cluster Shared Volume, and make it available for placement of virtual
machines.





62
Exercise 4.4: Optimize a Cluster
In this exercise VMM will be used to make a number of configuration changes to the cluster. These include optimizing
the hosts for VM load balancing and power usage. This helps to ensure that the VMs will use the host resources
efficiently.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. Expand Servers, right-click All Hosts, and select Properties.

4. In the All Hosts Properties window, click the Host Reserves tab.


63
5. On the Host Reserves tab, ensure that the Use the host reserve settings from the parent host group box is
unchecked, and change the Memory settings for Unit to % and for Amount to 5. Since the Hyper-V hosts in this
lab environment only have 2GB RAM, the Memory setting needs to be set lower to ensure that a VM can be
deployed.

6. Click the Dynamic Optimization tab.

7. On the Dynamic Optimization tab, slide the Aggressiveness slider to High. Aggressiveness affects how evenly
distributed the VMs are across the different hosts. An aggressively balanced cluster will live migrate VMs more
frequently to ensure that a similar amount of host resources are used on each cluster node.
8. Select the box for Automatically migrate virtual machines to balance load at this frequency (minutes) and type
5 in the box.

9. Select the Enable power optimization box, and then click Settings.


64
10. Review the default threshold values. Under Schedule click one of the blue squares between 8am and 6pm and
Monday to Friday. The square will turn white when clicked, to indicate no power optimization will operate
during those times. By pressing the keyboard arrow keys and the space bar, the squares can be changed.
Change a few of these squares, and then click OK.

11. Back on the All Hosts Properties window, click OK to close the window.




65
Exercise 4.5: Configure Cluster Patching
In this exercise VMM will be used to review patching compliance for the cluster nodes. After VMM is integrated with
WSUS a baseline will be created which defines which patches are needed for the different hosts. Next the hosts will
be scanned and compliance will be reported. VMMs integrated patching can also be used to secure other types of
infrastructure servers that VMM can manage.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. In the navigation pane, expand Infrastructure, and select Update Server.

4. Right-click Update Server, and click Add Update Server.


66
5. In the Add Windows Server Update Services Server window, enter the following information:
Computer name: SCVMM01.contoso.com
TCP/IP Port: 8530

6. Next to Use an Existing Run As Account, click Browse.
7. In the Select a Run As Account window, click Create Run As Account.
8. In the Create Run As Account window, enter the following details, and then click OK:
Name: WSUS Admin
Username: contoso\administrator
Password: Passw0rd!

9. In the Select a Run As Account window, ensure that WSUS Admin is selected, and then click OK.
10. Ensure that the Use Secure Sockets Layer (SSL) to communicate with WSUS server and clients box is
unchecked, and then click Add.


67
11. The Jobs window will open. Review the details then move on to the next step. The job will take a few moments
because VMM will trigger a WSUS synchronization.
Note: The synchronization may fail and this is expected. This is because the WSUS server in this lab may
not have a connection to an upstream source, such as Windows Update.
12. Minimize the Jobs window.
13. Select the Library workspace.

14. Expand Update Catalog and Baselines, right-click Update Baselines, and then click Create Baseline.

15. In the Update Baseline Wizard, on the General page, type HYPER-V in the Name field, and then click Next.

16. On the Updates page, click Add.


68
17. Multi-select both updates beginning with Update for Windows Server 2012 R2, and then click Add.

18. On the Updates page, click Next.

19. On the Assignment Scope page, click the box next to CLUSTER1.contoso.com, and then click Next.

20. On the Summary page, ensure the settings match those in the image below, and then click Finish.

21. The Jobs window opens. Observe the completed job, and then close the Jobs window.
22. Select the Fabric workspace.
23. Under Servers | All Hosts, select CLUSTER1.
24. On the ribbon, click Compliance.




69
25. In the detail pane, expand CLUSTER1, then expand both HYPER-V01 and HYPER-V02, and then select
CLUSTER1.contoso.com.

26. On the ribbon, click Scan. This process scans the cluster nodes and compare them with the baseline that was
created earlier. This process will take a few moments.

When the scan completes, the report indicates that both Hyper-V hosts have the necessary updates to be in
compliance. If one of the cluster nodes was missing an update, VMM would have performed the following
steps.
A. Place a host into maintenance mode
B. Live migrate virtual machines off the host
C. Update the host
D. Restart the host (if necessary)
E. Check that the patch installed successfully and the node rejoined the cluster
F. Remove the host from maintenance mode
G. Live migrate the virtual machines back to the host (optional)
H. Repeat steps A - H on the other nodes in the cluster
27. Within the Hosts pane, right-click CLUSTER1.contoso.com, and select Compliance Properties.






70
28. The Compliance Properties tool allows exemptions to be made for select updates on specific Hyper-V host
computers. Under HYPER-V01.contoso.com, select the top-most update, and then click Create.

29. In the Create Exemption window, enter Not Applicable, and then click Create. In a production environment it is
important to always apply the latest updates.

30. The State of the update has been changed to Exempt. Click OK.


------------------------------------------------------------END OF LAB 4------------------------------------------------------------

71
Lab 5: Virtual Machine Configuration
Estimated time to complete Lab 5: 15 minutes
Exercise 5.1: Create a Generation 1 VM
In this exercise System Center 2012 R2 Virtual Machine Manager will be used to create and deploy a virtual machine.
During this process different hardware characteristics of the VMs will be reviewed, including Dynamic Memory,
network settings, and Availability Sets. Additionally VMM will be used to generate reusable PowerShell scripts which
can be used to accelerate future VM deployment.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.

3. On the ribbon, click Create Virtual Machine, and then select Create Virtual Machine.




72
4. On the Select Source page, select Create the new virtual machine with a blank virtual hard disk, and then click
Next.

5. On the Identity page, type VM01 in the Virtual machine name field, select Generation 1 from the Generation
dropdown, and then click Next.

6. On the Configure Hardware page, scroll down to review the configuration options, including Processor, SCSI
Adapter 0, CPU Priority, Virtual NUMA and Memory Weight.
7. Select Memory under General in the navigation tree, in the details pane, then in the select the Dynamic radio
button. Enter 128 in the Startup memory field, type 64 in the Minimum memory field, and type 192 in the
Maximum memory field.


73
8. On the Configure Hardware page, select VM01_disk_1 under Bus Configuration | IDE Devices in the navigation
tree. Change the Size (GB) value to 5 GB. Leave all other default settings.

9. On the Configure Hardware page, scroll down in the navigation pane and select Network Adapter 1 under
Network Adapters.
10. In the results pane, under Connectivity, select the Connect to a VM network radio button, and click Browse.

11. In the Select a VM Network window, select Contoso LAN, and then click OK.

12. In the Network Adapter 1 details pane, under Port Profile, select Contoso Standard Port from the Classification
dropdown.

13. On the Configure Hardware page, select Availability under Advanced in the navigation pane.

74
14. In the Availability detail pane, click the Make this virtual machine highly available check box.

15. In the Availability detail pane, click Manage availability sets. An Availability Set is a group of VMs that
distribute themselves across different hosts as evenly as possible. This type of anti-affinity can be used to keep
VMs with identical server roles (such as virtualized DCs or guest cluster nodes) on different hosts to avoid a
single point of failure.

16. In the Manage Availability Sets window, click Create.

17. In the Create Availability Set window, type Lab Availability Set in the Name field, and then click OK.


75
18. In the Manage Availability Sets window, click OK.

19. On the Configure Hardware page, click Next.
20. On the Select Destination page, ensure that the Destination is All Hosts, and then click Next.

21. VMM scans each host for its current resource usage across CPU, Memory, Disk and Network, and ranks each
host based on these factors and the expected needs of the VM, using a feature called Intelligent Placement. On
the Select Host page, select HYPER-V01, and then click Next.

22. On the Configure Settings page, accept the defaults, and then click Next.
23. On the Add Properties page, make the following changes using the drop down lists and entry boxes, then click
Next:
Select an action to perform automatically when the virtualization server starts: Turn on the virtual
machine if it was running when the physical server stopped
Delay start up (seconds): 10
Action to take when the virtualization server stops: Shut down guest OS
Specify the operating system you will install in the virtual machine: Windows Server 2012 R2 Datacenter


76
24. On the Summary page, review the settings. They should match those in the screenshot below.

25. Ensure that the Start the virtual machine after deploying it is not selected, then click View Script.
26. Click File and select Save As.
27. Change the file name to DeployVM.ps1, using the Save as type dropdown, select All Files.
28. Navigate so that location to save the file is E:\VMMLibrary, and then click Save.

29. Close Notepad and click Create.
30. In the Jobs window, select the running Create virtual machine job and review the job details at the bottom of
the page.
31. When the Job finishes running, close the Jobs window.


77
Exercise 5.2: Create a VM with PowerShell
In this exercise the PowerShell script that was created in the previous exercise will be modified, then executed to
quickly deploy a new VM. This shows how VMMs capabilities can be accelerated the use of PowerShell.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Right-click on the PowerShell icon on the taskbar, then select Run ISE as Administrator. PowerShell ISE
(Integrated Scripting Library) is a scripting center for writing, testing and debugging commands.

2. In the prompt, type Set-ExecutionPolicy Unrestricted -Force, then press Enter.
3. Select Open and navigate to E:\VMMLibrary and select DeployVM.ps1.


78
4. Select Edit | Replace in Script.

5. In the Find What field, type VM01, in the Replace with field, type VM02, and then click Replace All.

6. Save the file.
7. Click Run (green triangle) from the upper ribbon. The PowerShell script will run, but it may take a few moments
to start.

8. Once the script is complete a new PowerShell prompt will appear. Close PowerShell ISE.


79
9. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
10. Select the VMs and Services workspace, and then select CLUSTER1.

11. Note that VM02 is being created with an identical configuration as VM01. Since both VMs are in the same
availability set called Lab Availability Set they will be distributed across different hosts.

12. Select the Library workspace.
13. Expand Library Servers, and click on SCVMM01.contoso.com.

14. Right-click SCVMM01.contoso.com, and select Refresh. DeployVM.ps1 should appear in the Physical Library
Objects details pane.


80
15. Select DeployVM.ps1, on the ribbon, click View File. Notepad will open.

16. Close Notepad.



81
Exercise 5.3: Create a Generation 2 VM
In this exercise a new VM will be deployed as a Generation 2 Hyper-V virtual machine. The process is similar to
deploying a traditional VM, however there are differences which will be noted, specifically with the VM hardware.
Generation 2 VMs also have unique features such as supporting UEFI firmware and Secure Boot.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. On the ribbon, click Create Virtual Machine, and then select Create Virtual Machine.

4. On the Select Source page, click Create the new virtual machine with a blank virtual hard disk, and then click
Next.





82
5. On the Identity page, type VM03 in the Virtual machine name field, from the Generation dropdown select
Generation 2, and read the information at the bottom of the page. Click Next.

6. On the Configure Hardware page, scroll down to review the reduced number of configuration options available
with a Generation 2 Virtual Machine. This is because Generation 2 Virtual Machines have standardized the
virtualized hardware, removing such components as legacy NICs.
7. Select Memory under General in the navigation tree, in the details pane, select the Dynamic radio button, type
128 in the Startup memory field, type 64 in the Minimum memory field, and type 192 in the Maximum
memory field.

8. On the Configure Hardware page, select VM03_disk_1 under Bus Configuration | SCSI Adapter 0 in the
navigation tree. Change the Size (GB) value to 5 GB. Leave all other default settings.


83
9. On the Configure Hardware page, select Availability under Advanced in the navigation pane.
10. In the Availability detail pane, click the Make this virtual machine highly available check box.

11. In the Availability detail pane, click Manage availability sets.
12. In the Manage availability sets window, under Available Properties, select Lab Availability Set, click Add, and
then click OK.







84
13. In the Availability detail pane, change the Virtual machine priority to High.

14. On the Configure Hardware page, under Advanced in the navigation pane, select Firmware. Note that
Generation 2 virtual machines boot from UEFI firmware, which supports Secure Boot. Secure Boot helps to
protect against the booting of unauthorized or compromised operating systems. Click Next.

15. On the Select Destination page, ensure that the Destination is All Hosts, and click Next.






85
16. On the Select Host page, notice there is a warning next to the hosts. Select HYPER-V01, and click the Rating
Explanation tab. This recommends that the VM is not placed on HYPER-V01 because another VM that it is part
of the Lab Availability Set is already on that same host. VMM will actively move running virtual machines to
different hosts to maintain availability sets.

17. Select HYPER-V02, and click Next.
18. On the Configure Settings page, accept the defaults, and click Next.
19. On the Select Networks page, accept the defaults, and click Next.
20. On the Add Properties page, click Next.
21. On the Summary page, review the settings. They should match those in the screenshot below.

22. Ensure that Start the virtual machine after deploying it is not selected, and click Create.
23. In the Jobs window, select the running Create virtual machine job and review the job details at the bottom of
the page.
24. When the Job finishes running, close the Jobs window.

------------------------------------------------------------END OF LAB 5------------------------------------------------------------

86
Lab 6: Virtual Machine Mobility
Estimated time to complete Lab 6: 20 minutes
Exercise 6.1: Configure Hosts for Migration
Estimated time to complete: 5 minutes
In this exercise System Center 2012 R2 Virtual Machine Manager will prepare the Hyper-V hosts to support virtual
machine live migration, which moves running VMs between hosts with no downtime. This includes enabling the
hosts for migrations, setting authentication protocols, and configuring the maximum numbers of migrations.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. Expand All Hosts | CLUSTER1, and select HYPER-V01.

4. Right-click HYPER-V01, and select Properties.
5. In the HYPER-V01.contoso.com Properties window, click the Migration Settings tab.
6. Under Live storage migration, change the Maximum numbers of simultaneous live storage migrations to 4.

87
7. Under Live migration settings, ensure that Turn on incoming and outgoing live migrations is enabled, and
change the Maximum numbers of simultaneous live migrations value to 10.
8. Under Performance option, review the options, and ensure that Use compression is selected.
9. Under Authentication protocol, select Use Kerberos.
10. Under Incoming live migration settings, ensure the Use the following IP subnets is selected. In the list of IP
subnets, select 15.15.15.4/32, and click Move up until this IP subnet is at the top of the list. This ensures this
network is prioritized for Live Migration. Click OK.

11. Repeat steps 4 to 10 with HYPER-V02.



88
Exercise 6.2: Test a VM Migration
In this exercise VMM will perform a migration. Since the Hyper-V hosts are already virtualized, it is not possible to
start the VMs so they are not actually running live, however the steps that would be performed are identical. This
lab migrates the memory of the VM from one host to another host.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. Expand All Hosts | CLUSTER1, and select HYPER-V01.
4. In the detail pane, right-click any of the VMs on that host and select Migrate Virtual Machine.

5. The Migrate VM Wizard opens and automatically assess the target hosts available for migration.



89
6. Since the VM is currently on HYPER-V01, select HYPER-V02 from the list of hosts. Notice the warning about the
Lab Availability Set, as VM03 resides on HYPER-V02 already. Click Next.

7. On the Summary page, ensure the settings match those in the image below, and then click Move.

8. The Jobs window opens. Observe the migration of the virtual machine from HYPER-V01 to HYPER-V02. Close
the Jobs window.
9. Return to the VMs and Services workspace and select HYPER-V02. Note that the VM which was migrated is
now on this host.



90
Exercise 6.3: Test a Storage Migration
In this exercise the VM will remain on the same host, but VMM will move the VMs storage components (virtual disk,
configuration files, etc.) from one location to another. Storage Migration helps with SAN management and
maintenance.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. Expand All Hosts, and select CLUSTER1.

4. Right-click VM01, and select Migrate Storage. The Migrate Storage wizard will open.


91
5. On the Select Path page, under Storage location for VM configuration, click Browse.
6. The VM and associated disks currently resides on VMShare1. In the Select Destination Folder window, expand
Cluster Shared Volumes, select [Cluster Disk 1] CSV01, and click OK. This will move the VMs files from SMB 3.0
based storage to iSCSI SAN storage.

7. On the Select Path page, ensure that Automatically Place all VHDs with the configuration is selected, and then
click Next.

8. On the Summary page, ensure the settings match those in the image below, and click Move.

9. The Jobs window opens. Observe the migration of the virtual machine storage. This process will complete
relatively quickly because the size of the virtual disk is small. Close the Jobs window.



92
Exercise 6.4: Test a Shared Nothing Live Migration
In this exercise a VM that running on a cluster will be live migrated to a standalone, including moving its related disks
and files on an iSCSI SAN to the hosts locally attached storage. This is known as a Shared Nothing Live Migration, and
enables IT admins to have complete flexibility for moving VMs around from location to location. The VMs memory
state and storage are both moved with no interruption to the running virtual machine.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Fabric workspace.
3. Right-click All Hosts and select Add Hyper-V Hosts and Clusters.

4. In the Add Resource Wizard, on the Resource Location page, leave the default selection of Windows Server
computers in a trusted Active Directory domain, and then click Next.

5. On the Credentials page, ensure that Use an existing Run As account is selected, and then click Browse.



93
6. In the Select a Run As Account window, select VMM Admin, and then click OK.

7. On the Credentials page, click Next.
8. On the Discovery Scope page, ensure that Specify Windows Server computers by names is selected, and type
SCVMM01 in the Computer names box. Ensure that Skip AD verification box is not selected, and then click
Next.

9. The wizard will scan for SCVMM01. If the computer is not discovered, click OK, then click Refresh.
10. On the Target resources page, select SCVMM01, and then click Next.


94
11. If a warning appears, click OK, this is safe to ignore.
12. On the Host Settings page, accept the defaults, and then click Next.
13. On the Summary page, ensure the settings match those of the screenshot below, and then click Finish.

14. The Jobs window opens and the Add virtual machine host job begins. This will take several moments to
complete. The job will complete with a warning. This is expected. When the job completes, close the Jobs
window.
15. Close the Virtual Machine Manager Console, then open the Virtual Machine Manager Console. If the Connect
to Server window appear, ensure Use current Microsoft Windows session identity is selected, and click
Connect. Since VMM is add itself under management, the management server needs to be refreshed.
16. Select the Fabric workspace.
17. Expand Servers and click on All Hosts.
18. Right-click SCVMM01 and select Properties.


95
19. In the SCVMM01.contoso.com Properties window, click the Storage tab.

20. Under Disk, select PHYSICALDRIVE1, which should be 40 GB.
21. Under Logical unit, for Classification, select Gold Tier from the dropdown.

22. Select the Migration Settings tab.

23. Check the box for Turn on incoming and outgoing live migrations.
24. Under Authentication protocol, select Use Kerberos, and then click OK.


96
25. Select the VMs and Services workspace.
26. In the navigation pane, under All Hosts, select CLUSTER1.

27. Right-click VM03 and select Migrate Virtual Machine. The Migrate VM Wizard will appear.





97
28. Notice that of the 3 available hosts, only 2 have star ratings. Click SCVMM01 and click the Rating Explanation
tab to read why this host is not recommended for placement.

29. Click to clear the Make this VM highly available box at the top of the wizard. The ratings are recalculated.
Review the Ratings Explanation once again.
30. SCVMM01 is now at the top of the list. Select SCVMM01, and then click Next.

31. On the Select Path page, ensure that E:\ is listed as the Storage location for VM configuration, and that
Automatically place all VHDs with the configuration is selected, and then click Next.

98
32. On the Select Networks page, accept the defaults, and then click Next. SCVMM01 has no networks set up at
this time.
33. On the Summary page, check that the settings match those of the screenshot below.

34. Ensure that Start the virtual machine after deploying it is not selected, and click Move.
35. In the Jobs window, observe the job that is running and review the job details at the bottom of the page.
36. When the job finishes, close the Jobs window.
37. Minimize the Virtual Machine Manager console.

------------------------------------------------------------END OF LAB 6------------------------------------------------------------



99
Lab 7: Virtual Machine Replication & Protection
Estimated time to complete Lab 7: 15 minutes
Exercise 7.1: Configure a Hyper-V Replica
In this exercise the Windows Server 2012 R2 Hyper-V Replica feature will be configured. Hyper-V Replica provides in-
box asynchronous replication of the VMs VHD file between different locations, providing a disaster recovery solution.
Replication can occur every 30 seconds, 5 minutes, or 15 minutes. After an incident the VMs can quickly be restarted
in the secondary location.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Start Hyper-V Manager.

2. In the navigation pane, select SCVMM01, and in the Actions pane click Hyper-V Settings.





100
3. Under the Server settings, select Replication Configuration.

4. Click Enable this computer as a Replica server and select Use Kerberos (HTTP).

5. Under Authorization and Storage click Allow replication from any authenticated server and change the default
storage location to E:\.
6. Click Apply.
7. On the Settings notification, click OK. This firewall port has already been enabled for this lab.

8. Click OK. Close Hyper-V Manager.

101
Exercise 7.2: Configure a Hyper-V Replica Broker
In this exercise the Hyper-V Replica Broker will be configured. The Hyper-V Replica Broker is a clustered role that
makes the Hyper-V Replica replication process highly-available, so that replication will always happen as long as the
cluster is online. Replication can happen between clusters, between standalone hosts or between a cluster and a
standalone host, however it cannot take place between nodes within a single cluster.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Start Failover Cluster Manager. If CLUSTER1.contoso.com does not appear, then right-click on the Failover
Cluster Manager node and click on Connect to Cluster. Type CLUSTER1.contoso.com in the Cluster name: box
and then click on OK.

2. In the navigation pane, expand CLUSTER1.contoso.com, right-click Roles and click Configure Role.

3. On the Before You Begin page, click Next.
4. On the Select Role page, select Hyper-V Replica Broker, and then click Next.

5. On the Client Access Point page, in the Name field, type HVRB.

102

6. In the Address column, select the Click here to type an address field and complete the IP address as follows
192.168.1.101, and then click Next.

7. On the Confirmation page, check that the configuration matches the screenshot below, and then click Next.

8. After the wizard completes successfully, click Finish.
9. After a few seconds, the status of the Hyper-V Replica Broker Role will change from Pending to Running.

10. Right-click HVRB and select Replication Settings.

103

11. In the Hyper-V Replica Broker Configuration window, click Enable this cluster as a Replica server, click Use
Kerberos (HTTP).
12. Under Authorization and storage, click Allow replication from any authenticated server and type
\\FS01.contoso.com\VMShare2 in the Specify the default location to store Replica files field.

13. Click OK, and on the firewall warning, click OK. This firewall port has already been enabled for this lab.



104
Exercise 7.3: Replicate a VM
In this exercise replication for a virtual machine will be enabled, then other replication settings will be configured.
After the initial replication has happened, if there is a disaster then this VM can be recovered at the secondary
location.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open Failover Cluster Manager.
2. Expand CLUSTER1.contoso.com and click Roles.
3. Right-click SCVMM VM01 Resources, point to Replication, and select Enable Replication.

4. On the Before You Begin page, click Next.
5. On the Specify Replica Server page, type SCVMM01 in the Replica server field, and then click Next.



105
6. On the Specify Connection Parameters page, accept the defaults, and then click Next.

7. On the Choose Replication VHDs page, ensure the VHDX file is selected, and then click Next.

8. On the Configure Replication Frequency page, expand the dropdown to review the options, select 5 minutes,
and then click Next.

9. On the Configure Additional Recovery Points page, ensure that Maintain only the latest recovery point is
selected, and then click Next.








106
10. On the Choose Initial Replication Method page, ensure that Send Initial Copy Over the Network and Start
replication immediately are selected, and then click Next.

11. On the Summary page, ensure the settings are the same as the screenshot below, and click Finish.

12. On the Replication enabled notification, click Close.
13. From Failover Cluster Manager, right-click SCVMM VM01 Resources, point to Replication, and review the
options that are available, such as a Planned Failover. This can be used if the VMs need to be moved to the
alternative location for maintenance or in preparation of a disaster. Do not select any items from this menu.

14. Minimize Failover Cluster Manager and start Hyper-V Manager.
15. Select SCVMM01 from the navigation pane.
16. Click VM01, and at the bottom of Hyper-V Manager, click the Replication tab. Observe some of the
information, such as the primary and destination servers and the last time synchronization.


107
17. Right-click VM01, point to Replication, and review the options that are available. Notice the option to Failover
the VM (if the primary site was unavailable), or even Test Failover, in order to prepare and test for a potential
disaster on the primary site. There is also an option to Extend Replication, which extend the replication of this
Replica to a third site.

18. From the Replication menu, select View Replication Health.
19. Review this information, then click Close.

20. Right-click VM01 and click Settings.



108
21. In the navigation pane, expand the VM01 network adapter, and select Failover TCP/IP.

22. Under IPv4 TCP/IP settings, select the Use the following IPv4 address scheme for the virtual machine, and
configure the following settings to be injected into the VM upon failover to the second site:
IPv4 Address: 100.100.100.100
Subnet mask: 255.255.255.0

23. Click OK to close the VM01 settings.
24. Close Hyper-V Manager and Failover Cluster Manager.

------------------------------------------------------------END OF LAB 7------------------------------------------------------------




109
Lab 8: Network Virtualization
Estimated time to complete Lab 8: 15 minutes
Exercise 8.1: Create a VM Network
In this exercise System Center 2012 R2 Virtual Machine Manager will create a Virtual Network, or VM Network. This
will use Hyper-V Network Virtualization to provide isolation between VMs by leveraging the Logical Switch and Logical
Networks that were previously created.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. On the navigation pane, right-click VM Networks and select Create VM Network.

4. In the Create VM Network Wizard, on the Name page, type Development VMs in the Name field, and ensure
that the Logical network selected is Contoso LAN, and then click Next.




110
5. On the Isolation page, select Isolate using Hyper-V network virtualization, and then click Next.

6. On the VM Subnets page, click Add.
7. Under VM subnet, type Development LAN in the Name field, type 192.168.6.0/24 in the Subnet field, and then
click Next.

8. On the Connectivity page, read the connectivity message, and then click Next.

9. On the Summary page, ensure the details match the screenshot below, and then click Finish.





111
10. The Jobs window opens. Observe the completed jobs, and then close the Jobs window.
11. Repeat Steps 3 through 9 with the following details:
Name: Test VMs
Logical Network: Contoso LAN
Isolation: Isolate using Hyper-V network virtualization
VM Subnets:
o Name: Test LAN
o Subnet: 192.168.6.0/24
Gateway: No connectivity
12. Under the VM Networks and IP Pools, right-click Development VMs VM Network and select Create IP Pool.

13. In the Create Static IP Pool Wizard, on the Name page, type Development IP Pool in the Name field. Ensure the
VM Network is Development VMs and the VM Subnet is Development LAN (192.168.6.0/24), and then click
Next.

14. On the IP address range page, change the Ending IP address: to 192.168.6.50, and then click Next.

15. On the Gateway page, leave the entry blank and click Next.
16. On the DNS page, leave the entry blank and click Next.
17. On the WINS page, leave the entry blank and click Next.

112
18. On the Summary screen, ensure the settings match the screenshot below, and then click Finish.

19. The Jobs window opens. Observe the completed job, and then close the Jobs window.
20. Repeat steps 11 to 18 for the Test VMs VM Network, with the following settings:
Name: Test IP Pool
VM Network: Test VMs
VM Subnet: Test LAN (192.168.6.0/24)
IP Address Range: Ending IP Address: 192.168.6.50
Gateway, DNS, WINS: Leave Default





113
Exercise 8.2: Assign a VM Network
In this exercise VMM will assign the newly created VM Networks to the existing virtual machines. If the VMs were
running then VMM would automatically assign an appropriate IP address to the VMs vNIC from its IP Pool. Since the
VMs are inside VM Networks they are isolated from one another.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. In the navigation pane, select All Hosts.
4. From the ribbon navigation, click Home and then click VMs.

5. Right-click on VM01 and select Properties.


114
6. In the VM01 Properties window, click the Hardware Configuration tab.
7. Select Network Adapter 1.

8. Under Connectivity, next to Connected to a VM network click Browse.
9. In the Select a VM Network window, select Development VMs, and click OK. The VM subnet will automatically
be changed because there is only a single VM Subnet as part of that VM Network.


115
10. In the VM01 Properties window, click OK.
11. Repeat Steps 5 to 10 for VM02, with the following information, and then click OK.
Connected to VM Network: Test VMs
VM Subnet: Test LAN

12. Right-click on VM01 and choose Properties.
13. In the VM01 Properties window, select the Hardware Configuration tab.
14. Select Network Adapter 1.
15. At the bottom of the details pane, click Connection Details.

16. In the Connection Details window, notice that VMM has automatically allocated an IP address from the
Development IP Pool, within the Development VMs VM Network. Click OK to close the window.

17. Click OK to close VM01 Properties.
------------------------------------------------------------END OF LAB 8------------------------------------------------------------

116
Lab 9: Virtual Machine Templates
Estimated time to complete Lab 9: 25 minutes
Exercise 9.1: Create a VM Template
In this exercise System Center 2012 R2 will create a template that can be used to standardize and accelerate the
deployment of VMs into the environment. Templates combine a number of different building blocks, including a
hardware configuration, guest OS configuration, application level configuration and additional settings. Templates
can be created from nothing, or from existing VMs, virtual disks, or other templates.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Library workspace.
3. In the navigation pane, select Templates.

4. Click Create VM Template on the ribbon.

5. On the Select a Source page, ensure that Use an existing VM template or a virtual hard disk stored in the
library is selected, and then click Browse.





117
6. In the Select VM Template Source window, select WS2012R2, and then click OK. Do not select any of the other
VHDX files.

7. On the Select Source page, click Next.

8. On the Identity page, type VM Template in the VM Template name field, select Generation 1 from the
dropdown, and then click Next.

9. On the Configure Hardware page, in the Compatibility detail pane, select Hyper-V.

10. On the Configure Hardware page, under the General workspace, click Memory.



118
11. In the Memory detail pane, click Dynamic, type 128 in the Startup memory field, type 64 in the Minimum
memory field, and type 192 in the Maximum memory field.

12. On the Configure Hardware page, scroll down to the Bus Configuration workspace, and select WS2012R2.
13. In the WS2012R2 details pane, select Silver Tier from the Classification dropdown.

14. On the Configure Hardware page, scroll down to the Network Adapters workspace, and select Network
Adapter 1.


119
15. In the Network Adapter 1 details pane, under Connectivity, click Connect to a VM network, and click Browse.
16. In the Select a VM Network window, select Development VMs, and then click OK.
17. Under Connectivity, select Development LAN from the VM subnet dropdown.
18. Under IP Address, select Static IP (from a static IP Pool), and ensure IPv4 only is selected for the IP protocol
version.
19. Under Port Profile, select Bandwidth - Low from the Classification dropdown.

20. On the Configure Hardware page, select Availability under Advanced in the navigation pane.
21. In the Availability detail pane, select the Make this virtual machine highly available check box.

22. On the Configure Hardware page, click Save as.
23. In the New Hardware Profile window, type Lab Hardware Profile in the Name field.

24. Click the Hardware Profile tab. Review the settings, and then click OK.
25. On the Configure Hardware page, click Next.

120
26. On the Configure Operating System page, select the Identity Information workspace under General Settings,
type DevVM## in the Computer name field. This will increment the number in the name of the VM, such as
DevVM01, DevVM02, etc.

27. Select the Admin Password workspace, click Select a Run As account for the local administrator account and
click Browse.
28. In the Select a Run As account window, select VMM Admin and then click OK.

29. Select the Roles workspace under Roles and Features.





121
30. In the details pane, scroll down to Web Server (IIS) and select the following:

31. In the detail pane, scroll down to Web Server and select the following:

32. Select the Features workspace under Roles and Features. In the Feature details pane, select the following:

33. Select the Domain / Workgroup workspace under Networking, click Domain and type contoso.com in the
Domain field.
34. Select the Run As account to use for joining the domain, and then click Browse.










122
35. In the Select a Run As account dialog, select Domain Join and click OK.

36. Select the Answer File workspace under Scripts, review the options in the details pane, and then click Next.

37. On the Application Configuration page, leave the default settings, and then click Next.




123
38. On the SQL Server Configuration page, leave the default settings, and then click Next.

39. On the Summary page, review the settings and click Create.
40. The Jobs window opens. Observe the completed jobs, and then close the Jobs window.




124
Exercise 9.2: Review a SQL Server Profile
In this exercise a pre-created SQL Server Profile will be reviewed. SQL Server profiles provide instructions for
customizing an instance of SQL Server for a SQL Server Data Application Tier (DAC) when deploying a virtual machine
as part of a service. A service is a collection of virtual machines that may represent a multi-tiered enterprise
application.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Library workspace.
3. In the navigation pane, select Templates.

4. In the details pane, right-click on PetShop Data Tier, and click Properties.

5. On the PetShop Data Tier Properties page, click the Hardware Configuration tab.

125
6. Under Bus Configuration | IDE Devices, select the SQL Server VM Template VHDX, and select Silver Tier from
the Classification dropdown.

7. Under Network Adapters, select Network Adapter 1.
8. In the Network Adapter 1 details pane, under Connectivity, select Connect to a VM network, and then click
Browse.

9. In the Select a VM Network window, select Development VMs, and then click OK.




126
10. Select Development LAN from the VM subnet dropdown.

11. Under IP Address, ensure that Static IP (from a static IP Pool) and IPv4 only are selected.

12. Under Port Profile, select the Bandwidth - High from the Classification dropdown.

13. Select the SQL Server Configuration workspace.

14. On the SQL Server configuration page, from the SQL Server profile dropdown, select SQL Server Profile.

15. On the SQL Server configuration page, select SQL Server Deployment, and review the settings in the details
pane.


127
16. On the SQL Server configuration page, select the Configuration workspace, and review the settings in the
details pane. Note: The Media Source is a path within the VHD(X) file attached to this template, where the SQL
media files are stored. The accounts will be created as SQL Server administrators.

17. On the SQL Server configuration page, select the Service Accounts workspace, and review the settings in the
details pane.

18. In the PetShop Data Tier Properties window, select Application Configuration.

19. From the Application profile dropdown, select SQL DAC Application Profile.

20. Select the first SQL Server Data workspace, and review the settings in the details pane. Note that these settings
include DAC packages containing the database schema and some server-level objects required in order to
support the database, like logins. The DAC does not include the data inside a database. This Application
Configuration is pointing at a number of DACs residing in the VMMs library.

128
21. Compare the Application Configuration data to the screenshot below. If there is an inconsistency click OK to
close the PetShop Data Tier Properties window, and reopen it to refresh the view.

22. Directly below SQL Server Data, select SQL Server Scripts. VMM will automate these two scripts that will run
along with this DAC, in their deployment order.

23. In the SQL Server Scripts details pane, select CreateDBLogin, and then click Edit.

24. In the SQL Server Scripts Properties window, review the settings, then click OK.


129
25. Directly below SQL Server Scripts, select Pre-install 1, and review the settings in the details pane. In this case, a
pre-installation action runs which launches cmd.exe, passes parameters to it, and then calls another script file.

26. In the PetShop Data Tier Properties window, click OK.


130
Exercise 9.3: Review a Web Application Profile
In this exercise an Application Profile for a web server will be reviewed. This enables IT admins and developers to
rapidly deploy standardized web servers and pre-defined web sites.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Library workspace.
3. From the navigation pane, select Templates.

4. Click PetShop Web Tier in the details pane, and then click Properties from the ribbon.

5. In the PetShop Web Tier Properties window, select Hardware Configuration.


131
6. Under Bus Configuration | IDE Devices, select the PetShop Web Tier, and select Silver Tier from the
Classification dropdown.

7. Under Network Adapters, select Network Adapter 1.
8. In the Network Adapter 1 details pane, under Connectivity, select Connect to a VM network, and then click
Browse.
9. In the Select a VM Network window, select Development VMs, and then click OK.

10. Select Development LAN from the VM subnet dropdown.


132
11. Under IP Address, ensure that Static IP (from a static IP Pool) and IPv4 only are selected.

12. Under Port Profile, select the Bandwidth - Medium from the Classification dropdown.

13. Select the Application Configuration workspace.

14. From the Application profile dropdown, select PetShop Web Application Profile.

15. Select Web Application.









133
16. Review the details pane. The Web Application is contained within a Web Deploy package. Web Deploy
(msdeploy) simplifies the deployment of Web applications and Web sites to IIS servers. Administrators can use
Web Deploy to synchronize IIS servers or to migrate to newer versions of IIS. Web Deploy Tool also enables
administrators and delegated users to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.
If the Application Configuration is not identical to the screenshot below, close, then reopen the PetShop Web
Tier Properties window to refresh the view.

17. Under Scripts, click Pre-install 1.

18. Review the details. Part of the pre-install process VMM is going to run cmd.exe and deploy the Web Deploy
capability inside the Guest OS, before applying the specific Web Deploy files and settings to transform this
Windows Server into a fully functional IIS Server with pre-configured web site(s).

19. In the PetShop Web Tier Properties window, click OK.

134
Exercise 9.4: Create a VM from a Template
In this exercise a VM will be deployed from the newly created template. This process enables the standardized and
accelerated deployment of VMs from a known configuration source and speeds up the deployment process, as
compared to specifying each configuration item individually.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Library workspace.
3. In the navigation pane, select Templates.

4. In the details pane, right-click VM Template and click Create Virtual Machine.

5. Click OK to dismiss the warning.


135
6. On the Identity page, type VM04 in the Virtual machine name field, and then click Next.

7. On the Configure Hardware page, review the settings, and then click Next.
8. On the Configure Operating System page, review the settings, and then click Next.
9. On the Select Destination page, review the settings, and then click Next.
10. On the Select Host page, select HYPER-V02, and then click Next.

11. On the Configure Settings page, click Virtual Machine Location, and next to the Virtual machine path field, click
Browse.

12. In the Select a Destination Folder window, expand File Shares, select \\FS01.contoso.com\VMShare1, and then
click OK.






136
13. On the Configure Settings page, select Network Adapter 0 under Networking, and review the settings.

14. On the Configure Settings page, select Virtual Hard Disk under Machine Resources, and next to Destination
Path click Browse.

15. In the Select a Destination Folder window, expand File Shares, select \\FS01.contoso.com\VMShare1, and then
click OK.

16. On the Configure Settings page, click Next.
17. On the Add Properties page, accept the default settings, and then click Next.
18. On the Summary page, review the settings, and then click Create.
Note: The deployment will fail, and this is expected in this virtualized lab environment. This lab is built
using virtual machines. It is not possible to run VMs within Hyper-V VMs (nested virtualization). A user can
create and configure VMs, but cannot start the VM.
19. Close the Jobs window.

------------------------------------------------------------END OF LAB 9------------------------------------------------------------


137
Lab 10: Service Templates
Estimated time to complete Lab 10: 15 minutes
Exercise 10.1: Create a Service Template
In this exercise System Center 2012 R2 will create a Service Template. In VMM a service is a collection of virtual
machines that may represent a multi-tiered enterprise application. These virtual machines are configured and
deployed together, and then they are managed as a single entity. For example, a multi-tier line-of-business
application could consist of a database backend, an application tier, and a web frontend. Each of these tiers can also
be scaled to meet increasing or decreasing demand.

Estimated time to complete: 10 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Library workspace.
3. Expand Library Servers, right-click SCVMM01.contoso.com, and then click Properties.



138
4. In the SCVMM01.contoso.com Properties window, select All Hosts from the Host Group dropdown.

5. Select all of the VM networks, ensure that Allow unencrypted BITS transfers is selected, and then click Browse.

6. In the Select a Run As Account window, click Create Run As Account.
7. In the Create Run As Account window, ensure that Validate domain credentials is selected, type the following,
and then click OK:
Name: Library Admin
User Name: contoso\administrator
Password: Passw0rd!
Confirm password: Passw0rd!


139
8. In the Select a Run As Account window, ensure that Library Admin is selected, then click OK.

9. In the SCVMM01.contoso.com Properties window, click OK.

10. In the Library workspace, select Service Templates and click Create Service Template on the ribbon menu.


140
11. In the New Service Template window, type PetShop in the Name field, and type 1.0 in the Release field. Select
Two Tier Application (v1.0), and then click OK.

12. Maximize the Service Template Designer.
13. From the VM Templates pane on the navigation pane, drag Pet Shop Web Tier to the First Tier box.







141
14. From the VM Templates pane, drag PetShop Data Tier to the Second Tier box.

15. In the top left of the ribbon, click Save and Validate.

16. Double-click PetShop Web Tier Machine Tier 1 to open the Properties.

17. Review the information on the General page. Notice that this tier can be scaled out, and currently has a default
instance (number of VMs) count of 1, and a maximum of 5 VMs that this tier can scale to. The administrator can
define the deployment order of this tier, in relation to other tiers, and in which order the tiers are serviced.






142
18. Change the Preferred deployment order to 2 and the Preferred servicing order to 2, and then click OK to close
the Properties window.

19. In the top left of the ribbon, click Save and Validate.
20. Click on PetShop Data Tier Machine Tier 1 in the main Service Template Designer, and review the alert details
at the bottom of the window.
21. Double-click PetShop Data Tier Machine Tier 1 Properties page, uncheck This machine tier can be scaled out,
then click OK.

22. In the top left of the ribbon, click Save and Validate, and then close the Service Template Designer.





143
23. In the Templates detail pane, select PetShop, and, on the ribbon, click Publish.




144
Exercise 10.2: Deploy a Service Template
In this exercise a service will be deployed from a Service Template. Note that the deployment will fail, and this is
expected in this virtualized lab environment. This lab is built using virtual machines and it is not possible to run VMs
within Hyper-V VMs (nested virtualization). A user can create and configure VMs, but they cannot start them.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Library workspace.
3. In the Library workspace, select Templates.
4. From the Templates details pane, right-click on PetShop and then click Configure Deployment.

5. Type PetShop 1.0 in the Name field, ensure that All Hosts is selected from the Destination dropdown, and then
click OK.


145
6. The Deploy Service PetShop 1.0 window opens.
7. Maximize the window, and then click Refresh Preview from the top left of the ribbon.
8. The Placing Service dialog box appears temporarily while the preview is refreshed. Once complete, the service
should have suitable host(s) defined. If any warnings remain, click the Refresh Preview button on the ribbon.

9. Click Deploy Service on the ribbon.

10. In the Deploy service window, click Deploy.
Note: The deployment will fail, and this is expected in this virtualized lab environment. This lab is built
using virtual machines. It is not possible to run VMs within Hyper-V VMs (nested virtualization). A user can
create and configure VMs, but cannot start the VM.

11. The Jobs window opens. Review the executing job then close the Jobs window.
12. Select the VMs and Services workspace.
13. Select All Hosts from the navigation pane, and ensure that Virtual Machine tab above the ribbon is selected.
There will be a list of newly created VM with a Status of Creation Failed. This failure is expected due to
limitations of the virtualized lab environment.

------------------------------------------------------------END OF LAB 10------------------------------------------------------------

146
Lab 11: Private Clouds & User Roles
Estimated time to complete Lab 11: 15 minutes
Exercise 11.1: Create a User Role
In this exercise System Center 2012 R2 Virtual Machine Manager will create a Self-Service User Role for a member of
the Development team. This account will have certain permissions and restrictions assigned to it.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the Settings workspace.

3. Expand Security | User Roles and, on the ribbon, click Create User Role.

4. On the Name and description page, type Development User in the Name field, and then click Next.


147
5. On the Profile page, select Application Administrator (Self-Service User), and then click Next.

6. On the Members page, click Add
7. Type in devuser in the Enter the object names to select box, click Check Names, and then click OK. This should
resolve to CONTOSO\devuser.

8. On the Members page, ensure that CONTOSO\devuser is listed, and then click Next.

9. On the Scope page, note that there are currently no clouds, and then click Next.

10. On the Networking page, click Add.






148
11. Select Development VMs, and click OK.

12. On the Networking page, ensure that Development VMs is listed, and then click Next.

13. On the Resources page, click Add.
14. Select PetShop from the Type: Service Template node, then click OK.


149
15. Back on the Resources page, ensure that PetShop is listed, and then click Next.

16. On the Permissions page, select Deploy (From template only), Local Administrator, Pause and resume, Remote
connection, Shut down, Start and Stop, then click Next.

17. On the Run As accounts page, click Add.
18. In the Select a Run As account window, select VMM Admin, and then click OK.


150
19. On the Run As accounts page, confirm VMM Admin is listed, and then click Next.

20. On the Summary screen, ensure the settings match those in the screenshot below, and then click Finish.

21. The Jobs window opens. Observe the completed job, and then close the Jobs window.



151
Exercise 11.2: Create a Private Cloud
In this exercise a Cloud will be created. In VMM the private cloud is deployed to pool an organizations own hardware
to leverage the advantages of the private cloud computing model. Through VMM, an organization can manage the
private cloud definition, control access to the private cloud and its underlying physical resources.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. On the ribbon, click Create Cloud.

4. On the General page, type Development Cloud in the Name field, and then click Next.

5. On the Resources page, select All Hosts, and then click Next.

6. On the Logical Networks page, click Contoso LAN, and then click Next.


152
7. On the Load Balancers page, accept the default, and then click Next.

8. On the VIP Templates page, click Next.
9. On the Port Classifications page, select Bandwidth Low and Contoso Standard Port, and then click Next.

10. On the Storage page, select Gold Tier and Silver Tier, and then click Next.

11. On the Library page, accept the default, and then click Next.
12. On the Capacity page, uncheck all the Use Maximum checkboxes, enter the following values, and then click
Next.
Change the Assigned Capacity for Virtual CPUs to 4
Change the Assigned Capacity for Memory to 1
Change the Assigned Capacity for Storage to 200
Change the Assigned Capacity for Custom quota to 10
Change the Assigned Capacity for Virtual machines to 4


153
13. On the Capability Profiles page, select Hyper-V, and then click Next.

14. On the Summary page, ensure the settings match those in the screenshot below, and then click Finish.

15. The Jobs window opens. Observe the completed jobs, and then close the Jobs window.




154
Exercise 11.3: Delegate Access to a Cloud
In this exercise access privileges will be assigned to the newly created cloud for the Development User role. The
Development User will then log into VMM and observe the limited management scope that this user role has.

Estimated time to complete: 5 minutes

Perform the following on SCVMM01
1. Open the Virtual Machine Manager Console. If the Connect to Server window appear, ensure Use current
Microsoft Windows session identity is selected, and click Connect.
2. Select the VMs and Services workspace.
3. Expand Clouds, right-click Development Cloud, and then click Assign Cloud.

4. In the Use an existing user role dropdown, select Development Users Self-Service user, and then click OK.






155
5. In the Development User Properties window, click the Quotas for the Dev Cloud tab.

6. In the Role level quotas section, deselect all of the Use Maximum check boxes.

7. In the Member level quotas section, deselect all of the Use Maximum check boxes.











156
8. In the Member level quotas section, change the Virtual CPUs Assigned Quota to 2 and Virtual machines
Assigned Quota to 2.

9. In the Development User Properties window, click Permissions, and then click the Development Cloud.

10. Select Save, and then click OK. These settings allow IT to provide granular control on a cloud-by-cloud basis, in
addition to cross-cloud controls at a global level.


157
11. In the top left of the Virtual Machine Manager Console, click File, and then click Open New Connection.

12. In the Connect to Server page, select Specify credentials, and enter the following credentials and click Connect.
User name: contoso\devuser
Password: Passw0rd!

13. There will now be two Virtual Machine Manager Console windows open. To identify which is the correct
window, look in the top left corner. Ensure that the connection is using Development User
SCVMM01.contoso.com.

14. Select the VMs and Services workspace. Notice that the Fabric workspace is not available to the Development
User user role. This is by design so that this user can focus on their VMs and applications, but not the
underlying infrastructure.

15. Expand Clouds | Development Cloud, and then, on the navigation ribbon, click Overview.



158
16. On the ribbon, click Create Virtual Machine, and then select Create Virtual Machine.

17. On the Select Source page, select Create the new virtual machine with a blank hard disk, and then click Next.

18. On the Identity page, type VM05 in the Virtual machine name field, and then click Next.

19. On the Configure Hardware page, accept the defaults, and then click Next. An error message will appear
because Development User does not have permission to create a new VM unless it comes from a template.

20. Click OK to close the error window, and click Cancel to exit the Create Virtual Machine Wizard.
21. Click Yes to confirm the cancellation.
22. Select the Library workspace.

159
23. From the navigation pane, click Templates, select PetShop in the details pane, and then click Configure
Deployment on the ribbon.

24. Type Development PetShop in the Name field. Notice, the only destination that available in the dropdown is
Development Cloud.

25. Click OK.
26. The Deploy Service Development PetShop window will open. Maximize the window, and then click Refresh
Preview in the top left of the ribbon.

27. The Placing Service dialog box will appear. Once complete, the service should have suitable host(s) defined.
28. Click PETSQL02.contoso.com inside PetShop Data Tier Machine Tier 1.

29. On the navigation ribbon, click Ratings.


160
30. Note that placement provides the Development Cloud instead of the specific hosts as it had in previous
exercises, so the Development User only knows whether the cloud is suitable, but the underlying servers are
hidden. Click OK.
31. Click Deploy Service on the ribbon, and in the Deploy service dialog, click Deploy.
Note: The deployment will fail, and this is expected in this virtualized lab environment. This lab is built
using virtual machines. It is not possible to run VMs within Hyper-V VMs (nested virtualization). A user
can create and configure VMs, but cannot start the VM.

32. The Jobs window opens. Observe the completed job, and then close the Jobs window.
33. Close Deploy Service Development PetShop page, and click Save at the Close window prompt. This will keep
the configuration for future use.

34. From the Virtual Machine Manage Console, using the Development User user role, navigate to the VMs and
Services workspace, then select Clouds from the navigation pane.

35. On the upper ribbon, click Services to see this service deployment.


------------------------------------------------------------END OF ALL LABS------------------------------------------------------------

You might also like