64 Node Sharing Virtual Hard Disk (shared VHDX) in Failover Clustering Windows Server 2012 R2 #Winserv #ITPro

The most common question on clusters is do I need shared storage ? Yes you do oh such a huge cost eh are you using windows server 2012 R2 no not yet.

Well you should use 2012R2 one of the best options is Shared VHDX

Hyper-V V3.0 ( windows server 2012 R2 )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.

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.

In this scenario I have a 64 node Cluster based on Shared VHDX. Let me show you how you should start.

First we need some virtual disk files VHDX and the quickest and easiest way to do this is by powershell

If you run this line you will create 10 Virtual disk on the M drive with a fixed size of 4 GB.  if you want other options use the get-help New-VHD

1..10 | % { New-VHD -Path m:\ShareData$_.VHDX -Fixed -SizeBytes 4GB }









This is Cool in a few seconds several disks. yes but what now well If you have a cluster already then you can add the disk to the VM and use them if not you can create a cluster.

But Robert adding the disk is so much work, I know. Imaging you have 64 nodes this will take days yes how fun is that User PowerShell

In the following line you can easy add the disk to the VM

1..10 | % { $p = "m:\shareData" + $_ + ".VHDX" ; 10..66 | % { $v = "Demo" + $_; Write-Host $v, $p; Add-VMHardDiskDrive -VMName $v -Path $p -ShareVirtualDisk } }












But you can also share a disk in the GUI and the best part is it can be done live.



As you can see several steps are needed to do this. just with one line in PowerShell it is done.

Now that We added the Disks We can use the disks.

Easy as Get-ClusterAvailableDisk | Add-ClusterDisk  or in the GUI


Now that the disks are in place We can create a a sample File server that is using this disk.

I installed already the file server role on all the nodes. not by hand Winking smile

1..9 | % { Install-WindowsFeature -computername Demo0$_ File-Services, FS-FileServer, Failover-Clustering }
1..9 | % { Install-WindowsFeature -computername Demo0$_ RSAT-Clustering -IncludeAllSubFeature }

So the first nine servers are file servers. but keep in mind if you do this you have to adjust the ownership, creating a file server every node will own this and if not all the nodes have the FS role installed you will get in trouble !


Now you can add the share to the fileserver. Remember do this in the Cluster Manager and not on the share it self


Now we have a File server on a shared VHDX isn’t that cool.


Author: Robert Smit [MVP]

Robert Smit is Senior Technical Evangelist and is a current Microsoft MVP in Clustering as of 2009. Robert has over 20 years experience in IT with experience in the educational, health-care and finance industries. Robert’s past IT experience in the trenches of IT gives him the knowledge and insight that allows him to communicate effectively with IT professionals who are trying to address real concerns around business continuity, disaster recovery and regulatory compliance issues. Robert holds the following certifications: MCT - Microsoft Certified Trainer, MCTS - Windows Server Virtualization, MCSE, MCSA and MCPS. He is an active participant in the Microsoft newsgroup community and is currently focused on Hyper-V, Failover Clustering, SQL Server, Azure and all things related to Cloud Computing and Infrastructure Optimalization. Follow Robert on Twitter @ClusterMVP Or follow his blog https://robertsmit.wordpress.com Linkedin Profile Http://nl.linkedin.com/in/robertsmit Robert is also capable of transferring his knowledge to others which is a rare feature in the field of IT. He makes a point of not only solving issues but also of giving on the job training of his colleagues. A customer says " Robert has been a big influence on our technical staff and I have to come to know him as a brilliant specialist concerning Microsoft Products. He was Capable with his in-depth knowledge of Microsoft products to troubleshoot problems and develop our infrastructure to a higher level. I would certainly hire him again in the future. " Details of the Recommendation: "I have been coordinating with Robert implementing a very complex system. Although he was primarily a Microsoft infrastructure specialist; he was able to understand and debug .Net based complext Windows applications and websites. His input to improve performance of applications proved very helpful for the success of our project

One thought on “64 Node Sharing Virtual Hard Disk (shared VHDX) in Failover Clustering Windows Server 2012 R2 #Winserv #ITPro”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: