You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Create and use an Azure file shares on Windows VMs
3
-
description: Create and use an Azure files shares in the Azure portal. Connect it to a Windows VM, connect to the Files share, and upload a file to the Files share.
2
+
title: Tutorial - Create and use an Azure file shares on Windows VMs
3
+
description: This tutorial covers how to create and use an Azure files shares in the Azure portal. Connect it to a Windows VM, connect to the file share, and upload a file to the file share.
4
4
author: roygara
5
5
ms.service: storage
6
-
ms.topic: quickstart
7
-
ms.date: 07/27/2021
6
+
ms.topic: tutorial
7
+
ms.date: 02/14/2022
8
8
ms.author: rogarana
9
9
ms.subservice: files
10
10
ms.custom: mode-ui
11
11
#Customer intent: As an IT admin new to Azure Files, I want to try out Azure file share so I can determine whether I want to subscribe to the service.
12
12
---
13
13
14
-
# Quickstart: Create and manage Azure file shares with Windows virtual machines via the Azure portal
14
+
# Tutorial: Create and manage Azure file shares with Windows virtual machines via the Azure portal
15
15
16
-
The article demonstrates the basic steps for creating and using an Azure Files share. In this quickstart, the emphasis is on quickly setting up an Azure Files share so you can experience how the service works. If you need more detailed instructions for creating and using Azure file shares in your own environment, see [Use an Azure file share with Windows](storage-how-to-use-files-windows.md).
16
+
Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard [Server Message Block (SMB) protocol](/windows/win32/fileio/microsoft-smb-protocol-and-cifs-protocol-overview) or [Network File System (NFS) protocol](https://en.wikipedia.org/wiki/Network_File_System). In this tutorial, you will learn a few ways you can use an Azure file share in a Windows virtual machine (VM).
17
17
18
18
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
19
19
20
+
> [!div class="checklist"]
21
+
> * Create a storage account
22
+
> * Create a file share
23
+
> * Deploy a VM
24
+
> * Connect to a VM
25
+
> * Mount an Azure file share to your VM
26
+
> * Create and delete a share snapshot
27
+
20
28
## Applies to
21
29
| File share type | SMB | NFS |
22
30
|-|:-:|:-:|
23
31
| Standard file shares (GPv2), LRS/ZRS |||
24
32
| Standard file shares (GPv2), GRS/GZRS |||
Sign in to the [Azure portal](https://portal.azure.com).
30
-
31
-
## Prepare your environment
35
+
## Getting started
32
36
33
-
In this quickstart, you set up the following items:
37
+
### Create a storage account
34
38
35
-
- An Azure storage account and an Azure file share
36
-
- A Windows Server 2016 Datacenter VM
39
+
Before you can work with an Azure file share, you have to create an Azure storage account.
37
40
38
-
### Create a storage account
41
+
1. Sign in to the [Azure portal](https://portal.azure.com).
42
+
1. On the Azure portal menu, select **All services**. In the list of resources, type **Storage Accounts**. As you begin typing, the list filters based on your input. Select **Storage Accounts**.
43
+
1. On the **Storage Accounts** window that appears, choose **+ New**.
44
+
1. On the **Basics** tab, select the subscription in which to create the storage account.
45
+
1. Under the **Resource group** field, select your desired resource group, or create a new resource group.
46
+
1. Next, enter a name for your storage account. The name you choose must be unique across Azure. The name also must be between 3 and 24 characters in length, and may include only numbers and lowercase letters.
47
+
1. Select a region for your storage account, or use the default region.
48
+
1. Select a performance tier. The default tier is *Standard*.
49
+
1. Specify how the storage account will be replicated. The default redundancy option is *Geo-redundant storage (GRS)*.
50
+
1. Select **Review + Create** to review your storage account settings and create the account.
51
+
1. Select **Create**.
39
52
40
-
Before you can work with an Azure file share, you have to create an Azure storage account. A general-purpose v2 storage account provides access to all of the Azure Storage services: blobs, files, queues, and tables. The quickstart creates a general-purpose v2 storage account but, the steps to create any type of storage account are similar. A storage account can contain an unlimited number of shares. A share can store an unlimited number of files, up to the capacity limits of the storage account.
53
+
The following image shows the settings on the **Basics** tab for a new storage account:
:::image type="content" source="media/storage-files-quick-create-use-windows/account-create-portal.png" alt-text="Screenshot showing how to create a storage account in the Azure portal." lightbox="media/storage-files-quick-create-use-windows/account-create-portal.png":::
43
56
44
57
### Create an Azure file share
45
58
46
-
Next, you create a file share.
59
+
Next, create a file share.
47
60
48
61
1. When the Azure storage account deployment is complete, select **Go to resource**.
49
62
1. Select **File shares** from the storage account pane.

68
+

56
69
57
-
1. Name the new file share *qsfileshare*, enter "1" for the **Quota**, leave **Transaction optimized** selected, and select **Create**. The quota can be a maximum of 5 TiB (100 TiB, with large file shares enabled), but you only need 1 GiB for this quickstart.
70
+
1. Name the new file share *qsfileshare*, enter "1" for the **Quota**, leave **Transaction optimized** selected, and select **Create**. The quota can be a maximum of 5 TiB (100 TiB, with large file shares enabled), but you only need 1 GiB for this.
58
71
1. Create a new txt file called *qsTestFile* on your local machine.
59
72
1. Select the new file share, then on the file share location, select **Upload**.
60
73
61
-

74
+

62
75
63
76
1. Browse to the location where you created your .txt file > select *qsTestFile.txt* > select **Upload**.
64
77
65
-
So far, you've created an Azure storage account and a file share with one file in it in Azure. Next you'll create the Azure VM with Windows Server 2016 Datacenter to represent the on-premises server in this quickstart.
66
-
67
78
### Deploy a VM
68
79
69
-
1. Next, expand the menu on the left side of the portal and choose **Create a resource** in the upper left-hand corner of the Azure portal.
80
+
So far, you've created an Azure storage account and a file share with one file in it. Next, create an Azure VM with Windows Server 2016 Datacenter to represent the on-premises server.
81
+
82
+
1. Expand the menu on the left side of the portal and select **Create a resource** in the upper left-hand corner of the Azure portal.
70
83
1. Under **Popular services** select **Virtual machine**.
71
-
1. In the **Basics** tab, under **Project details**, select the resource group you created for this quickstart.
84
+
1. In the **Basics** tab, under **Project details**, select the resource group you created earlier.
72
85
73
-

86
+

74
87
75
88
1. Under **Instance details**, name the VM *qsVM*.
76
89
1. For **Image** select **Windows Server 2016 Datacenter - Gen2**.
@@ -82,23 +95,23 @@ So far, you've created an Azure storage account and a file share with one file i
82
95
83
96
1. Once your VM deployment is complete, select **Go to resource**.
84
97
85
-
At this point, you've created a new virtual machine and attached a data disk. Now you need to connect to the VM.
86
-
87
98
### Connect to your VM
88
99
100
+
Now that you've created the VM, connect to it so you can mount your file share.
101
+
89
102
1. Select **Connect** on the virtual machine properties page.
90
103
91
-

104
+

92
105
93
106
1. In the **Connect to virtual machine** page, keep the default options to connect by **IP address** over **port number***3389* and select **Download RDP file**.
94
107
1. Open the downloaded RDP file and select **Connect** when prompted.
95
108
1. In the **Windows Security** window, select **More choices** and then **Use a different account**. Type the username as *localhost\username*, where <username> is the VM admin username you created for the virtual machine. Enter the password you created for the virtual machine, and then select **OK**.

98
111
99
-
1. You may receive a certificate warning during the sign-in process. select**Yes** or **Continue** to create the connection.
112
+
1. You may receive a certificate warning during the sign-in process. Select**Yes** or **Continue** to create the connection.
100
113
101
-
## Map the Azure file share to a Windows drive
114
+
###Map the Azure file share to a Windows drive
102
115
103
116
1. In the Azure portal, navigate to the *qsfileshare* fileshare and select **Connect**.
104
117
1. Select a drive letter then copy the contents of the second box and paste it in **Notepad**.
@@ -109,29 +122,29 @@ At this point, you've created a new virtual machine and attached a data disk. No
109
122
110
123
## Create a share snapshot
111
124
112
-
Now that you've mapped the drive, you can create a snapshot.
125
+
Now that you've mapped the drive, create a snapshot.
113
126
114
127
1. In the portal, navigate to your file share, select **Snapshots**, then select **+ Add snapshot**.
115
128
116
-

129
+

117
130
118
-
1. In the VM, open the *qstestfile.txt* and type "this file has been modified" > Save and close the file.
131
+
1. In the VM, open the *qstestfile.txt* and type "this file has been modified". Save and close the file.
119
132
1. Create another snapshot.
120
133
121
134
## Browse a share snapshot
122
135
123
136
1. On your file share, select **Snapshots**.
124
-
1. On the **Snapshots**blade, select the first snapshot in the list.
137
+
1. On the **Snapshots**tab, select the first snapshot in the list.
125
138
126
-

139
+

127
140
128
141
1. Open that snapshot, and select *qsTestFile.txt*.
129
142
130
143
## Restore from a snapshot
131
144
132
-
1. From the file share snapshot blade, right-click the *qsTestFile*, and select the **Restore** button.
145
+
1. From the file share snapshot tab, right-click the *qsTestFile*, and select the **Restore** button.
133
146
134
-
:::image type="content" source="media/storage-files-quick-create-use-windows/restore-share-snapshot.png" alt-text="Screenshot of the snapshot blade, qstestfile is selected, restore is highlighted.":::
147
+
:::image type="content" source="media/storage-files-quick-create-use-windows/restore-share-snapshot.png" alt-text="Screenshot of the snapshot tab, qstestfile is selected, restore is highlighted.":::
135
148
136
149
1. Select **Overwrite original file**.
137
150
@@ -142,33 +155,33 @@ Now that you've mapped the drive, you can create a snapshot.
142
155
## Delete a share snapshot
143
156
144
157
1. On your file share, select **Snapshots**.
145
-
1. On the **Snapshots**blade, select the last snapshot in the list and select **Delete**.
158
+
1. On the **Snapshots**tab, select the last snapshot in the list and select **Delete**.
146
159
147
-

160
+

148
161
149
162
## Use a share snapshot in Windows
150
163
151
164
Just like with on-premises VSS snapshots, you can view the snapshots from your mounted Azure file share by using the Previous Versions tab.
152
165
153
166
1. In File Explorer, locate the mounted share.
154
167
155
-

168
+

156
169
157
170
1. Select *qsTestFile.txt* and > right-click and select **Properties** from the menu.
158
171
159
-

172
+

160
173
161
174
1. Select **Previous Versions** to see the list of share snapshots for this directory.

166
179
167
180
## Restore from a previous version
168
181
169
-
1. Select **Restore**. This action copies the contents of the entire directory recursively to the original location at the time the share snapshot was created.
182
+
1. Select **Restore**. This copies the contents of the entire directory recursively to the original location at the time the share snapshot was created.
170
183
171
-

184
+

172
185
173
186
> [!NOTE]
174
187
> If your file has not changed, you will not see a previous version for that file because that file is the same version as the snapshot. This is consistent with how this works on a Windows file server.
@@ -180,4 +193,4 @@ Just like with on-premises VSS snapshots, you can view the snapshots from your m
180
193
## Next steps
181
194
182
195
> [!div class="nextstepaction"]
183
-
> [Use an Azure file share with Windows](storage-how-to-use-files-windows.md)
196
+
> [Use an Azure file share with Windows](storage-how-to-use-files-windows.md)
0 commit comments