Azure File storage offers file shares in the cloud using the standard SMB protocol. File storage is now generally available and supports both SMB 2.1 and SMB 3.0.
Use of Azure File storage:
- On-premises applications that rely on local file shares can be migrated to cloud
- Share application settings, like configuration files
- Store and share other data such as tools, utilities, logs, metrics, and crash dumps
You can create Azure file shares using the Azure preview portal, the Azure Storage PowerShell cmdlets, the Azure Storage client libraries, or the Azure Storage REST API.
Below are the steps with screenshots to create a file share and map it to an Azure VMs:
1. Go to Azure Preview Portal and created a storage account.
2. Select the storage account and click ‘Files’ and then click File shares in File service blade.
3. Click File Share and provide a name and quota.
4. Optionally you can create a folder inside the share.
5. Select the file share and click connect and then copy the command in notepad.
6. You can find the Access key in Setting of Storage account.
7. Login to a virtual machine in the same subscription and location. Open PowerShell or command prompt.
8. Persist your storage account credentials for the virtual machine using below command
cmdkey /add:<storage-account-name>.file.core.windows.net /user:<storage-account-name> /pass:<storage-account-key>
9. Map the file share
net use <drive-letter>: \\<storage-account-name>.file.core.windows.net\<share-name>