Professional Documents
Culture Documents
Labs Srv02
Labs Srv02
Labs Srv02
Win10 GRUB ING_12 SVR2: LON-HV1 LON- Win10 GRUB ING_14 SVR2: LON-HV3 LON-
HOST01 HOST03
MOKEWA-VM06 MOKEWA-VM08
Anydesk Anydesk
124 846 322 210 899 952
Pass: mokewatech Pass: mokewatech
Win10 GRUB ING_13 SVR2: LON-HV2 LON- Win10 GRUB ING_15 SVR2: LON-HV4 LON-
HOST02 HOST04
MOKEWA-VM07 MOKEWA-VM09
Anydesk Anydesk
378 911 523 179 088 278
Pass: mokewatech Pass: mokewatech
Credenciales
Usuario Local Usuario Dominio
User: Administrator User: ADATUN\Administrator
contraseña: Pa$$w0rd contraseña: Pa$$w0rd
Module 1: Installing and Configuring the Hyper-V Role
Lab: Installing and Configuring the Hyper-V Role
Exercise 1: Installing the Hyper-V Role
Scenario
In this exercise, you will install the Hyper-V role. You can install Window Server roles in several
different ways, and in this exercise, you will install the Hyper-V role by using Server Manager
and Windows PowerShell. You will also verify changes on the server after you have installed
the Hyper-V role.
1. Verify that the LON-HVx computer does not have the Hyper-V role installed.
Task 1: Verify that the LON-HVx computer does not have the Hyper-V role installed
1. Verify that the Hyper-V role is not yet installed on LON-HVx. On LON-HVx, in Server
Manager, in the menu bar, click Manage, and then click Add Roles and Features.
2. In the Add Roles and Features Wizard, on the Before you begin page, click Next.
3. On the Select installation type page, ensure that the Role-based or feature-based
installation option is selected, and then click Next.
4. On the Select destination server page, ensure that Select a server from the server
pool is selected, and then click Next.
5. On the Select server roles page, in the Roles section, verify that Hyper-V is not
selected (which means that it is not installed).
6. Click Cancel to close the Add Roles and Features Wizard.
7. On LON-HVx, on the desktop, on the taskbar, click the Windows PowerShell icon.
7. In the Add Roles and Features Wizard, verify that Include management tools (if
applicable) is selected, and then click Add Features.
8. On the Select server roles page, click Next.
9. On the Select features page, click Next.
10. On the Hyper-V page, click Next.
11. On the Create Virtual Switches page, click Next.
12. On the Virtual Machine Migration page, click Next.
13. On the Default Stores page, click Next.
14. On the Confirm installation selection page, select the Restart the destination
server automatically if required option.
15. In the Add Roles and Features Wizard, click Yes, and then click Install.
16. Waituntil LON-HVx restarts, and then sign in with the user name
ADATUN\Administrator and password Pa$$w0rd.
17. In the Add Roles and Features Wizard, click Close.
Results: After completing this exercise, you should have installed the Hyper-V role.
IMPORTANT: Before continuing with the next exercise, shut down the LON-HVx server
Exercise 2: Configuring Hyper-V Settings
Scenario
Before using the virtualization infrastructure, you should be familiar with and configure Hyper-
V Settings.
In this exercise, you will use Hyper-V Manager and Windows PowerShell to review and
configure some of the settings, such as a default virtual hard disk location, NUMA spanning,
and enhanced session mode policy.
2. In Server Manager, in the navigation pane, click File and Storage Services, and
then click Shares.
3. In the Shares section, click Tasks, and then click New Share.
4. In the New Share Wizard, on the Select the profile for this share page, in the
Select share profile section, click SMB Share – Applications, and then click Next.
5. On the Select the server and path for this share page, click Next.
6. On the Specify share name page, in Share name text box, type VHDs, and then
click Next.
7. On the Configure share settings page, click Next.
9. In the Advanced Security Settings for VHDs dialog box, click Add, click Select a
principal, in the Enter the object name to select text box, type Domain users, click
OK, select the Full control check box, and then click OK twice.
10. On the Specify permissions to control access page, click Next.
2. Verify the default location for creating new virtual hard disks. In Hyper-V Manager,
in the Actions pane, click New, and then click Hard Disk.
3. In the New Virtual Hard Disk Wizard, click Next three times.
4. In the New Virtual Hard Disk Wizard, on the Specify Name and Location page,
verify that the Location field is set to C:\Users\Public\Documents\Hyper-V\Virtual
Hard Disks\, and then click Cancel.
5. In Hyper-V Manager, in the Actions pane, click Hyper-V Settings.
6. On the Hyper-V Settings for LON-HOST0x page, in left pane, verify that Virtual
Hard Disks is selected.
7. On the Hyper-V Settings for LON-HOST0x page, in the Location field verify that
the same location that was used in the New Virtual Hard Disk Wizard is listed.
8. Click Browse, and in the navigation pane, click Local Disk (C:). In the details pane,
click Users, and then click Select Folder.
9. On the Hyper-V Settings for LON-HOST0x page, click OK.
10. Verify that C:\Users is set as a default location for creating new virtual hard disks.
11. In Hyper-V Manager, in the Actions pane, click New, and then click Hard Disk.
12. In the New Virtual Hard Disk Wizard, click Next three times.
13. In the New Virtual Hard Disk Wizard, on the Specify Name and Location page,
verify that the Location field is set to C:\Users\, and then click Cancel.
Note: This is the same location as you configured for Virtual Hard Disk location.
14. On LON-HOST0x, on the taskbar, click the Windows PowerShell icon.
15. In Windows PowerShell, run the following cmdlet, where y is number of your partner
host. For example, if you are using HOST1, y represents 2. If you are using HOST2,
y represents 1:
2. On the Hyper-V Settings for LON-HOST0x page, in the left pane, click Virtual
Machines, and in the details pane, in the text box, verify that
C:\ProgramData\Microsoft\Windows\Hyper-V displays.
3. On the Hyper-V Settings for LON-HOST0x page, in the left pane, click NUMA
Spanning, and in the details pane, verify that NUMA Spanning is set to Enabled.
4. In the left pane, click Storage Migrations, and verify that 2 simultaneous storage
migrations are allowed.
5. In the left pane, click Enhanced Session Mode Policy, and in the details pane,
verify that Allow enhanced session mode is disabled.
6. Close the Hyper-V Settings for LON-HOST0x page.
Note: This is the location that you set using Windows PowerShell.
12. In the left pane, click NUMA Spanning, and verify that NUMA Spanning is
disabled.
Note: NUMA Spanning is disabled because you set it to disabled using Windows
PowerShell.
13. In the right pane, select the check box to allow NUMA Spanning.
14. In the left pane, click Storage Migrations, and then verify that the number of
simultaneous storage migrations allowed is set to 4.
Note: This value is set to 4 because you set the value using Windows PowerShell.
15. In the left pane, click Enhanced Session Mode Policy, and verify that Policy is
enabled. In the details pane, clear the Allow enhanced session mode check box
to disable Enhanced Session Mode Policy.
16. Click OK to close Hyper-V Settings for LON-HOST0x. Click Close.
Results: After completing this exercise, you should have configured Hyper-V settings.
Exercise 3: Accessing and Managing Hyper-V Remotely
Scenario
Administrators typically administer Hyper-V remotely. In this exercise, you will enable Hyper-
V Manager and Hyper-V Module for Windows PowerShell on a Windows 10 workstation, and
then manage the Hyper-V host remotely.
The main tasks for this exercise are as follows:
12. On LON-CL0x, on the Start screen, search for programs that contain the word
hyper. Confirm that two programs, Hyper-V Manager and Hyper-V Virtual
Machine Connection, are discovered.
6. In the Hyper-V Settings for LON-HOST0x dialog box, review Hyper-V Settings for
LON-HOST0x, and verify that they are configured as you configured them in the
previous exercise.
7. Close Hyper-V Settings for LON-HOST0x.
Note: Virtual Hard Disks and Virtual Machines locations are set to \\LON-
P
HOST0y\VHDs, NUMA Spanning is enabled, Storage Migrations is set to 4, and
Enhanced Session Mode Policy is disabled.
13. In the Actions pane, click Hyper-V Settings, verify that Storage Migrations is set to
3, and then click OK.
Note: This value is 3 because this is how you configured it in Windows PowerShell.
14. Close Windows PowerShell.
Results: After completing this exercise, you should have accessed and managed
Hyper-V remotely.
Module 2: Creating and Managing Virtual Hard Disks, Virtual
Machines, and Checkpoints
Lab A: Creating and Managing Virtual Hard Disks and Virtual
Machines
Exercise 1: Creating and Managing Virtual Hard Disks
Scenario
In this exercise, you will create different types of virtual hard disks. You will use Hyper-V
Manager and Windows PowerShell to create the virtual hard disks and to explore the
differences between them. You will confirm that differencing virtual hard disks can already
have some content when created, while a fixed-size disk allocates its full size on the storage
when created. You will also confirm that the differencing virtual hard disk expands when you
add data to it. You will add virtual disks to the virtual machine and expand them while the
virtual machine is running. You will also see how you can add a directly attached disk to the
virtual machine.
4. In Hyper-V Manager, in the Actions pane, click New, and then click Hard disk.
5. In the New Virtual Hard Disk Wizard, on the Before You Begin page, click Next.
8. On the Choose Disk Type page, confirm that the default disk type for VHD hard
disk is Fixed size, and then click Next twice.
9. On the Configure Disk page, confirm that the maximum size for the VHD is 2,040
GB.
10. Click Previous three times to return to the Choose Disk Format page.
11. On the Choose Disk Format page, click VHDX, and then click Next.
12. On the Choose Disk Type page, confirm that the default disk type for the VHDX
hard disk is Dynamically expanding, and then click Next.
13. On the Specify Name and Location page, in the Name field, type Dynamic.vhdx,
confirm that the Location field is set to C:\Shares\VHDs\, and then click Next.
14. On the Configure Disk page, confirm that Create a new blank virtual hard disk
is selected, in the Size field, type 100, and then click Next.
15. On the Completing the New Virtual Hard Disk Wizard page, click Finish.
16. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click New, and then
click Hard disk.
17. In the New Virtual Hard Disk Wizard, on the Before You Begin page, click Next.
18. On the Choose Disk Format page, select VHD, and then click Next.
19. On the Choose Disk Type page, click Differencing, and then click Next.
20. On the Specify Name and Location page, in the Name field, type
Differencing.vhd, confirm that the Location field is set to C:\Shares\VHDs\,
and then click Next.
21. On the Configure Disk page, click Browse, and then browse to C:\CURSO\BASEVHD\.
22. In the Base folder, click BASE_WIN10G1.vhd, click Open, and then click Next.
23. On the Completing the New Virtual Hard Disk Wizard page, click Finish.
25. In Windows PowerShell, create a fixed-size virtual hard disk by running the
following cmdlet:
3. In the VHDs folder, confirm that the three virtual hard disks that you created in the
previous task display.
4. In the VHDs folder, right-click Fixed.vhdx, select Properties, confirm that its size
on the disk is 1.00 GB, and then click OK.
5. In the VHDs folder, verify that Dynamic.vhdx and Differencing.vhd are allocated
much less space on the disk, even though you configured Dynamic.vhdx with 100
GB.
6. On LON-HOST0x, in Hyper-V Manager, right-click LON-CL0x, and then click
Settings.
7. In Settings for LON-CL0x, in the left pane, click SCSI Controller, in the right pane,
click Hard Drive, and then click Add.
8. In the Hard Drive section, browse to C:\Shares\VHDs.
9. In the VHDs folder, click Fixed.vhdx, click Open, and then click OK.
10. In Windows PowerShell, add two additional virtual hard disks to LON-CL0x by
running the following cmdlets:
13. In File Explorer, right-click This PC, and then click Manage.
14. In Computer Management, in the navigation pane, click Disk Management. After
the Initialize Disk window opens, click OK.
15. Confirm that LON-CL0x has multiple disks. Confirm that the last three disks have
1023 MB (1 GB), 100 GB, and 127 GB. Confirm that the last disk has two partitions,
which are assigned letters E: and F:. Confirm that the first two disks have only
unallocated space.
16. Right-click the unallocated space of Disk 1, click New Simple Volume, click Next
four times, and then click Finish. Disk is formatted and assigned letter G:. Close
File Explorer and click Cancel in the Microsoft Windows dialog box.
17. Right-click the unallocated space of Disk 2, click New Simple Volume, click Next
four times, and then click Finish. Disk is formatted and assigned letter H:. Click
Cancel in the Microsoft Windows dialog box.
18. In File Explorer, browse to C:\Windows.
19. In the Windows window, in the details pane, right-click the Inf folder, and then
click Copy.
20. In the navigation pane, click Local Disk (F:), and then confirm that multiple
folders display in the details pane.
Note: This is a partition on a differencing disk. You did not yet copy anything on it
to the virtual hard disk; this is content on the parent disk.
21. In the details pane, right-click, and then click Paste. Verify that the Inf folder is
copied to drive F: on the differencing virtual hard disk.
22. Copy folder Inf to drives G: on the fixed-size disk and H: on the dynamically
expanding disk.
23. On LON-HOST0x, in File Explorer, browse to the C:\Shares\VHDs folder.
24. In the VHDs folder, confirm that all three disks still display. Confirm that the size
of the Fixed.vhdx file is still 1 GB, while the size of the Differencing.vhd and
Dynamic.vhdx files has increased as you copy data to the partitions on those
disks.
Task 3: Manage virtual hard disks
1. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click Edit Disk.
2. In the Edit Virtual Hard Disk Wizard, on the Before you Begin page, click Next.
3. On the Locate Virtual Hard Disk page, click Browse, and then browse to
C:\Shares\VHDs.
4. In the VHDs folder, click Fixed.vhdx, click Open, and then click Next.
5. On the Choose Action page, confirm that Expand is selected, and then click Next.
6. On the Expand Virtual Hard Disk page, in the New size field, type 2, and then
click Next.
7. On the Completing the Edit Virtual Hard Disk Wizard page, click Finish.
9. In the Edit Virtual Hard Disk Wizard, on the Before you Begin page, click Next.
10. On the Locate Virtual Hard Disk page, click Browse, and then browse to
C:\Shares\VHDs.
11. In the VHDs folder, click Dynamic.vhdx, click Open, and then click Next.
12. On the Choose Action page, confirm that the dynamically expanding disk has two
actions available, Compact and Expand. A third option, Shrink, would be
available if there were unallocated space on that disk. Click Expand, and then click
Next.
13. On the Expand Virtual Hard Disk page, in the New size field, type 200, and then
click Next.
14. On the Completing the Edit Virtual Hard Disk Wizard page, click Finish. Notice
that the operation finished much faster than when you expanded the fixed-size
virtual hard disk.
16. On LON-HOST0x, in Windows PowerShell, remove the first two small computer
system interface (SCSI) virtual hard disks from LON-CL0x by running the following
cmdlets:
17. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click Edit Disk.
18. In the Edit Virtual Hard Disk Wizard, on the Before you Begin page, click Next.
19. On the Locate Virtual Hard Disk page, click Browse, and then browse to
C:\Shares\VHDs.
20. In the VHDs folder, click Dynamic.vhdx, click Open, and then click Next.
21. On the Choose Action page, confirm that there are new options available.
Note: Shrink is available because the disk now has unallocated space, and
Convert is available only if the disk is not used by a virtual machine.
22. On the Choose Action page, click Convert, and then click Next.
23. On the Convert Virtual Hard Disk page, click VHD, and then click Next.
24. On the Convert Virtual Hard Disk page, click Dynamically expanding, and then
click Next.
25. On the Convert Virtual Hard Disk page, click Browse, and then browse to
C:\Shares\VHDs.
26. In the VHDs folder, in the File name field, type Converted.vhdx, click Save, and then
click Next.
27. On the Completing the Edit Virtual Hard Disk Wizard page, click Finish.
29. In the VHDs folder, confirm that file Converted.vhdx is created, and that the size
of Fixed.vhdx is now 2 GB.
Results: After completing this exercise, you should have created and managed
virtual hard disks.
5. On the Assign Memory page, in the Startup Memory field, type 2048, select the
Use Dynamic Memory for this virtual machine check box, and then click Next
four times.
6. On the Completing the Virtual Machine Wizard page, click Finish. A virtual
machine named LON-VM2 is created.
7. On LON-HOST0x, in Windows PowerShell, create a Generation 1 virtual machine,
and then attach it to a virtual hard disk by running the following cmdlets:
11. In Hyper-V Manager, right-click the LON-VM1 virtual machine, and then click
Settings.
12. In Settings for LON-VM1, click Memory, and then confirm that Enable Dynamic
Memory is selected.
13. In the left pane, in the Hardware section, confirm that two Network Adapters
display, and then click OK.
Task 3: Work with dynamic memory
1. On LON-HOST0x, in Hyper-V Manager, right-click LON-CL0x, and then click
Settings.
2. In Settings for LON-CL0x, click Memory. In the details pane, confirm that Enable
Dynamic Memory is selected, and then click OK.
3. In Hyper-V Manager, make note of the currently Assigned Memory for the LON-
CL0x virtual machine.
4. In LON-CL0x, open Windows PowerShell.
8. After a few minutes, check Assigned Memory for the LON-CL0x virtual machine
Task 4: Configure Integration Services
1. On LON-CL0x, on Start screen, type services, and then click View local services.
2. In the Services window, in the details pane, confirm that Hyper-V Time
Synchronization Service is running.
3. On LON-CL0x, open a new Command Prompt window, and then run the Time
command.
4. Make note of the current time, type 11:00 as the current time, and then press Enter.
5. In the Command Prompt window, enter the Time command again, and then
confirm that it automatically set back to its previous value, as Integration
Services automatically synchronized the time on LON-CL0x with the time on
LON-HOST0x.
6. On LON-HOST0x, in Hyper-V Manager, right-click LON-CL0x, and then click
Settings.
7. In Settings for LON-CL0x, in the Management section, in the left pane, click
Integration Services.
8. In Integration Services, in the details pane, clear the Time synchronization check
box, and then click OK.
9. On LON-CL0x, in Services, right-click Services (Local), and then click Refresh.
Confirm that Hyper-V Time Synchronization Service is not running, and then close
Services.
10. In LON-CL0x, at the command prompt, run the Time command. Make note of
the current time, type
11:00 as the current time, and then press Enter.
11. At the command prompt, type Time, and then press Enter twice. Confirm that the
returned time is few second over 11:00, as time on the virtual machine is no
longer synchronizing with the Hyper-V host.
12. In the Command Prompt window, run the devmgmt.msc command. In Device
Manager, expand Display adapters, and then confirm that the virtual machine
is using the Microsoft Hyper-V Video adapter, which is provided as part of
Integration Services.
13. In Device Manager, expand System devices, and then confirm that the virtual
machine is using several devices with Hyper-V in their name, including Microsoft
Hyper-V Dynamic Memory. All of those virtual devices are provided as part of
Integration Services.
14. Close Device Manager.
15. On LON-HOST0x, in Windows PowerShell, enable time synchronization for LON-
CL0x by running the following cmdlet:
Results: After completing this exercise, you should have created and managed
virtual machines.
6. Confirm that under IDE Controller 0, Hard Drive is now using a file with a GUID in
its name, and then click OK.
11. On LON-VM1, right-click the desktop, click New, click Folder, and name the
folder Folder1.
12. In Virtual Machine Connection, in the Action menu, click Checkpoint, type Folder1
as Checkpoint Name, and then click Yes.
13. On LON-VM1, right-click the desktop, click New, click Folder, and then name
the folder Folder2.
14. In Virtual Machine Connection, on the toolbar, click the Checkpoint button, type
Folder2 as Checkpoint Name, and then click Yes.
15. On LON-VM1, right-click the desktop, click New, click Folder, and then name
the folder Folder3.
16. On LON-HOST0x, open Windows PowerShell.
20. Right-click the Folder1 checkpoint, and then click Apply. In the Apply Checkpoint
dialog box, click Apply.
21. On LON-VM1, on the desktop, confirm that there is only single folder displaying,
named Folder1. Right-click the desktop, click New, click Folder, and name the
folder Folder1.1.
22. In Hyper-V Manager, right-click LON-VM1, and then click Checkpoint.
23. In Hyper-V Manager, in the Checkpoints pane, right-click the created checkpoint,
click Rename, and then name the folder Folder1.1.
24. On LON-HOST0x, in File Explorer, browse to C:\Shares\Snapshots.
25. In the Snapshots folder, confirm that there are five .xml files and five subfolders—
exactly the same as number of checkpoints for LON-VM1 that you created.
26. In the Snapshots window, in the details pane, click the Date modified column to
order content by the time of creation.
27. Right-click the lowest folder in the details pane, and then click Properties.
28. In the Properties dialog box, confirm that the Size of this folder is 0.
Note: The first checkpoint was created when LON-VM1 was turned off.
29. In the Properties dialog box, click OK.
30. In the Snapshots window, review the size of the other folders.
Note: You created other LON-VM1 checkpoints while the virtual machine was
running, so each of those folders contains the memory content of the virtual
machine at the moment the checkpoint was created.
Task 4: Manage checkpoints
1. On LON-HOST0x, in Windows PowerShell, view checkpoints for LON-VM1 by U
running the following cmdlet:
Get-VMSnapshot –VMName LON-VM1
2. Review the ParentSnapshotName property of each checkpoint to see how
checkpoints relate to each other.
3. Export the Folder2 checkpoint by running the following cmdlet:
Export-VMSnapshot –Name Folder2 –VMName LON-VM1 –Path C:\Exported
4. In Hyper-V Manager, in the Virtual Machines pane, verify that the Status column
is showing export progress for LON-VM1.
5. On LON-HOST0x, in File Explorer, browse to C:\Exported\LON-VM1.
7. In the details pane, double-click the Virtual Hard Disks folder, and then confirm
that it contains two virtual hard disks, the Differencing.vhd virtual hard disk, and
its parent disk Base_Win10G1.vhd.
Note: Verify that export of LON-VM1 has finished. If the virtual machine is still
exporting, wait until the export operation finishes.
8. In File Explorer, in the navigation column, click Exported, in the details pane, right-
click LON-VM1, click Rename, and then type Folder2.
9. In Windows PowerShell, export complete LON-VM1 by running the following
cmdlet:
Export-VM –Name LON-VM1 –Path C:\Exported
10. You can view the export progress from Hyper-V Manager.
12. In the Exported folder, confirm that there is a LON-VM1 subfolder. Double-click
the LON-VM1 folder, and then confirm that it contains a subfolder named
Snapshots.
13. Double-click Virtual Hard Disks, and then confirm that it contains a
Differencing.vhd virtual hard disk, its parent disk, and all of the differencing virtual
hard disks that were created by checkpoints.
14. Close the Virtual Hard Disks window.
18. In the Settings for Folder2 (checkpoint) window, in the left pane, select several
Hardware components, and then confirm that you cannot modify their settings.
19. In the Management section, in the navigation pane, click Name, in the
Description field, type Folder1 and Folder2 on the desktop, and then click OK.
20. In Hyper-V Manager, right-click the Folder1 checkpoint, and then click Delete
Checkpoint Subtree. In the Delete Checkpoint Tree dialog box, click Delete.
21. In Hyper-V Manager, confirm that all checkpoints for LON-VM1 except the first
one are deleted instantly.
Note: You can follow the merge process of the differencing virtual hard disks in
the Status column of LON-VM1.
22. On LON-HOST0x, in File Explorer, browse to C:\Shares\Snapshots.
23. In the Snapshots folder, confirm that there is single .xml file, and one subfolder.
Note: You deleted all the other checkpoints, and their differencing virtual hard
disks were merged while the LON-VM1 virtual machine was running.
3. In Device Manager, in the details pane, expand System devices, and then confirm
that the Microsoft Hyper-V Generation Counter device is present.
Scenario
One of your colleagues is sure that you can monitor Hyper-V host utilization by using Task
Manager. You want to show your colleague that this is incorrect. You also want to demonstrate
the proper way to monitor the Hyper-V host and virtual machines and how to retrieve chargeback
information for the running virtual machines.
The main tasks for this exercise are as follows:
1. Use Task Manager.
2. Use Performance Monitor to monitor Hyper-V performance.
3. Use Resource Metering.
Task 1: Use Task Manager
1. On LON-HOST0x, right-click the taskbar, and then click Task Manager.
2. In Task Manager, click More Details, and then click the Performance tab.
5. In Task Manager, click More Details, and then click the Performance tab.
8. In CPU Stress, set the Process Priority Class to High. In the Thread 1 section,
set Thread Priority to Highest, and then set Activity to Busy.
9. On LON-CL0x, view the Task Manager and confirm that it shows high
utilization.
10. On LON-HOST0x, view the Task Manager and confirm that it shows low utilization.
Note: Because each Task Manager is showing utilization of its own virtual
environment, the utilization shown is very different.
11. In CPU Stress, in the Thread 1 section, set Thread Priority to Idle and Activity to
Low.
4. In the Add Counters dialog box, expand the Hyper-V Hypervisor Virtual
Processor performance object, click % Guest Run Time. In the Instances of
selected object section, click LON-CL0x, and then click Add.
5. On LON-CL0x, in CPU Stress, set Process Priority Class to High. In the Thread 1
section, set Thread Priority to Highest, and set Activity to Busy.
6. On LON-HOST0x, in Performance Monitor, follow how processor utilization
increases in both the virtual machine and on Hyper-V. Notice that the processor
on LON-HOST0x is much less utilized than the processor on LON-CL0x.
7. On LON-HOST0x, in Hyper-V Manager, view CPU Usage for the LON-CL0x
virtual machine.
8. In Hyper-V Manager, right-click LON-CL0x, and then click Settings.
9. In Settings for LON-CL0x, in the navigation pane, click Processor, type 10 in the
Virtual machine limit (percentage) field, and then click OK.
10. In Hyper-V Manager, confirm that CPU Usage for the LON-CL0x virtual machine
is considerably lower.
11. On LON-CL0x, close both CPU Stress and Task Manager.
14. In Settings for LON-CL0x, in the navigation pane, click Processor, in the Virtual
machine limit (percentage) field, type 100, and then click OK.
Results: After completing this exercise, you should have monitored Hyper-V.
Module 3: Creating and Configuring Virtual Machine Networks
LAB A: Creating and Using Hyper-V Virtual Switches
Exercise 1: Creating and Using Virtual Switches
Scenario
The Hyper-V virtualization platform is now installed, and you need to demonstrate to junior
administrators the different networking options that you can configure in Hyper-V. You will first
show them the current Hyper-V host networking configuration. You will also create different types
of Hyper-V virtual switches, and explore with junior administrators the connectivity options when
using each of them.
The main tasks for this exercise are as follows:
1. Verify current Hyper-V network configuration.
2. Create virtual switches.
3. Use Hyper-V virtual switches
3. In the Virtual Switch Manager window, confirm that in the Virtual Switches section,
External Network is the only virtual switch listed.
4. In the Virtual Switch Manager window, click Cancel.
7. In Control Panel, in the Search Control Panel text box, type network, and then click
View network connections.
8. In the Network Connections window, confirm that two network connections display:
Ethernet and vEthernet (External Network).
9. Right-click Ethernet and then click Properties.
10. In the Properties dialog box, confirm that only the check box for Hyper-V
Extensible Virtual Switch is selected, and none of the check boxes for the other
items are selected. Click Cancel.
11. Right-click the vEthernet (External Network) network connection, and then click
Properties. Confirm that the network connection is using most items, but it is not
using Hyper-V Extensible Virtual Switch, for which the check box is not selected.
Click Cancel.
Task 2: Create virtual switches
1. On LON-HOST0x, maximize Hyper-V Manager.
3. In the Virtual Switch Manager window, in the left pane, confirm that New virtual
network switch is selected.
4. In the right pane, confirm that External is selected, and then click Create Virtual
Switch.
5. Confirm that New Virtual Switch is added to the left pane.
6. In right pane, in the Connection type section, confirm that External network is
selected.
7. Verify that you can select Enable single-root I/O virtualization (SR-IOV), but do not
select them.
8. Verify that you can also select Enable virtual LAN identification, but do not
enable it.
9. In the Virtual Switch Manager window, click OK.
11. When the Error applying Virtual Switch Properties changes message displays,
expand See details to view the error description.
12. Review the error message, and then click Close.
Note: The error message is that the physical network adapter is already bound to
the virtual switch, and a physical network adapter can be bound to only one
external virtual switch.
13. In the Virtual Switch Manager for LON-HOST0x window, in the Name text box, type
Internal Switch.
14. In the Connection type section, click Internal network. Verify that you cannot
enable single root I/O virtualization (SR-IOV) for the internal switch, but that you
can select Enable virtual LAN identification. Do not enable it, and click OK.
15. Maximize the Network Connections window, and confirm that the additional
network connection vEthernet (Internal Switch) is added.
16. Right-click the vEthernet (Internal Switch) network connection, and then click
Properties.
17. In the Properties dialog box, confirm that the network connection is using most
items, including Internet Protocol Version 4 (TCP/IPv4). Verify that the network
connection is not using Hyper-V Extensible Virtual Switch, and then click Cancel.
18. In a Windows PowerShell window, run the following cmdlet:
Get-VMNetworkAdapter –All
19. Confirm that there is a network adapter named Internal Switch present on the
system.
20. Maximize Hyper-V Manager, and in the Actions pane, click Virtual Switch
Manager.
21. In Virtual Switch Manager for LON-HOST0x, in the left pane, confirm that New
virtual network switch is selected, in the right pane, click Private, and then click
Create Virtual Switch.
22. Verify that in the left pane, New Virtual Switch is added.
23. In the Name text box, type Private Switch. In the Connection type section,
confirm that Private network is selected. Verify that you cannot enable either SR-
IOV or virtual local area network (VLAN) identification for the internal switch, and
then click OK.
24. Maximize the Network Connections window, and confirm that when you created
the private virtual switch, no network connection was added.
25. Minimize the Network Connections window.
5. In Settings for LON-TESTx, in the left pane, click Network Adapter, in the Virtual
Switch drop-down list box, click Private Switch, and then click OK.
6. On LON-PRODx, on the taskbar, click the Windows PowerShell icon.
18. In the Network Connections window, right-click the vEthernet (Internal Switch)
network connection, and then click Properties.
19. In the vEthernet (Internal Switch) Properties dialog box, click Internet Protocol
Version 4 (TCP/IPv4), and then click Properties.
20. In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, click Use the
following IP address, in the IP address text box, type 10.0.0.100.
21. In the Subnet mask text box, type 255.255.255.0, click OK, and click Close.
22. On LON-HOST0x, maximize the Windows PowerShell window, and run the
following command:
ping 10.0.0.x5
23. Confirm that four replies are returned, which confirms that both LON-HOST0x and
LON-PRODx now have network connectivity.
24. On LON-HOST0x, in Hyper-V Manager, right-click LON-PRODx, and then click
Settings.
25. In the Settings for LON-PRODx window, in the left pane, click Network Adapter,
in the Virtual Switch drop-down list box, click External Network, and then click
OK.
26. On LON-PRODx, in Windows PowerShell, run the following cmdlet:
Set-NetIPInterface –InterfaceAlias “Ethernet 2” –dhcp enabled
Note: This cmdlet configures LON-PRODx to obtain an IP address automatically
from a DHCP server.
27. In Windows PowerShell, run the following command:
ipconfig /all
28. Verify from the output that LON-PRODx has a different IPv4 address, and that it
obtained the IP address from the DHCP server that is running on LON-DC1.
29. Write down the IPv4 address of LON-PRODx.
4. In the Move “LON-MOVE1” Wizard, on the Before You Begin page, click Next.
5. On the Choose Move Type page, select the Move the virtual machine’s storage
option, and then click Next.
6. On the Choose Options for Moving Storage page, select the Move only the
virtual machine’s virtual hard disks option, and then click Next.
7. On the Select Items to Move page, confirm that disk LON-MOVE1.vhdx is
selected, and then click Next.
8. On the Choose a new location for attached virtual hard disk page, in the Folder
text box, type \\LON-HOST0y\VHDs\LON-MOVE1, and then click Next.
9. On the Completing Move Wizard page, click Finish.
Note: This confirms that the VHD was moved while the virtual machine was
running.
12. In Settings for LON-MOVE1, under Management, click Checkpoint File Location.
Confirm that checkpoints are stored locally, that you cannot change the location,
and then click OK.
13. In Hyper-V Manager, right-click LON-MOVE1, and then click Move.
14. In the Move “LON-MOVE1” Wizard, on the Before You Begin page, click Next.
15. On the Choose Move Type page, select the Move the virtual machine’s storage
option, and then click Next.
16. On the Choose Options for Moving Storage page, select the Move the virtual
machine’s data to different locations option, and then click Next.
17. On the Select Items to Move page, review the items that can be moved. Click
Clear All, select the Checkpoints check box, and then click Next.
18. On the Choose a new location for checkpoints page, in the Folder text box, type
\\LON-HOST0y\VHDs\LON-MOVE1, and then click Next.
19. On the Completing Move Wizard page, click Finish.
Note: Because the checkpoint has a small differencing VHD, the move occurs
quickly.
20. In Hyper-V Manager, right-click LON-MOVE1, and then click Settings.
21. In Settings for LON-MOVE1, click Checkpoint File Location. Confirm that
checkpoints are stored on the network share, and that they were moved while
virtual machine was running, and then click OK.
3. Confirm that the hard drive is using the LON-MOVE2.vhdx VHD, and that the VHD
is stored locally.
4. In Settings for LON-MOVE2, click Checkpoint File Location. Confirm that
checkpoints are stored locally and that you cannot change the location, and then
click OK.
5. In Windows PowerShell, move LON-MOVE2 storage by running following cmdlet:
Move-VMStorage –VMName LON-MOVE2 –DestinationStoragePath \\LON-
HOST0y\VHDs\LON-MOVE2
6. Confirm that storage was moved successfully by running following cmdlet:
Get-VM LON-MOVE2 | Select Name, Path, SnapshotFileLocation
7. In Hyper-V Manager, right-click LON-MOVE2, and then click Settings.
8. In Settings for LON-MOVE2, under SCSI Controller 0, click Hard Drive, and then
confirm that LON-MOVE2.vhdx is now stored on a network share.
Note: Notice that the VHD was moved while virtual machine is running.
9. Under SCSI Controller 0, click Checkpoint File Location.
10. Confirm that checkpoints are stored on the network share and that they were
moved while virtual machine was running, and then click OK.
3. On the Choose Move Type page, confirm that Move the virtual machine is
selected, and then click Next.
4. When the Move Wizard error dialog box opens, click Close.
Note: This dialog box opens because this computer is not configured for live
migration.
5. In the Move “LON-PRODx” Wizard, click Cancel.
8. In the right pane, in the Live Migrations section, click Enable incoming and
outgoing live migrations.
9. In Hyper-V Settings, select the option for incoming live migration to Use any
available network for live migration.
10. In the left pane, expand Live Migrations, click Advanced Features, and select Use
Kerberos to be used as Authentication Protocol.
11. After reviewing the settings, click OK.
12. In Hyper-V Manager, in the navigation pane, right-click Hyper-V Manager, and
then click Connect to Server.
13. In the Select Computer dialog box, in the Another computer text box, type LON-
HOST0y, and then click OK.
14. Verify that LON-HOST0y is now added to the Hyper-V Manager navigation pane.
Note: Live migration must be enabled on both LON-HOST0x machines before
you can continue with the lab. Ensure that your partner has finished this task
before you continue.
Task 4: Move a virtual machine by using Live Migration
1. On LON-HOST0x, in Hyper-V Manager, right-click LON-PRODx, and then click
Settings.
2. In Settings for LON-PRODx, under IDE Controller 0, click Hard Drive.
3. Confirm that it is using LON-PRODx.vhd VHD, and that the VHD is stored locally.
4. Click Checkpoint File Location. Confirm that checkpoints are stored locally, and
then click OK.
5. On LON-PRODx, open Windows PowerShell, run the following command to ping
LON-PRODy, which is running on your partner Hyper-V host:
ping –t 10.0.0.y5
6. On LON-HOST0x, in Hyper-V Manager, right-click LON-PRODx, and then click
Move.
7. In the Move “LON-PRODx” Wizard, on the Before You Begin page, click Next.
8. On the Choose Move Type page, confirm that Move the virtual machine is
selected, and then click Next.
9. On the Specify Destination Computer page, in the Name text box, type LON-
HOST0y, and then click Next.
10. On the Choose Move Options page, confirm that the Move the virtual machine’s
data to a single location option is selected, and then click Next.
11. On the Choose a new location for virtual machine page, in the Folder text box,
type C:\Moved\LON-PRODx, and then click Next.
12. On the Completing Move Wizard page, click Finish.
Note: This will start moving the running virtual machine and performing the live
migration. You can monitor the progress of the live migration in Hyper-V
Manager, in the Status column. Here you can also see that LON-PRODx is able
to ping LON-PRODy throughout the live migration.
13. After live migration completes, in Hyper-V Manager, confirm that LON-PRODx is
no longer running on LON-HOST0x.
14. In Hyper-V Manager, in the navigation pane, click LON-HOST0y.
16. In Settings for LON-PRODx, under IDE Controller 0, click Hard Drive, and then
confirm that it is using the C:\Moved\LON-PRODx\Virtual Hard Disks\LON-
PRODx.vhd VHD.
17. In Settings for LON-PRODx, click Checkpoint File Location, confirm that
checkpoints are stored in the C:\Moved\LON-PRODx folder, and then click OK.
18. In Hyper-V Manager, right-click LON-PRODx, and then click Move.
19. In the Move “LON-PRODx” Wizard, on the Before You Begin page, click Next.
20. On the Choose Move Type page, confirm that Move the virtual machine is selected,
and then click Next.
21. On the Specify Destination Computer page, in the Name field, type LON-HOST0x,
and then click Next.
22. On the Choose Move Options page, confirm that the Move the virtual machine’s
data to a single location option is selected, and then click Next.
23. On the Choose a new location for virtual machine page, in the Folder field, type
C:\Moved\LON-PRODx, and then click Next.
24. On the Completing Move Wizard page, click Finish.
25. When the Move Wizard error dialog box displays, review the text explaining that
there was an error during the move operation.
Note: The error occurs because you are managing a remote Hyper-V host, which
is not allowed to delegate your permissions.
Task 5: Run live migration from Windows PowerShell
1. On LON-HOST0x, in Windows PowerShell, move LON-PRODx to your Hyper-V
host by running the following cmdlet:
Move-VM –Name LON-PRODx –DestinationHost LON-HOST0x –ComputerName
LON-HOST0y -DestinationStoragePath C:\Moved\LON-PRODx
2. When live migration starts, in Hyper-V Manager, view the Status column to
monitor migration progress.
3. After migration finishes, in Hyper-V Manager, confirm that LON-PRODx is no
longer running on LON-HOST0y.
4. In Hyper-V Manager, in the navigation pane, click LON-HOST0x.
6. In Settings for LON-PRODx, under IDE Controller 0, click Hard Drive, and confirm
that it is using the C:\Moved\LON-PRODx\Virtual Hard Disks\LON-PRODx.vhd
VHD.
7. In Settings for LON-PRODx, click Checkpoint File Location, confirm that the
checkpoints are stored in the C:\Moved\LON-PRODx folder, and then click OK.
Note: Leave the virtual machines running for the next lab.
Results: After completing this exercise, you should have moved Hyper-V storage
and virtual machines.
5. In the Specify the default location to store Replica files text box, type
C:\shares\replicated, and then click OK.
6. In the Settings dialog box, click OK.
6. In Enable Replication for LON-TESTx, on the Before You Begin page, click Next.
7. On the Specify Replica Server page, in the Replica server text box, type LON-
HOST0y, and then click Next.
8. On the Specify Connection Parameters page, confirm that Use Kerberos
authentication (HTTP) is selected, that Compress the data that is transmitted
over the network is enabled, and then click Next.
9. On the Choose Replication VHDs page, confirm that LON-TESTx VHD is selected,
and then click Next.
10. On the Configure Replication Frequency page, in the drop-down list box, click 30
seconds, and then click Next.
11. On the Configure Additional Recovery Points page, click Create additional
hourly recovery points, in the Coverage provided by additional recovery point
(in hours) text box, type 10, and then click Next.
12. On the Choose initial Replication Method page, confirm that both the Send initial
copy over the network and Start replication immediately options are selected, and
then click Next.
13. On the Completing the Enable Replication wizard page, click Finish.
20. In LON-TESTx Settings, in the navigation pane, expand Network Adapter, and
confirm that two new nodes that were not present before, Failover TCP/IP and Test
Failover, now display.
21. In LON-TESTx Settings, in the navigation pane, confirm that there are now seven
settings in the Management section, including Replication, which was not present
before, and then click OK.
22. In Windows PowerShell, review replication settings and status by running the
following cmdlets, and pressing Enter at the end of each line:
Get-VMReplication –VMName LON-TESTx Measure-VMReplication –VMName
LON-TESTx
23. In Hyper-V Manager, right-click LON-TESTx, click Replication, and then click View
Replication Health.
24. In Replication Health for “LON-TESTx”, review Replication Health, and then click
Close.
Note: If initial replication has finished, Replication Health will display as
Normal.
Task 3: Test Hyper-V Replica failover
1. On LON-HOST0x, in Hyper-V Manager, in the navigation pane, verify that LON-
HOST0y is selected. Right-click LON-TESTx, and then click Settings.
2. In LON-TESTx Settings, in the navigation pane, expand Network Adapter, and
then click Failover TCP/IP
3. In LON-TESTx Settings, in the details pane, click Use the following IPv4 address
scheme for the virtual machine, enter the following settings, and then click
Apply:
IPv4 Address: 192.168.100.1x5
Subnet Mask: 255.255.255.0
Preferred DNS server: 192.168.100.5
4. In LON-TESTx Settings, in the navigation pane, click Test Failover.
5. In the details pane for Virtual switch, click Private Switch, and then click OK.
Note: If initial replication of LON-TESTx has not yet finished, wait until it
finishes.
6. In Hyper-V Manager, right-click LON-TESTx, click Replication, and then click Test
Failover.
7. In Test Failover, click Test Failover.
Note: A checkpoint for LON-TESTx is created, and a new virtual machine named
LON-TESTx – Test is created.
8. In Hyper-V Manager, right-click LON-TESTx – Test, and then click Settings.
15. Confirm that IP configuration is the same as you configured in Failover TCP/IP for
LON-TESTx.
16. On LON-HOST0x, in Hyper-V Manager, right-click LON-TESTx, click Replication,
and then click Stop Test Failover.
17. In Stop Test Failover, click Stop Test Failover.
19. Confirm that both the LON-TESTx – Test virtual machine and the LON-TESTx
virtual machine checkpoint have been deleted.
3. In LON-TESTx, right-click the desktop, click New, click Folder, and then name the
folder Current State.
4. In Hyper-V Manager, right-click LON-TESTx, click Replication, and then click
Planned Failover.
5. In Planned Failover, confirm that Start the Replica virtual machine after failover
is selected, and then click Fail Over.
Note: The Planned Failover error displays because the virtual machine is not
prepared for planned failover.
6. In Planned Failover, click Close, and then click Cancel.
7. On LON-TESTx, press the Windows key+X, click Shut down or sign out, click
Shut down and then click Continue.
8. In Hyper-V Manager, right-click LON-TESTx, click Replication, and then click
Planned Failover.
9. In Planned Failover, confirm that Start the Replica virtual machine after failover
is selected, and then click Fail Over.
10. In Hyper-V Manager, in the navigation pane, click LON-HOST0y. Confirm that
LON-TESTx is in the Running state.
11. Double-click LON-TESTx, and sign in as Administrator with the password
Pa$$w0rd.
12. On LON-TESTx, confirm that a folder named Current State displays on the
desktop.
Note: With planned failover, all changes from the primary virtual machine are
replicated.
13. Right-click the desktop, click New, click Folder, and then name the folder
Planned Failover.
14. In Hyper-V Manager, LON-TESTx, click Replication, and then click Reverse
Replication.
15. In the Reverse Replication Wizard for LON-TESTx, click Next five times, and then
click Finish.
16. On LON-TESTx, press the Windows key+X, click Shut down or sign out, click
Shut down and then click Continue.
17. In Hyper-V Manager, verify that LON-TESTx is in the Off state.
18. Right-click LON-TESTx, click Replication, and then click Planned Failover.
19. In Planned Failover, confirm that Start the Replica virtual machine after failover
is selected, and then click Fail Over.
20. In Hyper-V Manager, in the navigation pane, click LON-HOST0x. Confirm that
the LON-TESTx state is Running.
21. In Hyper-V Manager, double-click LON-TESTx. Verify that a virtual machine
connection to LON-TESTx opens.
22. On LON-TESTx, sign in as Administrator with the password Pa$$w0rd.
23. On LON-TESTx, confirm that two folders named Current State and Planned
Failover display on the desktop.
24. In Hyper-V Manager, right-click LON-TESTx, select Replication and then select
Remove Replication. In the Remove Replication dialog box, click Remove
Replication.
25. In Hyper-V Manager, in the navigation pane, click LON-HOST0y. Right-click LON-
TESTx, select Delete and in the Delete Selected Virtual Machine dialog box,
select Delete.
26. In Hyper-V Manager, in the navigation pane, click LON-HOST0x.
Results: After completing this exercise, you should have configured and managed
Hyper-V Replica.