Use a shared vhdx as shared drive

I have a Windows Cluster made up of two nodes connected via SAS to a storage array. I have two virtual machines configured with their hard disks (vhdx) on the shared storage. They are up and running correctly. Now I need to build a “shared volume” between these two vm, that is a disk with files and folders in, that can be accessed from both servers, like an smb share. I understood that it was possible creating a vhdx file on the shared storage and then attaching it to both vm flagging “enable virtual hard disk sharing” but I think I misunderstood something. Can you tell me if this is realizable or not, end eventually what’s the best practice to reach my goal? I basically need a storage accessible simultaneously from two virtual machines, possibly without setup a separate file server to expose smb shares.

Answer

Before I answer your question, I want to add a little side note. It is possible to add a shared VHDX to two independent virtual machines and both can access the VHDX at the same time. However, it is not supported. TomTom already explained why.

So if you tried to do that out of curiosity and you found it working: don’t use it!

To answer your question: If you need a highly available shared storage, create a Guest Failover Cluster and add a File Server cluster role that uses the shared VHDX as storage. Using little words, this is how you would do it:

  1. Install a Windows Server 2012 R2 on each HV node. Those are the guest nodes.
  2. Create a new VHDX and add it to both guest cluster nodes as a shared VHDX.
  3. Install and configure the Failover Cluster feature on each guest node.
  4. In the guest cluster, add the new drive to the cluster storage.
  5. Add the File Server cluster role to your guest failover cluster.
  6. Configure your network shares.

More literature on that topic:

Attribution
Source : Link , Question Author : maurice , Answer Author : Daniel

Leave a Comment