Azure Files Services

18 בSeptember 2014

Hello all,

Today’s article is about Azure files and how can we implement (Step by Step) the feature in our Azure farm.

What is it and why we need it?

The Azure Files service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between VMs using standard and familiar file system APIs like ReadFile and WriteFile. In addition, the files can also be accessed at the same time via a REST interface, which opens a variety of hybrid scenarios. Finally, Azure Files is built on the same technology as the Blob, Table, and Queue Services, which means Azure Files is able to leverage the existing availability, durability, scalability, and geo redundancy that is built into our platform.

How can we implement it?

  1. 1st of all you will have to register to service as the Azure Files is a preview service – in order to register to service you should go to:
  2. After you got a confirmation that you’re registered (not queued for registration but registered to the service) you should create a new storage.
  3. After creating the storage you should see on the storage dashboard that there is a file URL: 1
  4. If you can’t see this it’s because you didn’t create a new storage or you didn’t successfully registered for the service.
  5. In case you see the Files URL you are now able to use the service.
How to implement a file share?

1.  You should download Azure PowerShell and then import your Azure Publish Settings File.

2.  Then we should create the context for the storage account and key by using this PowerShell command:

# create a context for account and key

$ctx=New-AzureStorageContext account-name account-key

3.  Then we should create a new file share by using this PowerShell command:

# create a new share
$s = New-AzureStorageShare sampleshare -Context $ctx

4. Now we shall create a directory (for example I wrote sampledir) inside the Share by using this PowerShell Command:

# create a directory in the share
New-AzureStorageDirectory -Share $s -Path sampledir

5. Now we shall Persist the storage account credentials for the virtual machine using this PowerShell command (from the VM):

cmdkey /add:<storage-account> /user:<storage-account> /pass:<account-key>

6. Now we shall Mount the file share using the persisted credentials:

net use z: \\<storageaccount>\<sharename>

That’s it,Good luck,

Ido Katz

Senior Infrastructure Consultant @ AgileIT

הוסף תגובה
facebook linkedin twitter email

Leave a Reply

Your email address will not be published. Required fields are marked *