How to setup SMB/NFS File Server with Azure Shared Disks?

Kumar Allamraju
3 min readJul 2, 2020

This blog is a continuation of my previous article on Windows Clustering in Azure with Azure Shared Disks. After setting up the Windows Clustering in Azure, launch the failover cluster wizard to setup general file share or Scale out File Server. The assumption is you already have a disk attached to the Cluster Manager. For more details pls refer to my previous blog

  • Click on “Configure Role” in your Failover Cluster Manager
  • Go through the configuration wizard to create a file server role
  • Set a static IP to this file server
  • Bring the file server online
  • We have to create an internal load balancer for DNS resolution as well as to route the traffic to the active node.
  • I have an option to create a new ILB or re-use an existing ILB instance and add a new frontend IP configuration.
  • We also need to add a new Load Balancing rule
  • Go to Settings >> Load balancing rules
  • Go through the wizard; make sure floating IP option is enabled.
  • The final step in the configuration is to run the following PowerShell script on one of your cluster nodes. This will allow the Cluster IP Address to respond to the ILB probes and ensure that there is no IP address conflict between the Cluster IP Address and the ILB. Please take note; you will need to edit this script to fit your environment. The subnet mask is set to 255.255.255.255, this is not a mistake, leave it as is. This creates a host specific route to avoid IP address conflicts with the ILB.
# Define variables
$ClusterNetworkName = “”
# the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)
$IPResourceName = “”
# the IP Address resource name
$ILBIP = “”
# the IP Address of the Internal Load Balancer (ILB)
Import-Module FailoverClusters
# If you are using Windows Server 2012 or higher:
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{Address=$ILBIP;ProbePort=59999;SubnetMask="255.255.255.255";Network=$ClusterNetworkName;EnableDhcp=0}
# If you are using Windows Server 2008 R2 use this:
#cluster res $IPResourceName /priv enabledhcp=0 address=$ILBIP probeport=59999 subnetmask=255.255.255.255
  • Execute the above shell script and restart the file server.
  • You should now be able to access the file share outside the clustered nodes
  • From your guest VM just add a file \\kafs2.allamraju.com\myfileshare
  • That’s it. The process is very similar to file server setup in On-Premises. The only difference is to create an Internal Load Balancer in Azure.

--

--