Labs Srv02

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

GRUPO 1 GRUPO 2

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.

The main tasks for this exercise are as follows:

1. Verify that the LON-HVx computer does not have the Hyper-V role installed.

2. Install the Hyper-V role by using Server Manager.

3. Install the Hyper-V role by using Windows PowerShell (optional)

4. Verify that the Hyper-V role was installed successfully

 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.

8. In the Windows PowerShell window, run the following cmdlet:


Get-WindowsFeature *Hyper*
9. Verify that the output shows that neither Hyper-V nor Hyper-V Management Tools
are installed.
10. In Windows PowerShell, run the following cmdlet:
Get-Command –Module Hyper-V
11. Verify that no cmdlet is listed.

12. In Windows PowerShell, run the following cmdlet:


bcdedit.exe
13. Verify that in the output, in the Windows Boot Loader section, there is no line with
hypervisorlaunchtype Auto.
14. Minimize the Windows PowerShell window.
15. Open the Start screen, and search for programs that contain the word hyper. Confirm
that no program is found.

 Task 2: Install the Hyper-V role by using Server Manager


1. On LON-HVx, on the desktop, on the taskbar, click Server Manager.
2. In Server Manager, in the menu bar, click Manage, and then click Add Roles and
Features.
3. In the Add Roles and Features Wizard, on the Before you begin page, click Next.
4. On the Select installation type page, ensure that the Role-based or feature-based
installation option is selected, and then click Next.
5. On the Select destination server page, ensure that Select a server from the server
pool is selected, and then click Next.
6. On the Select server roles page, in the Roles section, click Hyper-V.

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.

 Task 3: Install the Hyper-V role by using Windows PowerShell


1. On LON-HVx, on the desktop, on the taskbar, click the Windows PowerShell icon.
2. In Windows PowerShell, run the following cmdlet:
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
3. Wait until LON-HVx restarts, and then sign in with the user name
ADATUN\Administrator and password Pa$$w0rd

 Task 4: Verify that the Hyper-V role was installed successfully


1. Verify that the Hyper-V role is installed on LON-HVx.
2. On LON-HVx, in Server Manager, in the menu bar, click Manage, and then click
Remove Roles and Features.
3. In the Remove Roles and Features Wizard, on the Before you begin page, 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 Remove server roles page, verify that in the Roles section Hyper-V is
selected (which indicates that the role is installed).
6. Click Cancel to close the Remove Roles and Features Wizard.
7. Close Server Manager.
8. On LON-HVx, on the desktop, on the taskbar, click the Windows PowerShell icon.
9. In Windows PowerShell, run the following cmdlet:
Get-WindowsFeature *Hyper*
Note: The output shows that both Hyper-V and Hyper-V Management Tools are
installed.
10. In Windows PowerShell, run the following cmdlet:
Get-Command –Module Hyper-V
Note: The output returns many cmdlets, which confirms that the Hyper-V module is
installed and available.
11. In Windows PowerShell, run the following command:
bcdedit.exe
12. Verify that in the output, in the Windows Boot Loader section, there is a
hypervisorlaunchtype Auto line.
13. Ensure that hypervisorlaunchtype Auto displays in the Windows Boot Loader
section.
14. Minimize Windows PowerShell.
15. Open the Start screen, and search for programs that contain the word hyper.
Confirm that two programs are discovered: Hyper-V Manager, and Hyper-V Virtual
Machine Connection.
16. On the Start screen, click the Control Panel tile.
17. In Control Panel, in the Search text box, type services, and then click View local
services.
18. In the Services window, verify that multiple services that start with the word Hyper-
V display.
Note: Hyper-V Virtual Machine Management service is one of services that display
in the Services window, and the status of this service is Running
19. Close the Services window and the Services - Control Panel window.

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.

The main tasks for this exercise are as follows:

1. Create a network share for storing virtual machines.

2. Configure a virtual hard disk location.

3. Configure Hyper-V settings by using Windows PowerShell and Hyper-V Manager

 Task 1: Create a network share for storing virtual machines

Note: Complete the following task on both LON-HOST01 and LON-HOST02.


1. On LON-HOST0x, on the taskbar, click Server Manager.

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.

8. On the Specify permissions to control access page, click Customize permissions.

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.

11. On the Confirm selections page, click Create.

12. On the View results page, click Close.

13. Minimize Server Manager.

 Task 2: Configure a virtual hard disk location

Note: Complete the following task on both LON-HOST01 and LON-HOST02.


1. On LON-HOST0x, start Hyper-V Manager.

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:

Set-VMHost -VirtualHardDiskPath \\LON-HOST0y\VHDs


16. In Hyper-V Manager, in the Actions pane, click Hyper-V Settings, and verify that
\\LON-HOST0y\VHDs is specified as the Virtual Hard Disk location.

 Task 3: Configure Hyper-V settings by using Windows PowerShell and Hyper-V


Manager
Note: Complete the following task on both LON-HOST01 and LON-HOST02.
1. In Hyper-V Manager, in the Actions pane, click Hyper-V Settings.

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.

7. Minimize Hyper-V Manager.


8. On LON-HOST0x, on the taskbar, click the Windows PowerShell icon.

9. In Windows PowerShell, run the following cmdlets, where y is number of your


partner host. Press Enter at the end of each line:
Set-VMHost –VirtualMachinePath \\LON-HOST0y\VHDs\
Set-VMHost -NumaSpanningEnabled $false
Set-VMHost -MaximumStorageMigrations 4
Set-VMHost -EnableEnhancedSessionMode $true
Note: You can ignore the message that states that you must restart the Hyper-V
Virtual Machine Management Service to apply the NUMA Spanning
configuration.
10. Maximize Hyper-V Manager, and in the Actions pane, click Hyper-V Settings.
11. On the Hyper-V Settings for LON-HOST0x page, click Virtual Machines, and
verify that \\LON-HOST0y\VHDs is specified as the Virtual Machine location.

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:

1. Turn on the Hyper-V Management Tools feature.


2. Connect to the Hyper-V host and manage it remotely

 Task 1: Turn on the Hyper-V Management Tools feature

Note: Complete the following task on both LON-HOST01 and LON-HOST02.

1. On LON-HOST0x, in Hyper-V Manager, start and connect to LON-CL0x.


2. Sign in to LON-CL0x with the user name ADATUN\Administrator and the password
Pa$$w0rd.
3. On LON-CL0x, on the Start screen, search for programs that contain the word hyper.
Confirm that no program is found.
4. On the Start screen, search for and start Windows PowerShell.
5. In Windows PowerShell, run the following cmdlet:
Get-Command –Module Hyper-V
6. Verify that no cmdlet is listed, and then minimize the Windows PowerShell window.
7. On LON-CL0x, on the Start screen, search for and then click Turn Windows features
on or off.
8. In the Windows Features window, expand the Hyper-V node, click Hyper-V
Management Tools, and then click OK.
9. Wait until the Windows operating system completes its required changes, and then
click Close.
10. Maximize the Windows PowerShell window, and again run the following cmdlet:
Get-Command –Module Hyper-V
Note: This time many cmdlets display, because the Hyper-V module is now
installed.
11. Minimize the Windows PowerShell window.

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.

 Task 2: Connect to the Hyper-V host and manage it remotely

Note: Complete the following task on both LON-HOST01 and LON-HOST02.


1. On LON-CL0x, on the Start screen, type Hyper-V, and then click Hyper-V
Manager.
2. In Hyper-V Manager, in the navigation pane, right-click Hyper-V Manager, and
then click Connect to Server.
3. In the Select Computer dialog box, click Browse, in the Enter the object name to
select text box, type LON-HOST0x, and then click OK twice.
4. Verify that LON-HOST0x now displays in the Hyper-V Manager navigation pane.

5. In Hyper-V Manager, click Hyper-V Settings.

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.

8. On the desktop, on the taskbar, click the Windows PowerShell icon.

9. In Windows PowerShell, run the following command:


Get-VMHost –ComputerName LON-HOST0x | fl
Note: The output displays the Hyper-V settings for LON-HOST0x.
10. In Windows PowerShell, run the following cmdlet:
Set-VMHost –ComputerName LON-HOST0x -MaximumStorageMigrations 3
11. Switch to Hyper-V Manager.

12. In Hyper-V Manager, right-click LON-HOST0x, and then click Refresh.

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.

15. Close Hyper-V Manager.

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.

The main tasks for this exercise are as follows:


1. Create virtual hard disks.
2. Explore different virtual hard disk types.
3. Manage virtual hard disks.
 Task 1: Create virtual hard disks
1. On LON-HOST0x, on the taskbar, click the Windows PowerShell icon.
2. In Windows PowerShell, run the following cmdlets:
Set-VMHost -VirtualHardDiskPath C:\Shares\VHDs
Set-VMHost –VirtualMachinePath C:\Shares

3. On LON-HOST0x, open Hyper-V Manager.

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.

6. On the Choose Disk Format page, confirm that VHDX is selected.


Note: This is the default disk format on Windows Server 2012 and newer.
7. Click VHD, and then 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.

24. On LON-HOST0x, on the taskbar, click the Windows PowerShell icon.

25. In Windows PowerShell, create a fixed-size virtual hard disk by running the
following cmdlet:

New-VHD –Path C:\Shares\VHDs\Fixed.vhdx -SizeBytes 1GB –Fixed

 Task 2: Explore different virtual hard disk types


1. On LON-HOST0x, on the taskbar, click File Explorer.
2. In the This PC window, browse to the C:\Shares\VHDs folder.

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:

Add-VMHardDiskDrive –VMName LON-CL0x –ControllerType SCSI –Path


C:\Shares\VHDs\Dynamic.vhdx
Add-VMHardDiskDrive –VMName LON-CL0x –ControllerType SCSI –Path
C:\Shares\VHDs\Differencing.vhd

11. On LON-HOST0x, in Hyper-V Manager, double-click LON-CL0x.

12. On LON-CL0x, on the desktop, click File Explorer.

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.

8. In Hyper-V Manager, in the Actions pane, click Edit Disk.

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.

15. On LON-CL0x, in Computer Management, right-click Disk Management, and then


click Refresh. Confirm that Disk 1 and Disk 2 have expanded, and now have 1 GB
and 100 GB of unallocated space. Notice that Hyper-V expanded the virtual hard
disks while the virtual machine was running.

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:

Remove-VMHardDiskDrive –VMName LON-CL0x –ControllerType SCSI –


ControllerNumber 0 –ControllerLocation 1
Remove-VMHardDiskDrive –VMName LON-CL0x –ControllerType SCSI –
ControllerNumber 0 –ControllerLocation 2

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.

28. On LON-HOST0x, in File Explorer, browse to C:\Shares\VHDs.

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.

Exercise 2: Creating and Managing Virtual Machines


Scenario
You were asked to create and demonstrate the differences between Generation 1 and Generation
2 virtual machines. You first will create the virtual machines by using different administrative tools,
and then you will review this configuration and modify it. You will also explore how to enable
dynamic memory and how virtual machines use it. You will also see how to configure storage for
QoS. In the last task, you will configure Integration Services for virtual machines and explore how
the time synchronization service works.
The main tasks for this exercise are as follows:
1. Create virtual machines.
2. Manage virtual machines.
3. Work with dynamic memory.
4. Configure Integration Services.
 Task 1: Create virtual machines
1. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click New, and then
click Virtual Machine.
2. In the New Virtual Machine Wizard, on the Before You Begin page, click Next.
3. On the Specify Name and Location page, in the Name field, type LON-VM2, and
then click Next.
4. On the Specify Generation page, click Generation 2, and then click Next.

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:

New-VM –Name LON-VM1 –MemoryStartupBytes 1GB –Generation 1 –


BootDevice IDE Add-VMHardDiskDrive –VMName LON-VM1 –ControllerType
IDE –Path C:\Shares\VHDs\Differencing.vhd

 Task 2: Manage virtual machines


1. On LON-HOST0x, in Hyper-V Manager, right-click the LON-VM2 virtual
machine, and then click Settings.
2. In Settings for LON-VM2, in the Add Hardware section, in the details pane,
confirm that three types of hardware display. Confirm also that in the left pane, in
the Hardware section, no BIOS, IDE Controllers, COM ports, or Diskette Drive
display, but Firmware does display.
3. In the Hardware section, click Firmware, and then confirm that Enable Secure
Boot is enabled.
4. In the Boot order section, click Hard Drive, click the Move Up icon to set Hard
Drive as the first boot device, and then click OK.
5. In Hyper-V Manager, right-click the LON-VM1 virtual machine, and then click
Settings.
6. In Settings for LON-VM1, in the Add Hardware section, in the details pane,
confirm that five types of hardware display. In the left pane, in the Hardware
section, confirm also that BIOS, IDE Controllers, COM ports, and Diskette Drive
display, but Firmware does not display.
7. Click BIOS, confirm that you can change Startup order, but that no Enable Secure
Boot option exists.
8. Click Memory, and then confirm that Enable Dynamic Memory is not selected.
9. In the left pane, in the Hardware section, confirm that a single Network Adapter
displays, and then click OK.
10. On LON-HOST0x, in Windows PowerShell, enable dynamic memory, and then
add a network adapter to the LON-VM1 virtual machine by running the following
cmdlets:
Set-VM –Name LON-VM1 –DynamicMemory Add-VMNetworkAdapter –VMName
LON-VM1

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.

5. In Windows PowerShell, type the following two commands to allocate additional


memory:
cd C:\LabFiles\
.\TestLimit64.exe –d 1024 –c 1
6. On LON-HOST0x, in Hyper-V Manager, make note of the currently Assigned
Memory for the LON-CL0x virtual machine, and then confirm that LON-CL0x is
now using more memory.
7. In LON-CL0x, close 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:

Enable-VMIntegrationService –VMName LON-CL0x –Name “Time


Synchronization”
16. In LON-CL0x, at the command prompt, run the Time command again, and then
confirm that the time on the virtual machine is synchronized with the time on LON-
HOST0x.

Results: After completing this exercise, you should have created and managed
virtual machines.

Lab B: Creating and Managing Checkpoints and Monitoring Hyper-V


Exercise 1: Importing Virtual Machines and Working with Checkpoints
Scenario
Your colleague has heard about the enhanced session mode when connecting to a virtual
machine, buthe has never seen it. You want to demonstrate to your colleague how to configure it,
use it, and show thebenefits of the enhanced session mode.
You are aware that you should avoid using checkpoints in the production environment, but you
want to test them for use in training and explore how to implement checkpoints at the file level.
You would also like to see how a virtual machine can detect whether a checkpoint was applied.
The main tasks for this exercise are as follows:
1. Import a virtual machine.
2. Use enhanced session mode.
3. Create checkpoints.
4. Manage checkpoints.
5. Explore Generation ID.
 Task 1: Import a virtual machine
1. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click Import Virtual
Machine.
2. In the Import Virtual Machine window, on the Before You Begin page, click Next.
3. On the Locate Folder page, type C:\VMEXPORT\LON-EXPORT\, and then click
Next.
4. On the Select Virtual Machine page, confirm that LON-EXPORT is selected, and
then click Next.
5. On the Choose Import Type page, confirm that Register the virtual machine in-
place (use the existing unique ID) is selected, and then click Next.
6. On the Configure Processor page, in Number of virtual processors field, type 1,
and then click Next.
Note: This page shows only if a virtual machine is configured with more
processors than are available on the Hyper-V host.
7. On the Connect Network page, select External Network as the virtual switch to
which you want virtual machine to be connected, and then click Next.
Note: This page shows only if the virtual machine is configured to use a virtual
switch, which is not available on the Hyper-V host.
8. On the Completing Import Wizard page, click Finish.
9. When the error message “Hyper-V encountered an error during the import
operation” displays, click See details, and notice that this is because a parent
virtual hard disk was not found. Click Close.
10. In Hyper-V Manager, in the Actions pane, click Edit Disk.
11. In the Edit Virtual Hard Disk Wizard, on the Before You Begin page, click Next.
12. On the Locate Folder page, type C:\VirtualMachines\LON-EXPORT\Virtual Hard
Disks\LON-EXPORT.vhd, and then click Next.
13. On the Reconnect Virtual Hard Disk page, click Next.
14. On the Reconnect to Parent Virtual Hard Disk page, type
C:\CURSO\BaseVHD\Base_Win10G1.vhd, and then click Next.
15. On the Completing the Edit Virtual Hard Disk Wizard page, click Finish.
16. In Hyper-V Manager, in the Actions pane, click Import Virtual Machine.
17. In the Import Virtual Machine window, on Before You Begin page, click Next.
18. On the Locate Folder page, type C:\VMEXPORT\LON-EXPORT\, and then click
Next.
19. On the Select Virtual Machine Import Virtual Machine page, confirm that LON-
EXPORT is selected, and then click Next.
20. On the Choose Import Type page, confirm that Register the virtual machine in-
place (use the existing unique ID) is selected, and then click Next.
21. On the Completing Import Wizard page, click Finish.
22. In Hyper-V Manager, right-click LON-EXPORT, and then click Settings.
23. In Settings for LON-EXPORT on LON-HOST0x, confirm that LON-EXPORT is
configured with a single virtual processor and that it is connected to virtual switch
named External Network, and then click OK.
 Task 2: Use enhanced session mode
1. On LON-HOST0x, in File Explorer, browse to C:\Windows, and then double-click
Win.ini.
2. In Notepad, copy a few lines of text to the Clipboard by pressing Ctrl+C, and then
close Notepad.
3. On LON-CL0x, open Notepad.
4. In Notepad, from the menu bar, click Edit, and then confirm that the Paste option
is not available.
5. In Virtual Machine Connection to LON-CL0x, in the Clipboard menu, click Type
clipboard text. Confirm that the text that you copied from the Win.ini file is typed.
Close the LON-CL0x window.
Note: Without enhanced session mode being enabled, this is the only way to
copy content to virtual machines, and it works only for text.
6. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click Hyper-V
Settings.
7. In Hyper-V Settings, on the left side, in the Server section, click Enhanced
Session Mode Policy, in the details pane, click Allow enhanced session mode,
and then click OK.
8. In Hyper-V Manager, right-click LON-CL0x, and then click Connect.
9. In the Connect to LON-CL0x window, click Show Options, click the Local
Resources tab, in the Local devices and resources section, click More, click
Drives, and then click OK.
10. In the Connect to LON-CL0x window, click Connect. Confirm that you are not
automatically signed in to LON-CL0x.
11. In LON-CL0x, click ADATUN\administrator, in the Password field, type
Pa$$w0rd, and then press Enter. Your previous session, including an opened
Notepad, displays.
12. In Notepad, on the menu bar, click Edit, and then click Paste. Verify that the copied
text from the Win.ini file is pasted.
13. Close Notepad, and when prompted, click Don’t Save.
14. On LON-HOST0x, in File Explorer, browse to C:\Windows, right-click Write.exe,
and then click Copy.
15. On LON-CL0x, right-click the desktop, and then click Paste. Confirm that file
Write.exe is copied to the LON-CL0x desktop.
Note: When enhanced session mode is used, you can copy and paste files
between a virtual machine and a Hyper-V host even if the virtual machine does
not have network connectivity.
16. On LON-CL0x, on the taskbar, click File Explorer. Confirm that in the navigation
pane, drives from LON-HOST0x are mapped to the virtual machine.
17. In the navigation pane, right-click This PC, and then click Properties.
18. In the System window, click Remote Settings. Confirm that in the Remote Desktop
section, Don’t allow remote connections to this computer is selected.
19. Click OK, and then close the System window.
20. In the Virtual Machine Connection to LON-CL0x window, in the Action menu, click
Turn Off, and then click Turn Off.
21. Close Virtual Machine Connection.
22. On LON-HOST0x, in Hyper-V Manager, double-click the LON-CL0x virtual
machine.
23. In Virtual Machine Connection, in the Action menu, click Start.
24. Confirm that LON-CL0x is starting.
Note: Because Integration Services are not available during system start,
enhanced session mode is not used during that time. However, after the system
starts, the Connect to LON-CL0x window displays, and you can configure
enhanced session mode properties.
25. On LON-HOST0x, in Hyper-V Manager, in the Actions pane, click Hyper-V
Settings.
26. In Hyper-V settings, on the left side, in the Server section, click Enhanced
Session Mode Policy.
27. In the details pane, clear the Allow enhanced session mode check box, and then
click OK.

 Task 3: Create checkpoints


1. On LON-HOST0x, in Hyper-V Manager, right-click LON-VM1, and then click
Settings.
2. In Settings for LON-VM1, under IDE Controller 0, click Hard Drive, confirm that it
is using the Differencing.vhd virtual hard disk that you created earlier, and then
click OK.
3. In Hyper-V Manager, right-click LON-VM1, and then click Checkpoint. Confirm
in the Checkpoints pane that a checkpoint is added.
4. In Hyper-V Manager, right-click LON-VM1, and then click Start.

5. In Hyper-V Manager, right-click LON-VM1, and then click Settings.

6. Confirm that under IDE Controller 0, Hard Drive is now using a file with a GUID in
its name, and then click OK.

Note: This is a differencing disk, which was created by the checkpoint.


7. In Hyper-V Manager, double-click LON-VM1.

8. Complete the setup by clicking Next, and then clicking I accept.

9. On the Settings page, enter Pa$$w0rd in Password and Reenter Password


fields, and then click Finish.
10. Sign in as Administrator by using the password Pa$$w0rd.

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.

17. In Windows PowerShell, create a checkpoint for LON-VM1 by running the


following cmdlet:
Checkpoint-VM –Name LON-VM1 –SnapshotName Folder3
18. View the existing checkpoints for LON-VM1 by running the following cmdlet in
Windows PowerShell:
Get-VMSnapshot –VMName LON-VM1
19. In Hyper-V Manager, confirm that all four checkpoints for LON-VM1 display.

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.

6. In the LON-VM1 folder, confirm that there is no Snapshots subfolder.

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.

11. In File Explorer, browse to C:\Exported.

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.

15. On LON-HOST0x, in Windows PowerShell, apply the Folder3 checkpoint to LON-


VM1 by running the following cmdlet, and then clicking Y when prompted:
Restore-VMSnapshot –Name Folder3 –VMName LON-VM1
16. On LON-VM1, on the desktop, confirm that there are three folders named Folder1,
Folder2, and Folder3.
17. In Hyper-V Manager, right-click the Folder2 checkpoint, and then click Settings.

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.

 Task 5: Explore Generation ID


1. On LON-HOST0x, on LON-VM1, in Control Panel search Computer Management.

2. In Computer Management, in the navigation pane, click Device Manager.

3. In Device Manager, in the details pane, expand System devices, and then confirm
that the Microsoft Hyper-V Generation Counter device is present.

Note: This is how a virtual machine presents Generation ID to the operating


system.
4. Close Computer Management.

5. Turn off LON-VM1.


Results: After completing this exercise, you should have imported virtual machines and
worked with checkpoints.
Exercise 2: Monitoring Hyper-V

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.

3. Sign in to LON-CL0x as ADATUN\Administrator with the password Pa$$w0rd and


click Desktop on the Start screen.

4. On LON-CL0x, right-click the taskbar, and then click Task Manager.

5. In Task Manager, click More Details, and then click the Performance tab.

6. On LON-CL0x, open Windows PowerShell.

7. Run the following: C:\LabFiles\Cpustres.exe

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.

 Task 2: Use Performance Monitor to monitor Hyper-V performance


1. On LON-HOST0x, in Server Manager, on the Tools menu, click Performance
Monitor.
2. In Performance Monitor, in the navigation pane, click Performance Monitor.

3. In the details pane, on the toolbar, click Add.

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.

12. On LON-HOST0x, close Performance Monitor, Resource Monitor, and Task


Manager.
13. In Hyper-V Manager, right-click LON-CL0x, and then click Settings.

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.

 Task 3: Use Resource Metering


1. On LON-HOST0x, in Windows PowerShell, run the following cmdlet to view if
resource metering is enabled for LON-CL0x:
Get-VM LON-CL0x | Select Name, Status, ResourceMeteringEnabled
2. Run the following cmdlet to enable resource metering for LON-CL0x:
Get-VM LON-CL0x | Enable-VMResourceMetering
3. View resource metering data for LON-CL0x by running the following cmdlet:
Get-VM LON-CL0x | Measure-VM
4. On LON-CL0x, in Windows PowerShell, run the following command:
C:\LabFiles\Cpustres.exe
5. In CPU Stress, set Process Priority Class to High. In the Thread 1 section, set
Thread Priority to Highest, and then set Activity to Busy.
6. In Windows PowerShell, run the following command:
C:\LabFiles\TestLimit64.exe –d 1024 –c 2
7. On LON-HOST0x, in Windows PowerShell, run the following cmdlet to view
resource metering data for LON-CL0x:
Get-VM LON-CL0x | Measure-VM
8. Compare the result with previous results, and then notice the increased use of
AvgRAM(M) and AvgCPU(MHz).
9. On LON-CL0x, close CPU Stress.

10. On LON-HOST0x, in Windows PowerShell, run the following cmdlet to disable


NL ST

resource metering for LON-CL0x:


Get-VM LON-CL0x | Disable-VMResourceMetering

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

 Task 1: Verify current Hyper-V network configuration


1. On LON-HOST0x, start Hyper-V Manager.

2. In Hyper-V Manager, in the Actions pane, click Virtual Switch Manager.

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.

5. Minimize Hyper-V Manager.

6. On LON-HOST0x, on the Start screen, click the Control Panel tile.

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.

2. In Hyper-V Manager, in the Actions pane, click Virtual Switch 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.

10. In the Apply Networking Changes dialog box, click Yes.

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.

26. in the Windows PowerShell window, run the following cmdlet:


Get-VMNetworkAdapter –All
27. Confirm that no network connection was added when you created the private
virtual switch.
28. Maximize Hyper-V Manager, and in the Actions pane, click Virtual Switch
Manager.
29. In Virtual Switch Manager for LON-HOST0x, expand the External Network virtual
switch, and then click Extensions.
30. In Virtual Switch Manager for LON-HOST0x, verify that in the right pane, two switch
extensions display. Verify that Microsoft NDIS Capture is not enabled, whereas
Microsoft Windows Filtering Platform is enabled.
31. Expand both the Internal Switch and the Private Switch, and confirm that they
have the same extensions available as the External virtual switch, and that they
are configured the same.
32. Click Cancel, and then minimize both Hyper-V Manager and Windows PowerShell.
 Task 3: Use Hyper-V virtual switches
1. On LON-HOST0x, maximize Hyper-V Manager.
2. In Hyper-V Manager, right-click LON-PRODx, and then click Settings.
3. In Settings for LON-PRODx, in the left pane, click Network Adapter, in the Virtual
Switch drop-down list box, click Private Switch, and then click OK.
4. In Hyper-V Manager, right-click LON-TESTx, and then click Settings.

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.

7. In Windows PowerShell, run the following command:


ipconfig
8. Confirm that LON-PRODx has an IPv4 address of 10.0.0.x5, (where x is 1 if you
are using LON-HOST01, and x is 2 if you are using LON-HOST02).
9. In Windows PowerShell, run the following command:
ping 10.0.0.x6
10. Confirm that four replies are returned.
Note: LON-TESTx has IP address 10.0.0.x6.
11. On LON-HOST0x, in Hyper-V Manager, right-click LON-PRODx, and then click
Settings.
12. In Settings for LON-PRODx, in the left pane, click Network Adapter, in the Virtual
Switch drop-down list box, click Internal Switch, and then click OK.
13. On LON-PRODx, in Windows PowerShell, run the following command:
ping 10.0.0.x6
14. Confirm that this time the destination host is unreachable.
Note: This is because LON-PRODx is connected on a different virtual switch than
LON-TESTx.
15. On LON-HOST0x, maximize the Windows PowerShell window, and run the
following command:
ping 10.0.0.x5
16. Confirm that the destination host is unreachable.
Note: This is because the virtual network adapter in LON-HOST0x that is
connected to the Internal switch does not have an IP address from the same
subnet as LON-PRODx.
17. On LON-HOST0x, maximize the Network Connections window.

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.

30. On LON-HOST0x, in Windows PowerShell, run the following command:


ping <IP address of LON-PRODx>
31. Confirm that four replies are returned, which confirms that LON-HOST0x and LON-
PRODx have network connectivity.
32. On LON-PRODx, in Windows PowerShell, run the following command:
ping LON-DC1
33. Confirm that four replies are returned, which confirms that LON-DC1 and LON-
PRODx have network connectivity.
Results: After completing this exercise, you should have created and used Hyper-V
virtual switches.

Module 4: Virtual Machine Movement and Hyper-V Replica


Lab A: Moving Virtual Machine
Exercise 1: Moving Hyper-V Storage and Virtual Machines
Scenario
To balance the number of virtual machines running on both the existing hosts and the new hosts,
you need to move a virtual machine between Hyper-V hosts as it is running, and without
downtime. First, you will configure a destination Hyper-V host to allow live migration. Next, you
will move virtual machine storage, its virtual hard disk, and its checkpoints, to the Hyper-V host
of your partner, first by using the Move Wizard, and then by using Windows PowerShell cmdlets.
You will also move the running Windows 10 virtual machine LON-PRODx, and confirm that it has
network connectivity the entire time during the move operation. When you initiate the move
operation remotely, you must allow the Hyper-V host to act on your behalf on the destination
Hyper-V host, so you will also configure constrained delegation. After that, you will use the
Move-VM cmdlet to move the virtual machine from the Hyper-V host that your partner is using.
The main tasks for this exercise are as follows:
1. Move virtual machine storage by using the Move Wizard.
2. Move virtual machine storage by using Windows PowerShell.
3. Configure Hyper-V host for live migration.
4. Move a virtual machine by using Live Migration.
5. Run live migration from Windows PowerShell.

 Task 1: Move virtual machine storage by using the Move Wizard


1. On LON-HOST0x, in Hyper-V Manager, start LON-MOVE1, right-click LON-
MOVE1, and then click Settings.
2. In Settings for LON-MOVE1, under SCSI Controller 0, click Hard Drive. Confirm
that it is using the LON-MOVE1.vhdx VHD that is stored locally, and then click OK.
3. In Hyper-V Manager, right-click LON-MOVE1, and then click Move.

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.

10. In Hyper-V Manager, right-click LON-MOVE1, and then click Settings.


11. In Settings for LON-MOVE1, under SCSI Controller 0, click Hard Drive. Confirm
that LON-MOVE1.vhdx is stored on a network share.

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.

 Task 2: Move virtual machine storage by using Windows PowerShell


1. On LON-HOST0x, in Hyper-V Manager, start LON-MOVE2, right-click LON-
MOVE2, and then click Settings.
2. In Settings for LON-MOVE2, under IDE Controller 0, click Hard Drive.

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.

 Task 3: Configure Hyper-V host for live migration


1. On LON-HOST0x, in Hyper-V Manager, right-click LON-PRODx, and then click
Move.
2. In the Move “LON-PRODx” Wizard, on the Before You Begin page, click Next.

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.

6. In Hyper-V Manager, in the Actions pane, click Hyper-V Settings.

7. In Hyper-V Settings, in the left pane, click Live Migrations.

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.

15. In Hyper-V Manager, right-click LON-PRODx, and then click Settings.

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.

5. In Hyper-V Manager, right-click LON-PRODx, and then click Settings.

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.

Lab B: Configuring and Using Hyper-V Replica


Exercise 1: Configuring and Managing Hyper-V Replica
Scenario
Your company has set up a disaster recovery location, and you need to configure virtualization infrastructure to
replicate virtual machines to that location. To perform this task, you will use Hyper-V Replica in this exercise. You will
first configure a remote Hyper-V host to allow incoming replication. Then you will configure replication of the LON-
TESTx virtual machine, explore new settings that you can configure, and test the effect of those settings. You will also
perform test failover and planned failover, to ensure that test failover does not interrupt the replication process, and
that during planned failover no modifications in virtual machine are lost. As one of the steps, you will also monitor
Replication Health.
The main tasks for this exercise are as follows:
1. Configure Hyper-V host for incoming replication.
2. Enable virtual machine replication.
3. Test Hyper-V Replica failover.
4. Perform a planned failover.

 Task 1: Configure Hyper-V host for incoming replication


1. On LON-HOST0x, in Hyper-V Manager, in the navigation pane, click LON-
HOST0y.
2. In Hyper-V Manager, in the Actions pane, click Hyper-V Settings.
3. In Hyper-V Settings for LON-HOST0y, in the left pane, click Replication
Configuration. In the right pane, in the Replication Configuration section, click both
Enable this computer as a Replica server, and Use Kerberos (HTTP).
4. Select Allow replication from any authenticated server.

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.

7. On the Start screen, search for and start mmc.

8. In Console1, in the File menu, click Add/Remove Snap-in.

9. In Add or Remove Snap-ins, click Windows Firewall with Advanced Security.


In the Available Snap-ins section, click Add, and then click Another computer. In
the Another computer text box, type LON-HOST0y, click Finish, and then click
OK.
10. In Console1, in the navigation pane, expand Windows Firewall with Advanced
Security, and then click Inbound Rules.
11. In the details pane, right-click Hyper-V Replica HTTP Listener (TCP In), and then
click Enable Rule.
12. Close Console1, and in the Microsoft Management dialog box, click No.

 Task 2: Enable virtual machine replication


1. On LON-HOST0x, in Hyper-V Manager, right-click LON-TESTx, and then click
Settings.
2. In LON-TESTx Settings, in the navigation pane on the left, expand Network
Adapter, and confirm that the two nodes Hardware Acceleration and Advanced
Features display.
3. In LON-TESTx Settings, in the navigation pane, confirm that there are six settings
in the Management section, and that Replication is not one of available settings,
and then click OK.
4. In LON-TESTx, open a Command Prompt window, and confirm that the virtual
machine has an IPv4 address of 10.0.0.x6.
5. In Hyper-V Manager, right-click LON-TESTx, and then click Enable Replication.

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.

14. In Hyper-V Manager, in the navigation pane, click LON-HOST0y.


15. Confirm that LON-TESTx is one of the virtual machines on LON-HOST0y, and that
it is in the Off state.
16. In Hyper-V Manager, right-click LON-TESTx, click Replication, and then click View
Replication Health.
17. In Replication Health for “LON-TESTx”, review Replication Health.
Note: Because initial replication is most likely not yet completed, the, Replication
Health is in the Warning state.
18. In Replication Health for “LON-TESTx”, click Close.

19. In Hyper-V Manager, right-click LON-TESTx, and then click Settings.

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.

9. In Settings for LON-TESTx, click Network Adapter, confirm that it is connected to


Private Switch, and then click OK.
10. In Hyper-V Manager, right-click LON-TESTx – Test, and then click Start.
11. Double-click LON-TESTx -Test. Verify that the virtual machine connection to LON-
TESTx – Test opens.
12. On LON-TESTx - Test, sign in as Administrator with the password Pa$$w0rd. Click
Cancel in Shutdown Event Tracker.
13. On LON-TESTx - Test, on the Start screen, search for and open Command
Prompt.
14. In the Command Prompt window, type ipconfig, and then press Enter.

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.

18. In Virtual Machine Connection, click Exit.

19. Confirm that both the LON-TESTx – Test virtual machine and the LON-TESTx
virtual machine checkpoint have been deleted.

 Task 4: Perform a planned failover


1. On LON-HOST0x, in Hyper-V Manager, in the navigation pane, click LON-
HOST0x.
2. In Hyper-V Manager, double click LON-TESTx.

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.

You might also like