How to deploy Azure Netapp Files (NFS and SMB) for testing
Published Sep 10 2019 11:35 AM 2,829 Views




The Azure Netapp Files service has become very popular storage solution, satisfying the I/O requirements for many customer workloads (e.g. Oil and Gas, Manufacturing and Financial). Procedures for deploying Azure Netapp Files using the NFS and SMB protocols and accessing it from a Linux client and Windows client respectively will be discussed. The AzureCAT HPC azurehpc and Azure azure-quickstart-templates repositories will be used for the deployment.


Procedure to deploy Azure Netapp Files using the NFS protocol


  1. Use the azurehpc repository to deploy the network, Linux client, Windows client, ANF account, ANF pool and ANF volume (NFS). First get the azurehpc repository.

    1.       git clone
    2.  Create a config.json file for the deployment. The config.json deploys a Linux client and windows client. ANF/NFS is mounted on the Linux client (See the appendix for the complete config.json file.)
    1.  Deploy infrastructure (Make sure you are in the same directory as your config.json)
      1.  azure-build
  1.  Log-in to Linux headnode

    1.  azhpc-connect headnode
  2.  Check that anf is mount correctly

    1.  df -h
      Filesystem Size Used Avail Use% Mounted on
      /dev/sda2 30G 4.4G 26G 15% /
      devtmpfs 32G 0 32G 0% /dev
      tmpfs 32G 0 32G 0% /dev/shm
      tmpfs 32G 9.1M 32G 1% /run
      tmpfs 32G 0 32G 0% /sys/fs/cgroup
      /dev/sda1 497M 65M 433M 13% /boot
      /dev/sdb1 126G 61M 120G 1% /mnt/resource 100T 256K 100T 1% /netapps
      tmpfs 6.3G 0 6.3G 0% /run/user/1000


Procedure to deploy Azure Netapp Files using the SMB protocol


  1.  Deploy an Active directory server using active-directory-new-domain from the azure-quickstart-templates.
    1.  First get the repository and go to the active-directory-new-domain directory
      1.  git clone
    2.  Edit azuredeploy.json to allow it to be deployed via az cli and use the existing azurehpc infrastructure. The detailed edits are documented in the appendix.
    3.  Edit azuredeploy.parameters.json
      1.  {
        "$schema": "
        "contentVersion": "",
        "parameters": {
        "adminUsername": {
        "value": "hpcadmin"
        "adminPassword": {
        "value": "hpcadmin.123"
        "domainName": {
        "value": "anf.local"
        "dnsPrefix": {
        "value": "anf"
    4.  Deploy AD server, note: deploy AD in its own resource group.

      1.  az group deployment create -g anf-smb-ad-wus2 --template-file 
        azuredeploy.json --parameters @azuredeploy.parameters.json
    5.  Using the ANF pools, create ANF volume using the SMB protocol, set volume size and SMB share name.
    6.  Log-in to windows client using the user/password defined in the azurehpc deployment.
    7.  Change Windows client DNS server (set it to the private IP of the AD server)
      1.  First find the Interfaceindex
        1.  PS C:\Users\azureuser> Get-NetIPConfiguration
          InterfaceAlias : Ethernet
          InterfaceIndex : 6
          InterfaceDescription : Microsoft Hyper-V Network Adapter
          NetProfile.Name : Network
          IPv4Address :
          IPv6DefaultGateway :
          IPv4DefaultGateway :
          DNSServer :
        2.  Change DNS server
          1.  Set-DnsClientServerAddress -InterfaceIndex 6 -ServerAddresses
        3.  Check the DNS server is working.
          1.  PS C:\Users\hpcadmin> nslookup anf.local
            Server: UnKnown

            DNS request timed out.
            timeout was 2 seconds.
            DNS request timed out.
            timeout was 2 seconds.
            Name: anf.local

    8.  Join the Windows client to AD (you will be prompted for a password)
      1.  PS C:\Users\azureuser> Add-Computer -DomainName anf.local -Credential anf\hpcadmin
      2. Restart the Windows client.

    9.  Map network drive, go to the Azure portal to the ANF SMB volume you created and take note of the SMB mounting instructions (e.g \\testing-2e7d.anf.local\anfvol2). 
      1.  File explorer --> network --> map network drive
      2.  Specify drive (e.g Z:) and file share location (e.g \\testing-2e7d.anf.local\anfvol2)

    10.  Check that the ANF/SMB file share is mounted and available on the Windows client.
      1.  Click on "This PC", should see the mounted ANF/SMB drive, click on properties to see more details about the file share.


Testing Azure Netapp Files

The azurehpc repository contains scripts for running IOR and FIO throughput and IOPS storage benchmarks, see azurehpc/apps/ior and azurehpc/apps/fio.





Azurehpc config.json file used to deploy, ANF/NFS, headnode and Windows client.


"location": "variables.location",
"resource_group": "variables.resource_group",
"install_from": "headnode",
"admin_user": "hpcadmin",
"variables": {
"hpc_image": "OpenLogic:CentOS-HPC:7.6:latest",
"win_image": "MicrosoftWindowsDesktop:Windows-10:rs5-pron:latest",
"win_password": "",
"location": "",
"resource_group": "",
"vm_type": "Standard_D16s_v3",
"win_vm_type": "Standard_D16s_v3",
"vnet_resource_group": "variables.resource_group"
"vnet": {
"resource_group": "variables.vnet_resource_group",
"name": "hpcvnet",
"address_prefix": "",
"subnets": {
"admin": "",
"viz": "",
"storage": "",
"compute": ""
"storage": {
"hpcnetapp": {
"type": "anf",
"subnet": "storage",
"pools": {
"anfpool" : {
"size": 8,
"service_level": "Premium",
"volumes": {
"anfvol1" : {
"size": 4,
"mount": "/netapps"
} } }} } },
"resources": {
"headnode": {
"type": "vm",
"vm_type": "variables.vm_type",
"public_ip": true,
"image": "variables.hpc_image",
"accelerated_networking": true,
"subnet": "compute",
"tags": [
"winnode": {
"type": "vm",
"vm_type": "variables.win_vm_type",
"accelerated_networking": true,
"password": "variables.win_password",
"public_ip": true,
"image": "variables.win_image",
"subnet": "compute",
"tags": [
"install": [
"script": "",
"tag": "disable-selinux",
"sudo": true
"script": "",
"tag": "cndefault",
"sudo": true
"script": "",
"tag": "nfsserver",
"sudo": true
"script": "",
"tag": "mount-anfpool",
"sudo": true
"script": "",
"args": [
"tag": "nfsclient", "sudo": true
"script": "",
"args": [
"tag": "localuser",
"sudo": true


Edits required to the active-directory-new-domain azuredeploy.json arm template to allow it to use the azurehpc deployed infrastructure


  1. Set the AD subnet address range, use admin subnet address range that was used in the azurehpc deployment.
    1. "adSubnetName": "admin",
      "adSubnetAddressPrefix": ""
  2. Change virtualNetworkName, use same vnet deployed by azurehpc
    1. "virtualNetworkName": "hpcvnet",
  3. Change virtualNetworkAddressRange, use same address range that was deployed by azurehpc.
    1. "virtualNetworkAddressRange": "",
  4. Set IP for AD server (pick any unused IP from the admin subnet)

    1. "adNicIPAddress": "",
  5. Set vnetRg, to be the resource group containing the vnet.

    1. "vnetRg": ""
  6. Set location of raw git files.

    1. "_artifactsLocation": {
      "type": "string",
      "metadata": {
      "description": "The location of resources, such as templates and
      DSC modules, that the template depends on"
      "defaultValue": "
  7. Modify templateLink locations for files.

    1. "templateLink": {
      "uri": "[concat(parameters('_artifactsLocation'), '/nestedtemplates/vnet.json',
      {"uri": "[concat(parameters('_artifactsLocation'), '/nestedtemplates/vnet-with-dns-server.json',
  8. Remove deployment of VNet, will use azurehpc vnet instead. Also remove all references to VNet.

  9. Modify path to

    1. "ModulesUrl": "[concat(parameters('_artifactsLocation'), '/DSC/', 


Version history
Last update:
‎Sep 16 2019 04:46 PM
Updated by: