0% found this document useful (0 votes)
15 views

Module9

Module 9 focuses on implementing failover clustering with Windows Server 2016 Hyper-V to achieve high availability for virtual environments. It covers the integration of Hyper-V with failover clustering, the implementation of VMs on failover clusters, and key features for VMs in clustered environments. The module also outlines best practices for ensuring high availability and provides insights into managing and monitoring clustered VMs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Module9

Module 9 focuses on implementing failover clustering with Windows Server 2016 Hyper-V to achieve high availability for virtual environments. It covers the integration of Hyper-V with failover clustering, the implementation of VMs on failover clusters, and key features for VMs in clustered environments. The module also outlines best practices for ensuring high availability and provides insights into managing and monitoring clustered VMs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

about:blank

Module 9: Implementing failover clustering with


Windows Server 2016 Hyper-V

Contents:

Lesson of the integration of Hyper-V with failover


clustering

Lesson 2: Implementing Hyper-V VMs on failover clusters

Lesson 3: Key features for VMs in a clustered environment

Lab: failover clustering with 2016

and takeaways

Module overview

One benefit of implementing server virtualization is the opportunity to provide high


availability, both for applications or services that have built-in high availability
functionality applications or services that availability in
any other Windows Server 2016 Hyper-V
clustering, System Center 2012 R2 Manager (VMM),
you can options to configure module, you
will learn implement failover clustering environment to
achieve high availability for a virtual environment.

1 of 53 3/12/2019, 1:29 PM
about:blank

Note: Many of the features that this module describes are also available in
Windows Server 2012 R2 and Windows Server 2012. This module explicitly
calls out the features that are new to Windows Server 2016.

Objectives

After you will be able to:

• Describe integrates with failover

• Implement virtual machines (VMs) on

• Describe the key features for VMs in a clustered environment.

Lesson 1: Overview of the integration of Hyper-V


Server failover clustering

Failover that enables you to services


highly highly available in environment, you should
implement clustering on the Hyper-V host computers. lesson
summarizes the high-availability options for Hyper-V–based VMs, and then focuses
on how failover clustering works, and how to design and implement failover clustering
for Hyper-V.

Lesson
After you will be able to:

• Describe making applications and available.

• Describe how failover clustering works with Hyper-V nodes.

2 of 53 3/12/2019, 1:29 PM
about:blank

• Describe failover clustering with Windows Server 2016 Hyper-V features.

• Describe the best practices for implementing high availability in a virtual


environment.

Options application and


available

Most organizations have certain applications that are business critical and must be
highly available. To ensure that an application or a service is highly available, you
must environment that provides redundancy components that
the application can choose among high
availability services hosted within

• Implement clustered role (host clustering).

• Implement clustering inside VMs (guest clustering).

3 of 53 3/12/2019, 1:29 PM
about:blank

• Use Network Load Balancing (NLB) inside VMs.

Host clustering

Host clustering enables you to configure a failover cluster when you use the Hyper-V
host configure host clustering the VM
as a You implement failover-clustering at the
host-server that the guest operating applications that
run within to be cluster-aware. highly
available.

Some examples of non-cluster-aware applications are a print server or a proprietary


network-based application such as an accounting application. If the host node that
controls the VM unexpectedly becomes unavailable, the secondary host node takes
control the VM as quickly move
the VM cluster to another in example,
you could one node to another
management 2016 operating system.

The services that run in the VM do compatible with


failover clustering, and they do not have to be aware that the VM is clustered.
Because the failover is at the VM level, there are no dependencies on software that
you installed inside the VM.

Guest

You clustering in a manner configure


physical-server clustering, except that the this
scenario, or more VMs, then install failover clustering
within the guest operating systems. The application or service is then able to take
advantage of high availability between the VMs. Each VM node’s guest operating

4 of 53 3/12/2019, 1:29 PM
about:blank

system implements failover clustering so that you can locate the VMs on a single
host. This can be a quick and cost-effective configuration in a test or staging
environment.

For production environments, however, you can protect the application or service
more robustly if you deploy the VMs on separate failover clustering-–enabled
Hyper-V failover clustering host and
VM levels, resource regardless fails is a
VM or configuration is considered an
configuration mission-critical applications
environment.

You should consider several factors when you implement guest clustering:

• The application or service must be failover cluster-aware. This includes any of the
Windows services that are cluster-aware, applications, such
as Server and Microsoft

• Hyper-V Server 2016 can use connections


to can implement Internet System
Interface ( connections from the VMs to You can also
use the shared virtual hard disk feature to provide shared storage for VMs.

You should deploy multiple network adapters on the host computers and the VMs.
Ideally, should dedicate network connection to the iSCSI connection (if you use
this method storage), to the private hosts, and to
the network client computers

NLB

NLB works with VMs in the same way that it works with physical hosts. It distributes
IP traffic to multiple instances of a TCP/IP service, such as a web server that runs on

5 of 53 3/12/2019, 1:29 PM
about:blank

a host within the NLB cluster. NLB transparently distributes client requests among the
hosts, and it enables the clients to access the cluster by using a virtual host name or
a virtual IP address. From the client computer’s perspective, the cluster appears to
be a single server that answers these client requests. As enterprise traffic increases,
you can add another server to the cluster.

Therefore, appropriate solution for resources


accommodate or write requests. Examples NLB-appropriate
applications web-based front-end VMs
Exchange servers.

When you configure an NLB cluster, you must install and configure the application on
all VMs that will participate in the NLB cluster. After you configure the application, you
install the NLB feature in Windows Server 2016 within each VM’s guest operating
system (not on the Hyper-V hosts), and then configure an NLB cluster for the
application. Windows Server also the guest
operating to only Windows Server should
use the versions within one a Guest
Cluster resource typically increased I/O
performance the VM nodes on different

Note: As with earlier versions of Windows Server, you should not implement
NLB and failover clustering within the same operating system because the two
technologies conflict with each other.

How cluster work with nodes?

6 of 53 3/12/2019, 1:29 PM
about:blank

When you implement failover clustering and configure VMs as highly available
resources, treats the VMs like service. For
example, failover clustering the VM as
quickly host in the cluster. runs the
VM. move the VM to any cluster as
part of migration.

The failover process transfers the responsibility of providing access to resources in a


cluster from one node to another. Planned failover (also known as switchover) can
occur when an administrator intentionally moves resources to another node for
maintenance or when unplanned occurs
because other reasons.

The the following steps:

1. The node where the VM is running owns the clustered instance of the VM,
controls access to the shared bus or iSCSI connection to the cluster storage,

7 of 53 3/12/2019, 1:29 PM
about:blank

and has ownership of any disks or logical unit numbers (LUNs) that you assign
to the VM. All the nodes in the cluster use a private network to send regular
signals, known as heartbeat signals, to one another. The heartbeat indicates
that a node is functioning and communicating on the network. The default
heartbeat configuration specifies that each node sends a heartbeat over
TCP/UDP port 3343 each second (or 1,000 milliseconds [ms]).

2. node that is hosting regular


network to the other is five
heartbeats (or 5,000 ms might occur
failure or network failure. signals stop
arriving from the failed node, one of the other nodes in the cluster begins taking
over the resources that the VMs use.

You define the one or more nodes that could take over by configuring the
Preferred Owner and the Possible Owners properties. The Preferred Owner
hierarchy of ownership possible
resource. By default, all nodes Possible
removing a node as a Possible from
in a failure situation.

suppose that you implement a using four


nodes. However, you configure only two nodes as Possible Owners. In a
failover event, the resource might still be taken over by the third node if neither
of the Preferred Owners is online. Although you did not configure the fourth
node as a Preferred Owner, if it remains a member of Possible Owners, the
failover cluster it to restore access to the if

online in order of dependency. the VM


it stores access to adapters
networks), and LUNs in complete
resources are online on the new interacting with
the resource, there is a short service interruption, which most users might not
notice.

8 of 53 3/12/2019, 1:29 PM
about:blank

3. You also can configure the cluster service to fail back to the offline node after it
becomes active again. When the cluster service fails back, it uses the same
procedures that it performs during failover. This means that the cluster service
takes all the resources associated with that instance offline, moves the
instance, and then brings all the resources in the instance back online.

Failover with Windows Hyper-V


features

There are many improvements to the functionality of Hyper-V with failover clustering
since Hyper-V in Windows Server 2016
continues with failover clustering features and
improvements areas:

• Maximum VM supported. Failover clustering to 64 nodes


and 8,000 VMs per cluster (and 1024 VMs per node).

9 of 53 3/12/2019, 1:29 PM
about:blank

• File share storage. Windows Server 2012 introduced the possibility of storing VMs
on Server Message Block (SMB) file shares in a file server cluster. This is a way to
provide shared storage that is accessible by multiple clusters, by providing the
ability to move VMs between clusters without moving the storage. To enable this
feature, deploy a file server cluster role and select Scale-Out File Server for
application data.

• Shared Windows Server 2012 R2 use a .vhdx


as guest clusters. Windows introduced
improved shared disks and introduced format, .vhds
(VHD

• Rolling Hyper-V cluster upgrades. In Windows Server 2016, you can upgrade the
nodes one at a time when upgrading from Windows Server 2012 R2. After
upgrading all nodes in a Hyper-V cluster, you can upgrade the functional level of
the entire cluster.

• VM Windows Server 2016 upgrades by


not configuration version automatically. manually
update version. This allows and forth
from 2016 and Windows have
completed upgrades, and you are ready the version for
Windows Server 2016 and take advantage of the new features for Windows
Server 2016 Hyper-V.

Best practices for implementing high availability in virtual


environment

10 of 53 3/12/2019, 1:29 PM
about:blank

After you determine which applications you will deploy on highly available failover
clusters, deploy the failover Apply the
following you implement the

• Plan When you design the for the


Hyper-V that you include the hardware is required
when hosts fail. For example, if you deploy a six-node cluster, you must determine
the number of host failures that you want to accommodate. If you decide that the
cluster must sustain the failure of two nodes, then the four remaining nodes must
have the capacity to run all the VMs in the cluster.

• Plan failover clustering. cluster


performance you should dedicate for
internode As in earlier versions, logically
and the network segment ( clients use
to the cluster. You also can connection to
transfer VM memory during a live migration. If you use iSCSI for any VMs, ensure
that you also dedicate a network connection to the iSCSI network connection. This

11 of 53 3/12/2019, 1:29 PM
about:blank

also applies if you use SMB 3.0 shares for VMs.

• Plan the shared storage for failover clustering. When you implement failover
clustering for Hyper-V, the shared storage must be highly available. If the shared
storage fails, the VMs will all fail, even if the physical nodes are functional. To
ensure storage availability, you will need to plan for redundant connections to the
shared Redundant Array of Independent the storage
device. a shared virtual hard locate the
shared available resource such Server.

• Use failover cluster quorum clustering in


Windows 2016, the default is dynamic dynamic witness.
You should not modify the default configuration unless you understand the
implications of doing so.

• Deploy standardized Hyper-V hosts. To simplify the deployment and management


of the failover cluster and Hyper-V nodes, develop a standard server hardware
and nodes.

• Develop management practices. When VMs in a


failover the risk that a single down a large
part deployment. For example, if accidentally
configures the failover cluster incorrectly and the cluster fails, all VMs in the
cluster will be offline. To avoid this, develop and thoroughly test standardized
instructions for all administrative tasks.

Check

Discovery
Why storage a best practice in Windows Hyper-V failover
clustering?

Show solution Reset

12 of 53 3/12/2019, 1:29 PM
about:blank

Check Your Knowledge

Discovery
You have two clusters; one is a Windows Server 2016 cluster (Cluster1), and the other is
a mixed mode cluster of Windows Server 2012 R2 and Windows Server 2016 (Cluster2)
that is upgrading but has not finished. two VMs
called VM2 occasionally need forth between
Cluster1 you upgrade the configuration

Show solution

Lesson 2: Implementing Hyper-V VMs on failover


clusters

Implementing highly available VMs is different from implementing other roles in a


failover clustering in Windows Server features
for Hyper-V addition to tools for VM management. In
this lesson, how to implement

Lesson objectives
After completing this lesson, you will be able to:

• Describe the components of a Hyper-V cluster.

• Describe the prerequisites for implementing Hyper-V failover clusters.

• Describe Hyper-V VMs on a

• Describe Clustered Shared Volumes (

• Explain configure a shared virtual hard

• Explain how to implement Scale-Out File Servers for VM storage.

13 of 53 3/12/2019, 1:29 PM
about:blank

• Describe the considerations for implementing Hyper-V VMs in a cluster.

• Explain how to maintain and monitor VMs in clusters.

• Implement failover clustering.

Components Hyper-V clusters

Hyper-V as a role has some specific requirements for cluster components. To form a
Hyper-V cluster, you must have at least two physical nodes. Whereas other clustered
roles (such as Dynamic Host Configuration Protocol [DHCP] or file server) allow
nodes nodes in most production be
physical Windows Server 2016 nested
virtualization, you to configure a Hyper-V guest VM.
Allowing clustering scenarios previously physical
servers, two guest VMs to create a Hyper-V.

In addition to having nodes, you also must have physical and virtual networks.

14 of 53 3/12/2019, 1:29 PM
about:blank

Failover clustering requires a cluster network interface for internal cluster


communication and a network interface for clients. You can also implement a storage
network separately, depending on the type of storage you use. As a reminder,
specific to the Hyper-V role, you also should consider virtual networks for clustered
VMs. It is very important to create the same virtual networks on all physical hosts that
participate in one cluster. Failure to do so causes a VM to lose network connectivity
when another.

Storage component of VM clustering. storage that


Windows clustering supports. configure
storage will discuss this in a later topic.

When using host clustering, VMs are also components of a Hyper-V cluster. In
Failover Cluster Manager, you can create new highly available VMs, or you can make
existing VMs highly available. In both cases, the VM storage location must be on
shared accessible to both nodes. You make all VMs
highly Cluster Manager, you are part of
a cluster

Prerequisites implementing Hyper-V clusters

15 of 53 3/12/2019, 1:29 PM
about:blank

To deploy a Hyper-V cluster, you must ensure that you meet the hardware, software,
account, network-infrastructure requirements. detail these
requirements.

Hardware

You must have the following hardware for a two-node failover cluster:

• Server hardware. Hyper-V on Windows Server 2016 requires an x64-based


processor, hardware-assisted virtualization, and hardware-enforced Data
Execution As a best practice, very
similar

supports a failover cluster hardware


marked as Certified for Windows addition, the
complete configuration (servers, network, and storage) must pass all tests
in the Validate This Configuration Wizard, which is included in the Failover
Cluster Manager snap-in.

16 of 53 3/12/2019, 1:29 PM
about:blank

Software recommendations

The following are the software recommendations for using Hyper-V and failover
clustering:

• All the servers in a failover cluster need to run Windows Server 2016 Standard,
Datacenter, Hyper-V Server 2016 different editions
are rolling upgrade failover

• All the same software packs.

• All have the same drivers

Network infrastructure requirements

You network infrastructure for


administrative following domain

• Network addresses. Use identical settings on all


network including the speed, duplex and media-type
settings. Ensure that all network hardware supports the same settings.

• Private networks. If you use private networks that you have not routed to your
entire network infrastructure for communication between cluster nodes, ensure
that each of these private networks uses a unique subnet.

• Domain DNS). The servers in for name


resolution. the DNS dynamic

• Domain the cluster must be Directory


Domain DS) domain. As a best practice, clustered servers need
to have the same domain role (either member server or domain controller). The
recommended role is a member server.

17 of 53 3/12/2019, 1:29 PM
about:blank

• Account for administering the cluster. When you first create a cluster, or add
servers to it, you must sign in to the domain with an account that has administrator
rights and permissions on all the cluster’s servers. In addition, if the account is not
a Domain Admins account, the account must have the Create Computer Objects
permission in the domain.

Implementing Hyper-V VMs on a failover

To implement failover clustering for Hyper-V, you must complete the following high-
level steps:

1. required versions of After you


configure the network computers to
domain, and then configure shared

2. Configure the shared storage. You must use Disk Manager to create disk

18 of 53 3/12/2019, 1:29 PM
about:blank

partitions on the shared storage.

3. Install the Hyper-V and Failover Clustering features on the host servers. You
can use Server Manager in the Microsoft Management Console (MMC) or
Windows PowerShell to do this.

4. Validate the cluster configuration. The Validate This Cluster Wizard checks all
components that are required provides
components do not requirements.
resolve any issues that Cluster Wizard

Note: Although it is possible to create a cluster without running cluster


validation, we strongly recommend that you run the Validate This
Cluster Wizard and resolve all issues before creating a cluster and
putting it into production.

5. the components pass Validate


can create a cluster. the cluster,
an IP address. You object also
cluster name object (CNO) cluster name in AD
DS, and register the IP address in DNS. In Windows Server 2012 R2 and later,
you can create an Active Directory–detached cluster which allows you create
the cluster name object in DNS however does not require you to have the
cluster name object in AD DS.

enable Clustered Shared only after


cluster and add eligible to use
configure CSV before step.

6. Create a VM on one of the cluster nodes. When you create the VM, ensure that

19 of 53 3/12/2019, 1:29 PM
about:blank

all files associated with the VM—including both the virtual hard disk and VM
configuration files—are stored on the shared storage. You can create and
manage VMs in either Hyper-V Manager or Failover Cluster Manager. We
recommend that you use the Failover Cluster Manager console for creating
VMs. When you create a VM by using Failover Cluster Manager, the VM is
automatically highly available.

7. available only for existing VM before


clustering, you need to manually.
available, in the Failover select a
application to make highly available. Cluster Manager
then presents a list of services and applications that can be made highly
available. When you select the option to make VMs highly available, you can
select the VM that you created on shared storage.

make a VM highly available, you see a list of all VMs


all cluster nodes, including VMs that are not stored on
If you make a VM that is not located on shared
available, you receive a Hyper-V adds the
and applications list. you try to
VM to a different host, the

8. Test VM failover. After you make the VM highly available, you can migrate the
computer to another node in the cluster. You can select to perform a Quick
Migration or a Live Migration. In most cases, you should perform a Live
downtime. We discuss these this course.

Configuring

20 of 53 3/12/2019, 1:29 PM
about:blank

CSVs in a Windows Server 2016 failover cluster allow multiple nodes in the cluster to
have simultaneously to the same as an
NTFS Server 2016 failover storage to the
cluster. clustered roles can another
more requiring a change in drive dismounting and
remounting CSVs also help in simplifying of a potentially
large number of LUNs in a failover cluster.

CSVs provide a general-purpose, clustered file system, which you layer on NTFS.
Windows Server 2016 does not restrict CSVs to specific clustered workloads, but it
only clusters and Scale-Out

Although additional flexibility and reduce not need to


configure you implement high Hyper-V.
You also clusters on Hyper-V by using approach (with disks
that you do not assign as CSVs). However, we recommend that you use CSVs
because they provide the following advantages:

21 of 53 3/12/2019, 1:29 PM
about:blank

• Reduced LUNs for the disks. You can use CSVs to reduce the number of LUNs
that your VMs require. When you configure a CSV, you can store multiple VMs on
a single LUN, and multiple host computers can access the same LUN
concurrently.

• Improved use of disk space. Instead of placing each .vhd file on a separate disk
with the .vhd file can expand, oversubscribe disk
space vhd files on the same

• Single You can track the other files


that using drive letters or you can
specify names.

When you implement a CSV, all added storage displays in the \ClusterStorage
folder. The \ClusterStorage folder is created on the cluster node’s system folder,
and you cannot move it. This means that all Hyper-V hosts that are members of
the cluster must use the same drive letter as their system drive, or VM failovers
fail.

• No requirements. There are requirements


to implement CSVs
configuration, either Fibre Channel or iSCSI

• Increased resiliency. CSVs increases resiliency because the cluster can respond
correctly even if connectivity between one node and the SAN is interrupted, or if
part of a network is down. The cluster reroutes the CSV traffic through an intact
part of the SAN or network.

Implementing

After failover cluster, you can enable cluster, and then


add storage

Before you can add storage to the CSV, the LUN must be available as shared

22 of 53 3/12/2019, 1:29 PM
about:blank

storage to the cluster. When you create a failover cluster, all the shared disks that
you configured in Server Manager are added to the cluster, and you can add them to
a CSV. Additionally, you have the option to add storage to the cluster, after you create
the cluster. If you add more LUNs to the shared storage, you must first create
volumes on the LUN, add the storage to the cluster, and then add the storage to the
CSV.

We recommend configure CSVs before available.


However, VM from regular disk deployment.
The apply for conversion to CSV
after

• The LUN’s drive letter (or mount point) is removed when you convert from regular
disk access to the CSV. This means that you must re-create all VMs that you
stored on the shared storage. If you must keep the same VM settings, consider
exporting to a CSV, and then Hyper-V.

• You storage to a CSV if it is running VM


that must shut down the disk to the
CSV.

Configuring a shared virtual hard disk

23 of 53 3/12/2019, 1:29 PM
about:blank

To implement guest clustering in previous versions of Windows Server, you had to


expose VM. You could connect by using
a virtual interface or by using iSCSI. was a
complicated you did not have the drivers for
virtual did not have iSCSI addition,
in some as when you hosted a VM provider,
administrators did not want to expose a storage layer to the VM users or tenant
administrators. To address these issues, Windows Server 2016 now provides an
additional layer of abstraction for VM cluster storage. It is possible to share a virtual
hard disk (in .vhdx or .vhds format only) between two or more VMs, and then use that
virtual storage when building use the
shared witness disk or as a

How hard disk work?

You add shared virtual hard disks as SCSI drives the settings. The disks
appear as virtual serial-attached SCSI disks in the VM. You can add a shared virtual
hard disk to any VM with a supported guest operating system running on a Windows

24 of 53 3/12/2019, 1:29 PM
about:blank

Server 2016 Hyper-V platform. When you use this technology, the guest-clustering
configuration is simplified because you have several options for providing shared
storage for guest clusters. These options include shared virtual hard disk, Fibre
Channel, SMB, Storage Spaces, and iSCSI storage. You can use shared virtual disks
to provide storage for solutions such as SQL Server databases and file server
clusters.

Shared limitations

There virtual hard disk while or more


VMs standard .vhd or .vhdx. In Windows R2, these
limitations prevent you from resizing dynamic disks online, performing storage
migration with a shared .vhd, using a shared virtual disk for checkpoints and using a
shared .vhd in a Hyper-V Replica configuration. In Windows Server 2016, online
resizing is available and Hyper-V Replica includes the shared virtual hard disk when
creating

How virtual hard disks

You disks in guest cluster configure guest


failover shared virtual hard disks, you followings
requirements:

• Include at least a two-node Hyper-V failover host cluster.

• All Windows Server 2012 R2

• All the same Active

• Configured resources must be CSVs on


block as clustered storage spaces) File Server
cluster (running Windows Server 2012 R2 or later) with SMB 3.0 (for file-based
storage).

25 of 53 3/12/2019, 1:29 PM
about:blank

• Sufficient memory, disk, and processor capacity within the failover cluster is
necessary to support multiple VMs implemented as guest failover clusters.

For the guest operating systems, you can only use Windows Server 2012 or later.
However, if you use Windows Server 2012 in VMs that use shared virtual hard disks,
you must integration services from R2 or later.
Hyper-V supports both Generation VMs.

When shared virtual hard guest


clusters, decide where to store the disk. You can
deploy the shared virtual hard disk at the following locations:

• CSV location. In this scenario, all VM files, including the shared. vhdx or .vhds
files, are stored on a CSV configured as shared storage for a Hyper-V failover
cluster.

• Scale-Out 3.0 share. This scenario file-based storage


as shared. vhdx or .vhds files. Scale-Out
File SMB file share as the also need a
separate failover cluster.

Note: You should not deploy a shared virtual hard disk on an ordinary file
share or a local hard drive on the host machine. You must deploy the shared
virtual hard disk on a highly available location

You virtual hard disk in a Hyper-V


cluster Failover Cluster Manager Windows
PowerShell. a .vhdx, there are extra steps create the guest
shared virtual disk to enable Hyper-V and failover cluster to know that the .vhdx is a
shared disk. However, with the .vhds format introduced in Windows Server 2016, you

26 of 53 3/12/2019, 1:29 PM
about:blank

do not need to perform those steps, and the process is simplified.

Additional Reading: For more information, refer to Deploy a Guest Cluster


Using a Shared Virtual Hard Disk: http://aka.ms/isec0h

When Manager, you can create the .vhds.


We recommend always attach virtual hard virtual SCSI
adapter with the operating system. connect to
the same a Generation 2 VM.

Note: Adding virtual SCSI adapters requires the VM to be offline. If you


already added the SCSI adapters, you can complete all other steps while the
VM is online.

To add two VM in Windows Failover


Cluster virtual SCSI controller Browse to
the created Apply. Then, repeat this that will use
this shared

To add a shared virtual hard disk by using Windows PowerShell, you should use the
Add-VMHardDiskDrive cmdlet with the –ShareVirtualDisk parameter. You must run
this command under administrator privileges on the Hyper-V host, for each VM that
uses the shared .vhds file.

For example, create and add a shared Data1.vhds)


that the CSV to two VMs you use the
following Windows PowerShell:

New-VHD –Path C:\ClusterStorage\Volume1\Data1.vhds –Dynamic


–SizeBytes 127GB

27 of 53 3/12/2019, 1:29 PM
about:blank

Add-VMHardDiskDrive -VMName VM1 -Path C:\ClusterStorage\Volume1


\Data1.vhds –ShareVirtualDisk

Add-VMHardDiskDrive -VMName VM2 -Path C:\ClusterStorage\Volume1


\Data1.vhds –ShareVirtualDisk

In addition, shared virtual hard that is


stored \\Server1\Share1) to , you
should command in Windows PowerShell

Add-VMHardDiskDrive -VMName VM2 -Path \\Server1\Share1\Witness.vhds


-ShareVirtualDisk

The different Hyper-V capabilities storage


option shared virtual disk.

Capability Shared .vhdx Virtual ISCSI in VM


and .vhds Channel

Supported storage Storage spaces, Fibre Channel SAN iSCSI SAN


serial-attached
SCSI, Fibre
Channel, iSCSI,

Storage serial- Virtual


VM as attached SCSI LUN

Data No
Hyper-V

Storage is configured at the Yes Yes No


Hyper-V host level

28 of 53 3/12/2019, 1:29 PM
about:blank

Capability Shared .vhdx Virtual Fibre ISCSI in VM


and .vhds Channel

Provides low latency and Yes (remote direct Yes (Fibre Channel) No
low central processing unit memory access
(CPU) use [RDMA] or Fibre
Channel)

Requires Yes

Requires Yes
reconfigured
migrated

Exposes storage No Yes Yes


architecture

Check Your Knowledge

Discovery
What using shared hard virtual

Show solution

Implementing Scale-Out File Servers for VMs

29 of 53 3/12/2019, 1:29 PM
about:blank

It is possible to use one more technique to make VMs storage highly available.
Instead clustering, now you highly
available When you use this storage high
availability Hyper-V nodes, but by that host
VM files With this new capability, VM files,
including files, and checkpoints, on SMB file shares.

What is a Scale-Out File Server?

A Scale-Out File Server, introduced in Windows Server 2012, provides continuously


available server applications. Scale-Out File
Server Server role on a failover Scale-Out
File Server option instead of This
requires storage of data.

The Scale-Out File Server is different from the file server clusters that were the only
option in previous versions of Windows Server in several ways. An ordinary file
server cluster serves the clients only by using one node at a time; however, a Scale-

30 of 53 3/12/2019, 1:29 PM
about:blank

Out File Server can engage all nodes simultaneously. You achieve this with the new
Windows Server failover clustering features, and the new capabilities in the new
version of Windows file server protocol, SMB 3.0. Therefore, by adding nodes to the
failover cluster running the File Server role with the Scale-Out File Server feature,
performance of the entire cluster increases. This, it is now possible to store resources
such as databases or VM hard disks on the folder shares hosted on the Scale-Out
File Server.

The Scale-Out File Server

• Active-active clustering. When all other failover active-passive


mode, a Scale-Out File Server cluster works in a way that all nodes can accept
and serve SMB client requests. In Windows Server 2012 R2, SMB 3.0 is upgraded
to SMB 3.0.2. This version improves scalability and manageability for Scale-Out
File Servers. Windows Server 2012 R2 tracks SMB client connections per file
share ( server), and then redirects node with the
best used by the file share.

• Increased previous versions of Windows bandwidth of


the constrained to the bandwidth cluster node.
Because active-active mode in the Scale-Out cluster, you can
have much higher bandwidth, which you can additionally increase by adding
cluster nodes.

• CSV Cache. Because the Scale-Out File Server clusters use CSVs, they also
benefit from the use of the CSV Cache. The CSV Cache is a feature that you can
use memory (RAM) as a write-through CSV Cache
provides read-only unbuffered I/O. performance for
applications Hyper-V, which conducts accessing a
.vhd Server 2012, you can of the total
physical write-through cache, and Windows Server
2012 R2 and Windows Server 2016. The total physical RAM that a CSV write-
through cache consumes is from nonpaged pool memory.

31 of 53 3/12/2019, 1:29 PM
about:blank

• Abstraction of the storage layer. When you use a Scale-Out File Server as the
storage location for virtual disks, you can migrate live VMs from cluster to cluster,
and you do not need to migrate the storage provided the URL location is
accessible from the destination cluster.

To implement Server, you must requirements:

• One running Windows Server Hyper-V


role

• One or more computers running Windows Server 2012 or later with the File and
Storage Services role installed.

• A common Active Directory infrastructure. The servers that run AD DS do not


need to run Windows Server 2016.

Before an SMB file share, server


cluster. have at least two cluster services and
failover Failover Cluster Manager, file server
and select File Server for application configuration. After you
configure the cluster, you must deploy the SMB Share – Applications profile. This
profile is designed for Hyper-V and other application data. After you create the share,
you can use the Hyper-V Manager console to deploy new VMs on the SMB file share,
or you can migrate existing VMs to the SMB file share when you use the Storage
Migration

Check

Discovery
Have you considered storing VMs on the SMB share? Why or why not?

Show solution Reset

32 of 53 3/12/2019, 1:29 PM
about:blank

Considerations for implementing Hyper-V clusters

By implementing clustering on servers with installed, you


can make However, this adds complexity to
a Hyper-V must invest in additional provide
redundancy, need to implement or have storage
infrastructure.

Use the following recommendations to ensure that the failover clustering strategy
meets the organization’s requirements:

• Identify services that require were to ask


the organization’s applications preferences, most
of that they want all available.
However, the option of making you must
develop which applications you will available.

• Identify the application components that must be highly available to make the

33 of 53 3/12/2019, 1:29 PM
about:blank

applications highly available. In some cases, the application might run on a single
server. If so, you only need to make that server highly available. Other
applications might require that several servers and other components (such as
storage or the network) be highly available.

• Identify the application characteristics. You must understand several things about
an

o that runs the application


supported or recommended applications.

o available for making the application available? You can


make some applications highly available through options other than host
clustering. If other options are available, evaluate the benefits and
disadvantages of each option. These options can vary and are based on the
application.

o performance requirements for


on the servers currently applications to
the hardware requirements meet
server.

o required to make the Hyper-V available? As soon


as you identify all the applications that you must make highly available by using
host clustering, you can start to design the actual Hyper-V deployment. By
identifying the performance requirements and the network and storage
requirements for applications, you can define the hardware that you must
available environment.

Live most important aspects We will


discuss detail in a later lesson. However, implementing Live
Migration, following:

• Verify basic requirements. The basic requirements for Live Migration in a cluster

34 of 53 3/12/2019, 1:29 PM
about:blank

require that all hosts must be part of a Windows Server 2008 R2 or later failover
cluster, and that host processors must be from the same manufacturer. In addition,
all hosts in the cluster must have access to shared storage.

• Configure a dedicated network adapter or virtual network adapter for live migration
communication. When you implement failover clustering, you should configure a
separate live migration network. network to
transfer during a failover. To optimize configure
a network that has a capacity second
(Gbps)

• Use hardware. All failover cluster the same


hardware for connecting to shared storage, and all cluster nodes must have
processors from the same manufacturer. Although you can enable failover for VMs
on a host with different processor versions by configuring processor compatibility
settings, the failover experience and performance is more consistent if all servers
have

• Verify As with all failover


configurations the same for all nodes All trunking
and needs to be the same nodes. This
insurance connectivity for the guest VM advantage of
Hyper-V virtual networking.

Maintaining and monitoring VMs in clusters

35 of 53 3/12/2019, 1:29 PM
about:blank

Failover clusters provide high availability for the roles configured in the cluster.
However, roles and act when role
availability. cluster roles, and when respond to a
heartbeat, can restart or fail over cluster
node.

In Windows Server versions prior to Windows Server 2012, the failover cluster was
not able to monitor applications that were running inside a VM. For example, if you
used a VM as a print server, the failover cluster was not able to detect if the Print
Spooler service in a VM stopped. It would not take any action, even though the print
server the VM was still responding

Failover Server 2016 can monitor application health


for applications that run inside a VM.
responding added to the System, Application, Security logs, the
failover cluster can take actions such as restarting the or failing over to a
different node to restore the service. The only requirement is that both the failover
cluster node and the VM must run Windows Server 2012 or a later version and have

36 of 53 3/12/2019, 1:29 PM
about:blank

integration services installed.

You can configure VM monitoring by using the Failover Cluster Manager or


Windows PowerShell. By default, you configure a failover cluster to monitor VM
health. To enable heartbeat monitoring, you must install integration services on the
VM. You can verify the monitoring configuration on the Settings tab of the VM
resource monitoring of any on the
VM, cluster role, click click
Configure Select Services window, services to
monitor failover cluster will act responding,
and if, Control Manager, you have service with the
Take No Actions recovery setting.

Windows Server 2016 also can monitor failure of VM storage and loss of network
connectivity with a technology called network health detection. Storage failure
detection of a VM boot disk disk that
the VM happens, the failover cluster the VM on a
different

You network adapter protected network. If


Windows loses network connectivity because of
reasons such as physical switch failure or a disconnected network cable, the failover
cluster will move the VM to a different node to restore network connectivity.

Windows Server 2012 R2 also enhances VM availability in scenarios when one


Hyper-V before you place it in the and before
draining from it. In Windows Server the
cluster results in VMs put then moved
to other This causes an interruption availability. In
Windows such a scenario occurs, automatically live
migrates all running VMs before the Hyper-V node shuts down.

37 of 53 3/12/2019, 1:29 PM
about:blank

Note: We still recommend that you drain clustered roles (and place the node
in maintenance mode) before performing a shutdown operation.

Configuration of this functionality, called virtual machine drain on shutdown, is not


accessible through Failover Cluster Manager. To configure it, you must use
Windows configure the DrainOnShutdown property. It is
enabled value of this property check the
value, PowerShell as Administrator following
command:

(Get-Cluster).DrainOnShutdown

Check Your Knowledge

Discovery
What Microsoft technologies monitoring
and network

Show solution

Demonstration: Implementing failover clustering with


Hyper-V
In this demonstration, will see how to:

• Move iSCSI target.

• Configure available.

Demonstration steps

38 of 53 3/12/2019, 1:29 PM
about:blank

1. Ensure that LON-NVHOST3 is the owner of the disk that is assigned to Cluster
Shared Volume. If it is not, move the disk to LON-NVHOST3.

2. On LON-NVHOST3, open File Explorer, and then browse to C:\Program


Files\Microsoft Learning\20740\Drives\20740C-NANO-SVR1\Virtual Hard
Disks.

letter might be different physical

3. Move the 20740C-NANO-SVR1.vhd virtual hard disk file to the


C:\ClusterStorage\Volume1 location.

4. In Failover Cluster Manager, click the Roles node, and then start the New
Virtual Machine Wizard. If an error displays informing you that Microsoft
working, restart this

5. Machine Wizard, use the

as the cluster node.

computer as TestClusterVM.

• Store the file in C:\ClusterStorage\Volume1.

• Select Generation 1

megabytes (MB) of RAM to TestClusterVM

Not Connected.

to the existing virtual 20740C-NANO-


located at C:\ClusterStorage\Volume1

6. Open Settings for TestClusterVM.

39 of 53 3/12/2019, 1:29 PM
about:blank

7. Enable the option for migration to computers with a different processor version.

8. On the Roles node, start the VM.

Lesson 3: Key features for VMs in a clustered


environment

For VMs environment, Network Health on


Shutdown that the failover clustering help
increase high availability. This lesson will both demonstrate explain the
configuration of these key features, and how they help to increase virtual high
availability during unexpected and expected outages.

Lesson objectives
After you will be able to:

• Describe Protection.

• Configure Protection.

• Explain the actions taken on VMs when a host shuts down.

• Explain drain on shutdown.

Overview Health Protection

40 of 53 3/12/2019, 1:29 PM
about:blank

Network Health Protection was introduced in Windows Server 2012 R2 and is


available 2016. Though we recommend teaming as the
first level your server to achieve with
Hyper-V, that a network can and create
availability Health Protection allows from one
failover another failover cluster node connectivity on that
specific network adapter becomes disconnected. This feature increases the
availability of the VM by moving the VM automatically instead of waiting for manual
intervention.

Each resource that continually checks resources are


available node that is hosting checks
every sometimes the network disconnection quickly,
and seconds. Once it discovers the
resource other nodes to see if the resources run the VM are
available. resources are available, the cluster a live migration
to move to another failover cluster node. In many cases, a network failure requires
the VM to wait in a queued state for movement to another failover cluster node.

41 of 53 3/12/2019, 1:29 PM
about:blank

Each network adapter per VM can control this feature. By default, the Protected
Network setting is enabled for all virtual network adapters. You can find this property
in the advanced configuration section of the network adapter settings on each VM.
This allows you to remove the setting if a network is not important enough to trigger a
live migration if communications are lost.

Overview taken on VMs down

In Windows Server 2012 R2 and later versions, when a shutdown is initiated on a


Hyper-V host machine, that action that is taken by that VM depends on the settings
set for each VM. These options are found in the VM settings by selecting the
Automatic

The does on the shutdown

• Save machine state. This option is default option. In


Windows Server 2012 R2 and later this option creates a .bin file reserving space

42 of 53 3/12/2019, 1:29 PM
about:blank

for the memory to be saved when placing the VM in a saved state. If the host
begins a shutdown, Hyper-V Virtual Machine Management Service (VMMS) will
begin saving the VMs’ memory to the hard drive and placing the VMs in a saved
state.

• Turn off the virtual machine. This second option will allow VMMS to turn off the
VM Hyper-V and entering the VM
operating as no different from physical
machine.

• Shutdown operating system. Unlike this third


and requires that integrated services properly on the VM,
and that specifically, you have selected and installed Operating system
shutdown on the guest VM. This option, however, unlike the Turn off the virtual
machine option, allows a graceful shutdown of the VM from the host’s perspective
including the guest. By utilizing the integrated services, VMMS will trigger a
shutdown machine. Once initiated, the guest
operating an off state.

Hyper-V host goes offline unexpectedly, process will


not have received any information about the shutdown, and thus none of
these actions will occur. This is only useful when a shutdown is initiated on a
Hyper-V host.

Overview of drain on shutdown

43 of 53 3/12/2019, 1:29 PM
about:blank

In Windows 2012 and later when placing a Hyper-V failover cluster node in a paused
state, maintenance mode, all VMs migrated
to other This removes downtime required
for shutting host. However, if a shutdown without
placing mode, all VMs would node via a
quick would mean that the VM would state by saving
all activities to disk, moving the VM role, and then resuming the VM.

Windows Server 2012 R2 introduced draining on shutdown to resolve this issue. This
feature is also available Windows Server 2016 and enabled by default. A failover
cluster shutdown no longer saved state
and then instead will drain the migrations
instead Because live migration
downtime shutdown of failover cluster

Drain on shutdown should be enabled by default. However, to verify this setting, run
the following Windows PowerShell command:

44 of 53 3/12/2019, 1:29 PM
about:blank

(Get-Cluster).DrainOnShutdown

After running this Windows PowerShell command, you will see one of two options: “1”
means it is enabled, and “0” means it is disabled.

recommend draining all roles before failover cluster


shutdown provides added user error and
application or the operating shutdown
control. This also does protect against abrupt
shutdowns of the Hyper-V failover cluster node. If the node is shut down
before, without the operating system initiating a shutdown, the VMs will go to
an off state and begin coming online on another node.

Demonstration: Configure drain on shutdown


In this how to:

• Live

• Configure shutdown.

Demonstration steps

1. On LON-NVHOST4, in Failover Cluster Manager, start Live Migration.

2. from LON-NVHOST3

option is LON-NVHOST3 LON-NVHOST3 and


lab.

45 of 53 3/12/2019, 1:29 PM
about:blank

3. Connect to TestClusterVM, and then ensure that you can operate it.

4. Shut down TestClusterVM.

5. On LON-NVHOST3, select the drain on shutdown option, and at a Windows


PowerShell command prompt, type the following command, and then press
Enter:

DrainOnShutdown

should return a value of “1

6. Shut down LON-NVHOST4.

7. Observe TestClusterVM moving to LON- NVHOST3

Check

Discovery
When is a good time to remove the Network Health Protections settings?

Show solution Reset

Check

Select
What enable VMMS to easily operating
system host-initiated shutdown?

Integrated Services, Operating system shutdown

Automatic Stop Action, Save the virtual machine state

46 of 53 3/12/2019, 1:29 PM
about:blank

Automatic Stop Action, Turn off virtual machine

Automatic Stop Action, Shut down the guest operating system

Integrated Services, Backup (volume checkpoint)

Check answer Show solution Reset

Lab: failover clustering Windows


Server Hyper-V

Scenario
The initial deployment of VMs on Hyper-V has been successful for Adatum
Corporation. As a next step in VM deployment, A. Datum 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, considering options run on
Hyper-V

As one administrators at A. responsible for


integrating failover clustering to ensure 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 Hosts.

Objectives
After will be able to:

• Configure a failover cluster for Hyper-V.

47 of 53 3/12/2019, 1:29 PM
about:blank

• Configure a highly available VM.

Lab setup

Estimated time: 75 minutes

Virtual 20740C-LON-DC1-C

Host 20740C-LON-HOST2, 20740C-LON-NVHOST3 20740C-LON-


NVHOST4

User name: Adatum\Administrator

Password: Pa55w.rd

For this the available VM environment.

Before must complete the

1. classroom computer, and then, Manager, select


20740C-LON-HOST2.

2. Sign in to LON-HOST2 with the following credentials:

o User name: Adatum\Administrator

Exercise virtual environment

Scenario

48 of 53 3/12/2019, 1:29 PM
about:blank

To test failover clustering for Hyper-V clusters, you have decided to install the
Hyper-V role on one physical server, implement nested virtualization on two VMs and
install Hyper-V on the two nested VMs.

The main tasks for this exercise are as follows:

1. VMs, and nested virtualization

2. virtualization hosts

Detailed Steps ▼

Detailed Steps ▼

Result: After completing this exercise, you should have successfully imported VMs
and enabled nested virtualization on 20740C-LON-NVHOST3 and 20740C-LON-
NVHOST4

Exercise failover cluster

Scenario

The initial deployment of VMs on Hyper-V is very successful for A. Datum. As a next
step in the deployment, A. Datum is considering ways to ensure that the services and
applications deployed on the VMs are highly available. As part of the implementation
of high network services and also is
considering the VMs that run available.

You planning the VM and storage


implementing highly available services Cluster.

The main tasks for this exercise are as follows:

49 of 53 3/12/2019, 1:29 PM
about:blank

1. Connect to the iSCSI target from both host machines

2. Configure failover clustering on both host machines

3. Configure disks for a failover cluster

Detailed Steps

Detailed Steps

Detailed Steps

Result: After completing this exercise, you should have successfully configured
the failover clustering infrastructure for Hyper-V.

Exercise 3: Configuring a highly available VM

Scenario

After Hyper-V failover cluster, as highly


available addition, you want to evaluate and test Storage
Migration.

The main tasks for this exercise are as follows:

1. iSCSI target

2. highly available

3.

4. shutdown

5. Prepare for the next module

50 of 53 3/12/2019, 1:29 PM
about:blank

Detailed Steps ▼

Detailed Steps ▼

Detailed Steps ▼

Detailed Steps ▼

Detailed Steps

Result exercise, you should configured


the

Review Question(s)

Check Your Knowledge

Discovery
What might not want Protected for a Virtual
Network

Show solution

Check Your Knowledge

Discovery
What is the difference between live migration and storage migration?

Show solution

Module takeaways

Best Practice:
• Develop standard configurations before you implement highly available

51 of 53 3/12/2019, 1:29 PM
about:blank

VMs. You should configure the host computers to be as close to identical


as possible. To ensure that you have a consistent Hyper-V platform, you
should configure standard network names and use consistent naming
standards for CSV volumes.

• Use new features in Hyper-V Replica to extend your replication to more


than one server.

• Consider using Scale-Out File Servers clusters as storage for highly


available VMs.

• Implement VM Manager. VM Manager provides a management layer on


top of Hyper-V and Failover Cluster Manager that can stop you from
making mistakes when you manage highly available VMs. For example, it
stops you from creating VMs on storage that is inaccessible from all nodes
in the cluster.

Common Issues and Troubleshooting Tips

Common Troubleshooting

VM failover CSV Please see Student course.


and migrating storage to CSV.

A VM fails over to another node in the host Please see Student Companion Content for this course.
cluster, but loses all network connectivity.

Four hours after restarting a Hyper-V host Please see Student Companion Content for this course.
that is a member of a host cluster, there are
still no VMs running the host.

Review

Check

Discovery
Do you have to implement CSV to provide high availability for VMs in VMM in Windows

52 of 53 3/12/2019, 1:29 PM
about:blank

Server 2016?

Show solution Reset

Tools
Tools for implementing failover clustering with Hyper-V include:

• Failover

• Hyper-V

• VMM

53 of 53 3/12/2019, 1:29 PM

You might also like