Windows Server 2016 Storage Spaces Direct (S2D) SOFS cluster

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check This template will create a Storage Spaces Direct (S2D) Scale-Out File Server (SOFS) cluster using Windows Server 2016 in an existing VNET and Active Directory environment.

This template creates the following resources by default:

  • A Premium Storage Account for storing VM disks for each storage node
  • A Standard Storage Account for a Cloud Witness
  • A Windows Server 2016 cluster for storage nodes, provisioned for Storage Spaces Direct (S2D) and the Scale-Out File Server (SOFS) role
  • One Availability Set for the cluster nodes

To deploy the required Azure VNET and Active Directory infrastructure, if not already in place, you may use this template to deploy the prerequisite infrastructure.

Click the button below to deploy from the portal:

Deploy To Azure Deploy To Azure US Gov Visualize


  • The default settings for storage are to deploy using premium storage, which is strongly recommended for S2D performance. When using Premium Storage, be sure to select a VM size (DS-series, GS-series) that supports Premium Storage.

  • The default settings deploy 2 data disks per storage node, but can be increased to up to 32 data disks per node. When increasing # of data disks, be sure to select a VM size that can support the # of data disks you specify.

  • The default settings for compute require that you have at least 2 cores of free quota to deploy.

  • The images used to create this deployment are

    • Windows Server 2016 Datacenter Edition - Latest Image
  • To successfully deploy this template, be sure that the subnet to which the storage nodes are being deployed already exists on the specified Azure virtual network, AND this subnet should be defined in Active Directory Sites and Services for the appropriate AD site in which the closest domain controllers are configured.

  • SPECIAL THANKS to @mmarch on code contributions for dynamic data disk selection nested templates!

Deploying Sample Templates

You can deploy these samples directly through the Azure Portal or by using the scripts supplied in the root of the repo.

To deploy the sammple using the Azure Portal, click the Deploy to Azure button found above.

To deploy the sample via the command line (using Azure PowerShell or the Azure CLI) you can use the scripts.

Simple execute the script and pass in the folder name of the sample you want to deploy. For example:

.\Deploy-AzureResourceGroup.ps1 -ResourceGroupLocation 'eastus' -ArtifactStagingDirectory '[foldername]' -a [foldername] -l eastus -u

If the sample has artifacts that need to be "staged" for deployment (Configuration Scripts, Nested Templates, DSC Packages) then set the upload switch on the command. You can optionally specify a storage account to use, if so the storage account must already exist within the subscription. If you don't want to specify a storage account one will be created by the script or reused if it already exists (think of this as "temp" storage for AzureRM).

.\Deploy-AzureResourceGroup.ps1 -ResourceGroupLocation 'eastus' -ArtifactStagingDirectory '301-storage-spaces-direct' -UploadArtifacts -a '301-storage-spaces-direct' -l eastus -u

Tags: cluster, ha, storage spaces, storage spaces direct, S2D, windows server 2016, ws2016

Tags: Microsoft.Resources/deployments, Microsoft.Compute/availabilitySets, Microsoft.Storage/storageAccounts, Microsoft.Network/networkInterfaces, Microsoft.Compute/virtualMachines/extensions, DSC, Microsoft.Compute/virtualMachines