Creating A Virtual WS2012R2 SOFS with Shared VHDX & Storage Spaces

In this post, I’ll show you how I created a Windows Server 2012 R2 SMB 3.0 Scale-Out File Server that uses Shared VHDX to create a simulated JBOD for clustered Storage Spaces.  This is completely unsupported for production, but is nice for the lab to demo, teach and learn.

Shared VHDX allows us to build a guest cluster without complicating storage (SAN, SMB 3.0, iSCSI, etc).  Yesterday I blogged about how I was creating a demo Scale-Out File Server using a VMM 2012 R2 Service Template.  That template used an iSCSI target VM.  Why did I do it that way?  Shared VHDX requires that:

  • Your hosts are clustered – net necessarily in the same cluster
  • The shared VHDX file is placed on SMB 3.0 or CSV – note that an SMB 3.0 file share can be used by multiple host clusters

In my lab, my virtual SOFS is placed onto a single storage box that is running Hyper-V.  At TechEd, Jose Barreto mentioned a solution for labs that is unsupported but works.  Using this I can use my single non-clustered host to run VMs that access a shared VHDX.  I can then cluster those VMs to create a guest cluster, e.g. a virtual SOFS.

The steps:

  1. Run (PowerShell) Install-WindowsFeature Failover-Clustering on the host.  There is no need to create a cluster from this host.
  2. Identify the volume that will store the shared VHDX files, e.g. D: drive.
  3. Run FLTMC.EXE attach svhdxflt D: where D: is the drive letter that you just identified.

Now you’re ready to create a shared VHDX.  My VMs are in D:Virtual Machines.  I’m creating a guest cluster called Demo-FSC1.  The shared VHDX files will be stored in D:Shared VHDXDemo-SOFS1.  I created Demo-FSC1 Witness Disk.VHDX (1 GB in size) and Demo-FSC1 Disk1.VHDX (100 GB in size) and stored it in that folder (D:Shared VHDXDemo-SOFS1).

Now for the VMs:

  1. I created 2 VMs for my virtual SOFS, Demo-FS1 and Demo-FS2, giving them all enough network connections for my design (see below screenshot, highlighted in green [requires guest OS QoS]).
  2. I added the shared VHDX files to the first SCSI controller on both virtual machines.  Don’t overthink this – there is no replication so please don’t ask.  I couldn’t possibly make this clearer.  Each individual VHDX (a total of 2) is connected to each of the 2 VMs (see below).
  3. I make sure to open up the advanced settings of the shared VHDX on both VMs and check the box Enable Virtual Hard Disk Sharing.
  4. I went on to create and add Demo-FSC1 Disk2.VHDX and Demo-FSC1 Disk3.VHDX, both 100 GB in size.


At this point, I do all the usual storage, networking and clustering stuff in the guest OS of the 2 VMs.  In the cluster, I made sure both storage networks had client access enabled (with an IP address).  When creating the guest cluster, I did not add storage.  Instead, I did something else that is unsupported.

I took the 3 shared VHDX data disks, and created a new storage space.


From this, I created 2 virtual disks, one with NTFS and one with ReFS, and converted bot volumes into CSV.  Now I have what I need to finish off the creation of the SOFS role on the file server cluster.

Finsihed Storage

Now I add the SOFS role (File Server for Application Data) to the cluster, wait a while for the CAP to come online (remember to delegate permissions to the cluster’s OU to the cluster object so the cluster can create the SOFS computer object), and then create the file shares.

SOFS with Shares

What I haven’t done or shown:

  • QOS for the storage NICs.
  • SMB Constraints

Now I have my storage.  It’s time to prep VMM 2012 R2 to do some bare metal host deployment and get a Hyper-V cluster up and running.

Please follow and like us:

14 Replies to “Creating A Virtual WS2012R2 SOFS with Shared VHDX & Storage Spaces”

  1. I followed the instructions and the vhdx was able to attached to two VMs which is not part of the cluster … just want to share the drive betweem VMs … maybe this is not intended way? when i added file to shared vhdx from one VM, it did not show in another VM

    • This is not intended – disks are “shared nothing” in Windows. Your only option is to create a shared folder.

  2. On a Client i cannot run the command:
    FLTMC.EXE attach svhdxflt D:
    It Returns: Attach failed with error: 0x801f0013
    The system could not find the filter specified.

  3. Ok then it was a mistake as i see your answer to: Is it Possible to create a shared vhdx on a Client hyper-v System? 😉

  4. I attempted doing this in Virtual Box using there shared disks. Everything works up until creating the pool then disks get stuck in an operational status of “starting”. Any thoughts?
    I will reattempt with HyperV after reading this. But still wonder why the disks get stuck in starting.

Leave a Reply

Your email address will not be published. Required fields are marked *

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