Shared Storage for multiple Virtual Mchines

~OSD~ 2,126 Reputation points
2024-03-11T20:42:30.45+00:00

Hi

I have 3 VMs running Windows Server 2022, all servers are independent (workgroup, not part of any domain).

VM1 Network: 10.10.10.1

VM2 Network: 172.16.0.1

VM3 Network: 192.168.1.1

Requirement: All three 3 VMs need storage disks and the contents/data is the same. I think it is not wise to have 3 data disks (of the same content) and attach them to each server.

Question: Is there a better approach where each VM can access some sort of central shared data disk instead? any step-by-step guide?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,061 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,043 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,523 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Marcin Policht 8,260 Reputation points MVP
    2024-03-11T21:17:56.1+00:00

    Use iSCSI storage.

    https://lokna.no/?p=2670


    hth

    Marcin


  2. kobulloc-MSFT 23,181 Reputation points Microsoft Employee
    2024-03-11T22:24:04.29+00:00

    Hello, @~OSD~ !

    How do I share a disk/storage with multiple VMs?

    Azure shared disks are supported on Windows Server 2008 and newer (as well as on some versions of Linux). Azure shared disks allows you to attach a managed disk to multiple VMs simultaneously and uses a cluster manager, like Windows Server Failover Cluster (WSFC), or Pacemaker, that handles cluster node communication and write locking.

    There are several use cases here so it's best to refer to the documentation (which does provide quite a bit of information on flow and architecture). I've included two of the examples below:

    https://learn.microsoft.com/en-us/azure/virtual-machines/disks-shared

    The following is an example of a 2-node WSFC using clustered shared volumes. With this configuration, both VMs have simultaneous write-access to the disk, which results in the ReadWrite throttle being split across the two VMs and the ReadOnly throttle not being used.

    CSV two node ultra example

    The following diagram illustrates another common clustered workload consisting of multiple nodes reading data from the disk for running parallel processes, such as training of machine learning models.

    Four node VM cluster, each node registers intent to write, application takes exclusive reservation to properly handle write results


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image


  3. Net Runner 505 Reputation points
    2024-03-12T15:48:27.15+00:00

    Hi,

    A shared VHDX located on one of the servers is probably the most straightforward option, but if that host server fails, you lose your data.

    A better option is using Storage Spaces Direct https://aka.ms/s2d (if you have a Windows Server Datacenter license) or Virtual SAN https://www.starwindsoftware.com/vsan software to mirror the data between hosts/VMs, so that if any of the elements fail, you and your users still have access to the data and can keep working.

    Depending on the amount of data, size, and growth, using dedicated network storage (SAN or NAS) for that purpose may be another valid alternative.


  4. Alex Bykovskyi 1,681 Reputation points
    2024-03-12T18:09:23.3133333+00:00

    Thanks for mentioning StarWind,

    Hey,

    As mentioned, you need some kind of shared storage, which can be used on multiple VMs. iSCSI is an option and StarWind VSAN can serve iSCSI storage to your VMs.

    Shared storage is also needed for shared VHDX. https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn265980(v=ws.11)

    As another option, you can deploy HA file server, which can be used as a storage for VMs. Might help: https://www.starwindsoftware.com/resource-library/starwind-virtual-san-for-hyper-v-2-node-hyperconverged-scenario-with-windows-server-2016/#43a7eaf4b5519b31dd06d56e6cd01d39021e39fb

    Cheers,

    Alex Bykovskyi

    StarWind Software

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    0 comments No comments

  5. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,311 Reputation points Microsoft Vendor
    2024-04-02T06:25:20.37+00:00

    Hi,

    Here are two different ways to solve this issue:

    1. First, we can use the iSCSI protocol to connect all disks to different machines, provided that an independent machine is needed as a storage server. Here is the document for your reference:

    iSCSI in the LAB - BlackCat Reasearch Facility (lokna.no)

    1. The other way is to create a Failover Cluster and configure the Cluster Shared Volumes (CSV).

    Use Cluster Shared Volumes in a failover cluster | Microsoft Learn

    Create a failover cluster | Microsoft Learn

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments