0% found this document useful (0 votes)
171 views9 pages

Hyper-V Failover Clustering Guide

The document provides instructions for configuring failover clustering with Windows Server 2016 Hyper-V. It describes setting up two physical hosts (LON-HOST2) with nested virtualization. Virtual machines including two nested hosts (LON-NVHOST3 and LON-NVHOST4) and a domain controller (LON-DC1-C) are configured. Storage is configured via iSCSI from the domain controller. Failover clustering is then installed and configured between the two nested hosts to enable high availability of virtual machines.

Uploaded by

lucas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views9 pages

Hyper-V Failover Clustering Guide

The document provides instructions for configuring failover clustering with Windows Server 2016 Hyper-V. It describes setting up two physical hosts (LON-HOST2) with nested virtualization. Virtual machines including two nested hosts (LON-NVHOST3 and LON-NVHOST4) and a domain controller (LON-DC1-C) are configured. Storage is configured via iSCSI from the domain controller. Failover clustering is then installed and configured between the two nested hosts to enable high availability of virtual machines.

Uploaded by

lucas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 9

[20740C] Module 09: Implementing Failover Clustering with Windows Server 2016

Hyper-V
1. Lab: Implementing failover clustering with Windows Server 2016 Hyper-V
Scenario:

The initial deployment of VMs on Hyper-V has been successful for Adatum
Corporation. As a next step in VM deployment, Adatum is considering ways to ensure
that the services and applications deployed on the VMs are highly available. As
part of the implementation of high availability for most network services and
applications, Adatum is also considering options for making the VMs that run on
Hyper-V highly available.

As one of the senior network administrators at Adatum, you are responsible for
integrating Hyper-V with failover clustering to ensure that the VMs deployed on
Hyper-V are highly available. You are responsible for planning the VM and storage
configuration, and for implementing the VMs as highly available services on the
failover cluster. You have limited hardware; so, to facilitate testing before
implementation in your production environment, you will enable nested
virtualization to test clustering two Hyper-V Hosts.

Next Exercise

2. Exercise 1: Configuring virtual environment


Task 1: Configure physical host, VMs, and nested virtualization

Log in to the LON-HOST2 virtual machine as Adatum\Administrator with password


Pa55w.rd. On LON-HOST2, click Start, and then click Windows PowerShell.

In the Windows PowerShell window, type the following command, and then press Enter:
Install-WindowsFeature -Name Hyper-V,Hyper-V-Tools,Hyper-V-PowerShell -Restart
Your computer will restart a couple of times. Be sure to select 20740C-LON-HOST2 at
the boot menu each time it restarts.

Sign into LON-HOST2 as Adatum\Administrator with the password Pa55w.rd. Click


start, then click Windows Powershell, then run the following command:
New-VMSwitch -Name "Host Internal Network" -SwitchType Internal

Open File Explorer, and then browse to E:\Program Files\Microsoft


Learning\20740\Drives. (Note that the drive letter may vary based upon your host
machine.)

Run the following scripts to create the needed switches and import the VMs that
need to be imported for this lab:
CreateVirtualSwitches.ps1
LON-HOST2_VM-Pre-Import-20740C.ps1

Use drive letter C for base images and D for course images.

Open Server Manager, click Tools, and then click Hyper-V Manager.

In the left pane, select LON-HOST2.


In the Virtual Machines pane, select 20740C-LON-NVHOST3.

On the Actions menu, click Upgrade Configuration Version, and then click Upgrade.

Repeat steps 8 and 9 for 20740-LON-NVHOST4 and 20740C-LON-DC1-C.

Start Windows PowerShell from the Start menu, and then run the following commands
to enable nested virtualization on 20740C-LON-NVHOST3 and 20740C-LON-NVHOST4.
Set-VMProcessor -VMName 20740C-LON-NVHOST3 -ExposeVirtualizationExtensions $true
-Count 2

Set-VMMemory 20740C-LON-NVHOST3 -DynamicMemoryEnabled $false

Get-VMNetworkAdapter -VMName 20740C-LON-NVHOST3| Set-VMNetworkAdapter


-MacAddressSpoofing On

Set-VMProcessor -VMName 20740C-LON-NVHOST4 -ExposeVirtualizationExtensions $true


-Count 2

Set-VMMemory 20740C-LON-NVHOST4 -DynamicMemoryEnabled $false

Get-VMNetworkAdapter -VMName 20740C-LON-NVHOST4| Set-VMNetworkAdapter


-MacAddressSpoofing On
Previous ExerciseNext Exercise

3. Exercise 1: Configuring virtual environment


Task 2: Install Hyper-V on nested virtualization hosts

Open Server Manager, click Tools, and then click Hyper-V Manager.

In the left pane, select LON-HOST2.

In the Virtual Machines pane, select 20740C-LON-NVHOST3.

In the Actions menu, click Start.

Repeat steps 3 and 4 for 20740-LON-NVHOST4 and 20740C-LON-DC1-C.

If you closed Windows PowerShell window on LON-HOST2, click Start, right-click


Windows PowerShell, and then click Run as Administrator.

To open a PSSession utilizing Windows PowerShell Direct, at the Windows PowerShell


command prompt, type the following command, and then press Enter:
Enter-PSSession -VMName 20740C-LON-NVHOST3

In the Credentials request dialog box, in the Username text box, type
Adatum\Administrator, and in the Password text box, type Pa55w.rd,and then press
Enter.

To install Hyper-V, type the following command at the Windows PowerShell command
prompt, and then press Enter:
Install-WindowsFeature -Name Hyper-V,Hyper-V-Tools,Hyper-V-Powershell -Restart

Wait until the installation completes. Type the following command at the Windows
PowerShell command prompt, and then press Enter:
Exit
Note: If this generates the error "Command 'Exit' was not run as the session in
which it was intended to run was either closed or broken," ignore this error.

Repeat steps 7 through 10 for 20740C-LON-NVHOST4.

To configure networking, in a Windows PowerShell prompt on LON-HOST2, type the


following command: (Note that the path may differ on your host machine.)
Invoke-Command -VMName 20740C-LON-NVHOST3 -FilePath "D:\Program Files\Microsoft
Learning\20740\Drives\CreateVirtualSwitches.ps1"

In the Credentials request dialog box, in the Username text box, type
Adatum\Administrator, and in the Password text box, type Pa55w.rd, and then press
Enter.

Repeat steps 12 and 13 for 20740C-LON-NVHOST4.

Switch to the Hyper-V Manager console, right-click 20740C-LON-NVHOST3, click


Connect, and then sign in as Adatum\Administrator with the password Pa55w.rd.

Repeat step 15 for 20740C-LON-NVHOST4.


Previous ExerciseNext Exercise

4. Exercise 2: Configuring a failover cluster for Hyper-V


Task 1: Connect to the iSCSI target from both host machines

On LON-NVHOST3, click Start, click the Server Manager icon, and then in the Server
Manager window click Tools, and then click iSCSI Initiator.

At the Microsoft iSCSI prompt, click Yes.

Click the Discovery tab.

On the Discovery tab, click Discover Portal.

In the IP address or DNS name text box, type 172.16.0.10, and then click OK.

Click the Targets tab, and then click Refresh.

In the Discovered targets list, click iqn.1991-05.com.microsoft:lon-dc1-target1-


target, and then click Connect.

If not already selected, select Add this connection to the list of Favorite
Targets, and then click OK.

To close iSCSI Initiator Properties dialog box, click OK.

Switch to LON-NVHOST4.

On LON-NVHOST4, open Server Manager, click Tools, and then click iSCSI Initiator.

In the Microsoft iSCSI dialog box, click Yes.

In the iSCSI Initiator dialog box, click the Discovery tab.

On the Discovery tab, click Discover Portal.

In the IP address or DNS name text box, type 172.16.0.10, and then click OK.
Click the Targets tab, and then click Refresh.

In the Discovered targets list, click iqn.1991-05.com.microsoft:lon-dc1-target1-


target, and then click Connect.

Select Add this connection to the list of Favorite Targets, and then click OK.

To close the iSCSI Initiator Properties dialog box, click OK.

On LON-NVHOST4, in Server Manager, click Tools, and then click Computer Management.

Expand Storage, and then click Disk Management.

Right-click Disk 1, and then click Online. (This is the first disk that is 20 GB in
size. Your disk number might be different.)

Right-click Disk 1, and then click Initialize Disk.

In the Initialize Disk dialog box, click OK.

Right-click the unallocated space next to Disk 1, and then click New Simple Volume.

On the Welcome page, click Next.

On the Specify Volume Size page, click Next.

On the Assign Drive Letter or Path page, click Next.

On the Format Partition page, in the Volume label text box, type ClusterDisk.

Select the Perform a quick format check box, click Next, and then click Finish.
Note: If a Microsoft Windows prompt appears to format the disk, click Cancel.

Repeat steps 22 through 30 for Disk 2 and Disk 3. In step 29, use the following
settings:
Disk 2 name: ClusterVMs

Disk 3 name: Quorum

Switch back to LON-NVHOST3.

On LON-NVHOST3 in Server Manager, click Tools, and then click Computer Management.

Expand Storage, and then click Disk Management.

Right-click Disk Management, and then click Refresh.

Right-click Disk 1, and then click Online.

Right-click Disk 2, and then click Online.

Right-click Disk 3, and then click Online.

Close Computer Management console.


Note: Disk numbers might vary based on the number of physical disks in the host
computer. Choose the disks that are 20 GB in size.
Previous ExerciseNext Exercise

5. Exercise 2: Configuring a failover cluster for Hyper-V


Task 2: Configure failover clustering on both host machines

On LON-NVHOST3, ensure that Server Manager console is open.

In Server Manager, on the Dashboard, click Add roles and features.

On the Before you begin page, click Next.

On the Select installation type page, click Next.

On the Select destination server page, ensure that Select server from the server
pool is selected, and then click Next.

On the Select server roles page, click Next.

On the Select features page, in the Features list, click Failover Clustering. At
the Add features that are required for failover clustering prompt, click Add
Features, and then click Next.

On the Confirm installation selections page, click Install.

When installation is complete, click Close.

Switch to LON-NVHOST4.

Repeat steps 1 through 9 on LON-NVHOST4.

Switch back to LON-NVHOST3.

On LON-NVHOST3, in Server Manager, click Tools, and then click Failover Cluster
Manager.

In Failover Cluster Manager, in the center pane, under Management, click Create
Cluster.

On the Before You Begin page of the Create Cluster Wizard, read the information,
and then click Next.

On the Select Servers page, in the Enter server name textbox, type LON-NVHOST3, and
then click Add. Again, in the Enter server name text box, type LON-NVHOST4, and
then click Add.

Verify the entries, and then click Next.

On the Validation Warning page, click No. I don't require support from Microsoft
for this cluster, and then click Next.
Note: You are skipping validation to save some time in the lab. In a production
environment, you should never skip cluster validation.

On the Access Point for Administering the Cluster page, in the Cluster Name text
box, type VMCluster.
In the Address text box, type 172.16.0.126, and then click Next.

In the Confirmation dialog box, verify the information, clear the Add all eligible
storage to the cluster option check box, and then click Next.

On the Summary page, click Finish.


Previous ExerciseNext Exercise

6. Exercise 2: Configuring a failover cluster for Hyper-V


Task 3: Configure disks for a failover cluster

On LON-NVHOST3, in the Failover Cluster Manager console, expand


VMCluster.Adatum.com, expand Storage, right-click Disks, and then click Add Disk.

In the Add Disks to Cluster dialog box, verify that all disks are selected, and
then click OK.

Click Disks in the left pane and verify that all disks display as Available Storage
in Failover Cluster Manager.

Click Cluster Disk 1, right-click that disk,and then click Add to Cluster Shared
Volumes.

Right-click VMCluster.adatum.com, click More Actions,click Configure Cluster Quorum


Settings, and then click Next.

On the Select Quorum Configuration Option page, click Use default quorum
configuration,and then click Next.

On the Confirmation page, click Next.

On the Summary page, click Finish.


Previous ExerciseNext Exercise

7. Exercise 3: Configuring a highly available VM


Task 1: Move VM storage to the iSCSI target

Ensure that LON-NVHOST3 is the owner of the disk that you just assigned to Cluster
Shared Volume. You can read the owner value in the Owner Node column. If that is
not the case, then move the disk to LON-NVHOST3 before proceeding to step 2.
Note: To move the disk:

Right-click the disk, and then click Move.

Click Select Node, click LON-NVHOST3, and then click OK.

On LON-NVHOST3, on the desktop, on the taskbar, click the File Explorer icon.

In File Explorer, expand drive C:, expand Program Files, expand Microsoft Learning,
expand 20740, expand Drives, expand 20740C-NANO-SVR1, and then click Virtual Hard
Disks.
Note: The drive letter might be different depending on the physical machine.

In the details pane, move the 20740C-NANO-SVR1.vhd virtual hard disk file to the
C:\ClusterStorage\Volume1 location.
Previous ExerciseNext Exercise

8. Exercise 3: Configuring a highly available VM


Task 2: Configure the VM as highly available

On LON-NVHOST3, in Failover Cluster Manager, click Roles, and then in the Actions
pane, click Virtual Machines.

Click New Virtual Machine.

Select LON-NVHOST3 as the cluster node, and then click OK.

In the New Virtual Machine Wizard, on the Before You Begin page, click Next.

On the Specify Name and Location page, in the Name text box, type TestClusterVM,
click Store the virtual machine in a different location,and then click Browse.

Browse to and select C:\ClusterStorage\Volume1, click Select Folder, and then click
Next.

On the Specify Generation page, click Generation** 1 **, and then click Next.

On the Assign Memory page, type 256, and then click Next.

On the Configure Networking page, leave the selection as Not Connected, and then
click Next.

On the Connect Virtual Hard Disk page, click Use an existing virtual hard disk, and
then click Browse.

Browse to C:\ClusterStorage\Volume1, click 20740C-NANO-SVR1.vhd, and then click


Open.

Click Next, and then click Finish. If an error appears informing you that Microsoft
Management has stopped working, restart this task from step 1.

On the Summary page of the High Availability Wizard, click Finish.

Right-click the TestClusterVM, and then click Settings.

On LON-NVHOST3, in the Settings for TestClusterVM dialog box, in the navigation


pane, expand Processor, and then click Compatibility.

In the right pane, select the Migrate to a physical computer with a different
processor version check box, and then click OK.

Right-click TestClusterVM, and then click Start.

Ensure that the VM starts successfully.


Previous ExerciseNext Exercise
9. Exercise 3: Configuring a highly available VM
Task 3: Failover VM

On LON-NVHOST4, in Server Manager console, click Tools, and then click Failover
Cluster Manager.

Expand VMCluster.Adatum.com, and then click Roles.

Right-click TestClusterVM, click Move, click Live** Migration , and then click
Select Node**.

Click LON-NVHOST4, and then click OK. Wait until the machine is migrated. You will
see that the Owner** Node** column will change the value when migration completes.
Note: If the only option is LON-NVHOST3, select LON-NVHOST3 and continue the lab.

Right-click TestClusterVM, and then click Connect.

Ensure that you can access and operate the VM after it is migrated to another host.

In Failover Cluster Manager, right click TestClusterVM, and select Shut Down.
Previous ExerciseNext Exercise

10. Exercise 3: Configuring a highly available VM


Task 4: Configure drain on shutdown

On LON- NVHOST3, select Windows Start, and then launch Windows PowerShell.

At the Windows PowerShell command prompt, type the following command, and then
press Enter:
(Get-Cluster).DrainOnShutdown
Note: This should return a value of " 1".

On LON- NVHOST3,restore Failover Cluster Manager.

Select Roles in Failover Cluster Manager.

On LON-NVHOST4, click on Windows Start, select Power, and then select Shut down.

On the pop-up dialog box, select Continue.

Observe TestClusterVM live migrate to LON- NVHOST3 from LON-NVHOST4 before shutting
down.
Previous ExerciseNext Exercise

11. Exercise 3: Configuring a highly available VM


Task 5: Prepare for the next module

When you are finished with the lab, revert all VMs to their initial state

On the host computer, start Hyper-V Manager.


Shut down all VMs.

Restart your computer, and when prompted, choose Windows Server 2016.
Previous Exercise

You might also like