locked
Get region specific azure file share, Depending on where the vmScale-Set is deployed. RRS feed

  • Question

  • I have a scenario where I have multiple deployments of VmScale-set across different regions, and VM in that scale-set are performing some file operations on the file-share present in respective regions.

    Now the expectation is every time a VM comes up in any scale set it should mount a file share present in its own region.

    For that, I wrote some script for mounting the file share and called it from "rc.local" in Ubuntu, and it is working fine for me. And I am using some VM image to create the VM scale-set.

    But I don't want to change that script for mounting file share specific to the region, every time I deploy a new ScaleSet.

    I want some way such that each VM in any Scale-set should mount file share in its own region.

    I am thinking of some API which will return a command like below

    "mount -t cifs <remote url> [mount point] -o vers=3.0,username=[user name],password=[password]"

    to mount the file share which is unique for the region.

    Now Question: Is it feasible to achieve if yes how.
    Or

    Is there any simpler alternative to achieve the same thing.


    Thursday, June 21, 2018 12:08 PM

All replies

  • You could get location from resourceGroup().location and pass that into your  custom script extension as a parameter, which could then use it when mounting a share.

     --------------------------------------------------------------------------------------------------

     If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on  your forum experience, click here

    • Proposed as answer by Sandeep BR Thursday, June 21, 2018 6:48 PM
    Thursday, June 21, 2018 6:48 PM
  • Hey Praveen,

    Just checking in to see if the above suggestions helped or you need further assistance on this issue.

    Wednesday, June 27, 2018 9:13 PM