Virtual Hard Disk Sharing Overview

 

Applies To: Windows Server 2012 R2

Starting in Windows Server 2012 R2, Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster. This is also referred to as a virtual machine failover cluster. For information on creating and enabling a shared virtual hard disk, see Configure a Shared Virtual Hard Disk.

Key benefits

Sharing a virtual hard disk file (.vhdx) means that you can create and manage a guest failover cluster to protect the application services running inside your virtual machines. Before Windows Server 2012 R2, if you wanted to create a Hyper-V guest failover cluster, you needed to expose your storage topology to the virtual machine.

Starting in Windows Server 2012 R2, you can deploy a Hyper-V guest failover cluster that is no longer bound to your storage topology. You can implement a guest failover cluster by using a shared virtual hard disk, Fibre Channel, Server Message Block (SMB), Storage Spaces, or iSCSI storage options. Shared virtual hard disks are only available in Windows Server 2012 R2. Hyper-V makes it possible to share a virtual hard disk file between multiple virtual machines. Sharing a virtual hard disk file (.vhdx) provides the shared storage that is necessary for a Hyper-V guest failover cluster.

Using a shared virtual hard disk is ideal for the following situations:

  • SQL Server database files.

  • File server services running within a virtual machine.

  • Database files that reside on shared disks.

Note

When you share a virtual hard disk file, these tasks aren't supported:

Guest Failover Clusters

The following information will help you understand and deploy a guest failover cluster by using a shared virtual hard disk.

Shared virtual hard disk format

Shared virtual hard disk functionality in guest failover clusters exclusively uses the .vhdx file format. Although the shared virtual hard disk must use the .vhdx file format for the data drive, the operating system disk for a virtual machine can use either the .vhd or the .vhdx file format.

Supported virtual machines

Generation 1 and Generation 2 virtual machines are supported in a guest failover cluster using a shared virtual hard disk.

Supported guest operating systems

Supported guest operating systems for guest clusters that use a shared virtual hard disk include Windows Server 2012 R2 and Windows Server 2012. To support Windows Server 2012 as a guest operating system, Windows Server 2012 R2 Integration Services must be installed within the guest (virtual machine).

Deploying a shared virtual hard disk in a guest failover cluster

A Hyper-V guest failover cluster that uses a shared virtual hard disk has two preferred deployment models. The shared virtual hard disk for the guest failover cluster can be deployed on:

  • Cluster Shared Volumes (CSVs) on block storage (including clustered Storage Spaces).

  • Scale-Out File Server with SMB 3.0 on file-based storage.

A Hyper-V guest failover cluster can be configured and deployed by using Hyper-V Manager and Failover Cluster Manager. You can also use Windows PowerShell.

Note

When you use shared VHDX with local block storage, synchronization must occur for shared VHDX file access. If the virtual machines are running on different nodes, this involves network redirection for the synchronization activity. If you have fast block connectivity combined with slow intra-cluster network communication, this synchronization activity results in I/O variance (either redirected or direct) based on the node. This happens on a per file basis. (The entire CSV is not in redirected mode.) To increase performance, we recommend that you scale the intra-cluster network. Be aware that this is not a consideration when you use file-based storage. When you use a compute layer of file-based storage over SMB together with a remote Scale-Out File Server (SOFS), this shared file access orchestration is performed by the SOFS. With a SOFS, SMB sessions are transitioned to optimize file access. The SMB sessions co-exist on the same node that performs the synchronization. As a result, there is no network communication.

For deployment steps, see Deploy a Guest Cluster Using a Shared Virtual Hard Disk.

Using Cluster Shared Volume

One option for using virtual hard disk sharing is to use Cluster Shared Volumes. The following graphic provides an example configuration. You can also use other types of shared storage if required.

Using Scale-Out File Server with SMB 3.0

A second option for virtual hard disk sharing is to use a Scale-Out File Server. The following graphic provides an example configuration. You can also use other types of shared storage if required.

Requirements

To configure a guest failover cluster that uses shared virtual hard disks, you require the following:

  • At least a two-node Hyper-V failover cluster.

  • Servers must be running Windows Server 2012 R2.

  • Servers must belong to the same Active Directory domain.

  • Availability of configured shared storage resources—for example, CSVs on block storage (such as clustered storage spaces) or a Scale-Out File Server cluster (running Windows Server 2012 R2) with SMB 3.0 (for file-based storage).

  • Sufficient memory, disk, and processor capacity within the failover cluster to support multiple virtual machines that are implemented as guest failover clusters.

See Also

Virtual hard disk format
Virtual hard disk resizing