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
**Applies to:**:heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets :heavy_check_mark: Uniform scale sets
17
17
18
-
Ephemeral OS disks are created on the local virtual machine (VM) storage and not saved to the remote Azure Storage. Ephemeral OS disks work well for stateless workloads, where applications are tolerant of individual VM failures, but are more affected by VM deployment time or reimaging the individual VM instances. With Ephemeral OS disk, you get lower read/write latency to the OS disk and faster VM reimage.
18
+
Ephemeral OS disks are created on the local virtual machine (VM) storage and not saved to the remote Azure Storage. Ephemeral OS disks work well for stateless workloads, where applications are tolerant of individual VM failures but are more affected by VM deployment time or reimaging of individual VM instances. With Ephemeral OS disk, you get lower read/write latency to the OS disk and faster VM reimage.
19
19
20
20
The key features of ephemeral disks are:
21
21
- Ideal for stateless applications.
22
22
- They can be used with both Marketplace and custom images.
23
23
- Ability to fast reset or reimage VMs and scale set instances to the original boot state.
24
24
- Lower latency, similar to a temporary disk.
25
25
- Ephemeral OS disks are free, you incur no storage cost for OS disk.
26
-
-They are available in all Azure regions.
26
+
-Available in all Azure regions.
27
27
- Ephemeral OS Disk is supported by [Shared Image Gallery](./shared-image-galleries.md).
28
28
29
29
@@ -32,37 +32,44 @@ Key differences between persistent and ephemeral OS disks:
|**Size limit for OS disk**| 2 TiB | Cache size for the VM size or 2TiB, whichever is smaller. For the **cache size in GiB**, see [DS](sizes-general.md), [ES](sizes-memory.md), [M](sizes-memory.md), [FS](sizes-compute.md), and [GS](sizes-previous-gen.md#gs-series)|
36
-
|**VM sizes supported**| All | VM sizes that supports Premium storage such as DSv1, DSv2, DSv3, Esv3, Fs, FsV2, GS, M |
35
+
|**Size limit for OS disk**| 2 TiB | Cache size for the VM size or 2 TiB, whichever is smaller. For the **cache size in GiB**, see [DS](sizes-general.md), [ES](sizes-memory.md), [M](sizes-memory.md), [FS](sizes-compute.md), and [GS](sizes-previous-gen.md#gs-series)|
36
+
|**VM sizes supported**| All | VM sizes that support Premium storage such as DSv1, DSv2, DSv3, Esv3, Fs, FsV2, GS, M |
37
37
|**Disk type support**| Managed and unmanaged OS disk | Managed OS disk only |
38
38
|**Region support**| All regions | All regions |
39
-
|**Data persistence**| OS disk data written to OS disk are stored in Azure Storage | Data written to OS disk is stored to the local VM storage and is not persisted to Azure Storage. |
39
+
|**Data persistence**| OS disk data written to OS disk are stored in Azure Storage | Data written to OS disk is stored on local VM storage and isn't persisted to Azure Storage. |
40
40
|**Stop-deallocated state**| VMs and scale set instances can be stop-deallocated and restarted from the stop-deallocated state | VMs and scale set instances cannot be stop-deallocated |
41
41
|**Specialized OS disk support**| Yes | No |
42
42
|**OS disk resize**| Supported during VM creation and after VM is stop-deallocated | Supported during VM creation only |
43
-
| **Resizing to a new VM size** | OS disk data is preserved | Data on the OS disk is deleted, OS is re-provisioned
44
-
|**Page file placement**| For Windows, page file is stored on the resource disk | For Windows, page file is stored on the OS disk |
43
+
| **Resizing to a new VM size** | OS disk data is preserved | Data on the OS disk is deleted, OS is reprovisioned
44
+
|**Page file placement**| For Windows, page file is stored on the resource disk | For Windows, page file is stored on the OS disk (for both OS cache placement and Temp disk placement). |
45
+
45
46
46
47
## Size requirements
47
48
48
-
You can deploy VM and instance images up to the size of the VM cache. For example, Standard Windows Server images from the marketplace are about 127 GiB, which means that you need a VM size that has a cache larger than 127 GiB. In this case, the [Standard_DS2_v2](dv2-dsv2-series.md) has a cache size of 86 GiB, which is not large enough. The Standard_DS3_v2 has a cache size of 172 GiB, which is large enough. In this case, the Standard_DS3_v2 is the smallest size in the DSv2 series that you can use with this image. Basic Linux images in the Marketplace and Windows Server images that are denoted by `[smallsize]` tend to be around 30 GiB and can use most of the available VM sizes.
49
+
You can choose to deploy Ephemeral OS Disk on VM cache or VM temp disk.
50
+
The image OS disk’s size should be equal to or greater than the temp/cache size of the disk chosen.
49
51
50
-
Ephemeral disks also require that the VM size supports Premium storage. The sizes usually (but not always) have an `s` in the name, like DSv2 and EsV3. For more information, see [Azure VM sizes](sizes.md) for details around which sizes support Premium storage.
52
+
For example, if you want to opt for **OS cache placement**: Standard Windows Server images from the marketplace are about 127 GiB, which means that you need a VM size that has a cache equal to or larger than 127 GiB. The Standard_DS3_v2 has a cache size of 127 GiB, which is large enough. In this case, the Standard_DS3_v2 is the smallest size in the DSv2 series that you can use with this image.
51
53
52
-
## Preview - Ephemeral OS Disks can now be stored on temp disks
53
-
Ephemeral OS Disks can now be stored on VM temp/resource disk in addition to the VM cache. So, now you can use Ephemeral OS Disks with VM which don’t have a cache or has insufficient cache but has a temp/resource disk to store the Ephemeral OS disk such as Dav3, Dav4, Eav4 and Eav3. If a VM has sufficient cache and temp space, you will now also be able to specify where you want to store the ephemeral OS Disk by using a new property called [DiffDiskPlacement](/rest/api/compute/virtualmachines/list#diffdiskplacement). With this feature, when a Windows VM is provisioned, we configure the pagefile to be located on the OS Disk. This feature is currently in preview. This preview version is provided without a service level agreement, and it's not recommended for production workloads. To get started, [request access](https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR6cQw0fZJzdIsnbfbI13601URTBCRUZPMkQwWFlCOTRIMFBSNkM1NVpQQS4u).
54
+
If you want to opt for **Temp disk placement**: Standard Ubuntu server image from marketplace comes with 30-GiB OS disk space. To enable Ephemeral OS disk, the disk size must be equal to or larger than 30 GiB. Standard_B4ms has a temp size of 32 GiB, which can fit the 30 GiB OS disk. But Standard_B2ms has a temp size of 16 GiB, which wouldn't be able to fit 30 GiB of OS disk.
54
55
55
-
## PowerShell
56
+
Basic Linux and Windows Server images in the Marketplace that are denoted by `[smallsize]` tend to be around 30 GiB and can use most of the available VM sizes.
57
+
Ephemeral disks also require that the VM size supports **Premium storage**. The sizes usually (but not always) have an `s` in the name, like DSv2 and EsV3. For more information, see [Azure VM sizes](sizes.md) for details around which sizes support Premium storage.
56
58
57
-
To use an ephemeral disk for a PowerShell VM deployment, use [Set-AzVMOSDisk](/powershell/module/az.compute/set-azvmosdisk) in your VM configuration. Set the `-DiffDiskSetting` to `Local` and `-Caching` to `ReadOnly`.
58
59
60
+
## Ephemeral OS Disks can now be stored on temp/Resource disks
61
+
Ephemeral OS disk can now be stored either in VM cache disk or VM temp/resource disk.
62
+
This feature enables Ephemeral OS disks to be created for all the VMs, which don't have a cache or insufficient cache (such as Dav3, Dav4, Eav4, and Eav3) but has temp disk to store the Ephemeral OS disk.
63
+
[DiffDiskPlacement](/rest/api/compute/virtualmachines/list#diffdiskplacement) is the new property that can be used to specify where you want to place the Ephemeral OS disk.
64
+
With this feature, when a Windows VM is provisioned, we configure the pagefile to be located on the OS Disk.
65
+
66
+
## PowerShell
67
+
To use an ephemeral disk for a PowerShell VM deployment, use [Set-AzVMOSDisk](/powershell/module/az.compute/set-azvmosdisk) in your VM configuration. Set the `-DiffDiskSetting` to `Local` and `-Caching` to `ReadOnly`.
59
68
```powershell
60
69
Set-AzVMOSDisk -DiffDiskSetting Local -Caching ReadOnly
61
70
```
62
-
63
71
For scale set deployments, use the [Set-AzVmssStorageProfile](/powershell/module/az.compute/set-azvmssstorageprofile) cmdlet in your configuration. Set the `-DiffDiskSetting` to `Local` and `-Caching` to `ReadOnly`.
64
72
65
-
66
73
```powershell
67
74
Set-AzVmssStorageProfile -DiffDiskSetting Local -OsDiskCaching ReadOnly
68
75
```
@@ -86,27 +93,24 @@ For scale sets, you use the same `--ephemeral-os-disk true` parameter for [az-vm
86
93
87
94
## Portal
88
95
89
-
In the Azure portal, you can choose to use ephemeral disks when deploying a VM by opening the **Advanced** section of the **Disks** tab. For **Use ephemeral OS disk** select **Yes**.
90
-
91
-

96
+
In the Azure portal, you can choose to use ephemeral disks when deploying a virtual machine or virtual machine scale sets by opening the **Advanced** section of the **Disks** tab. For choosing placement of Ephemeral OS disk, select **OS cache placement** or **Temp disk placement**.
92
97
93
-
If the option for using an ephemeral disk is greyed out, you might have selected a VM size that does not have a cache size larger than the OS image or that doesn't support Premium storage. Go back to the **Basics** page and try choosing another VM size.
98
+

94
99
95
-
You can also create scale-sets with ephemeral OS disks using the portal. Just make sure you select a VM size with a large enough cache size and then in **Use ephemeral OS disk** select **Yes**.
100
+
If the option for using an ephemeral disk or OS cache placement or Temp disk placement is greyed out, you might have selected a VM size that doesn't have a cache/temp size larger than the OS image or that doesn't support Premium storage. Go back to the **Basics** page and try choosing another VM size.
96
101
97
-

98
102
99
103
## Scale set template deployment
100
104
The process to create a scale set that uses an ephemeral OS disk is to add the `diffDiskSettings` property to the
101
-
`Microsoft.Compute/virtualMachineScaleSets/virtualMachineProfile` resource type in the template. Also, the caching policy must be set to `ReadOnly` for the ephemeral OS disk.
105
+
`Microsoft.Compute/virtualMachineScaleSets/virtualMachineProfile` resource type in the template. Also, the caching policy must be set to `ReadOnly` for the ephemeral OS disk. placement can be changed to `CacheDisk` for OS cache disk placement.
@@ -119,7 +123,8 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
119
123
"storageProfile": {
120
124
"osDisk": {
121
125
"diffDiskSettings": {
122
-
"option": "Local"
126
+
"option": "Local" ,
127
+
"placement": "ResourceDisk"
123
128
},
124
129
"caching": "ReadOnly",
125
130
"createOption": "FromImage"
@@ -142,19 +147,20 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
142
147
```
143
148
144
149
## VM template deployment
145
-
You can deploy a VM with an ephemeral OS disk using a template. The process to create a VM that uses ephemeral OS disks is to add the `diffDiskSettings` property to the Microsoft.Compute/virtualMachines resource type in the template. Also, the caching policy must be set to `ReadOnly` for the ephemeral OS disk.
150
+
You can deploy a VM with an ephemeral OS disk using a template. The process to create a VM that uses ephemeral OS disks is to add the `diffDiskSettings` property to Microsoft.Compute/virtualMachines resource type in the template. Also, the caching policy must be set to `ReadOnly` for the ephemeral OS disk. placement option can be changed to `CacheDisk` for OS cache disk placement.
146
151
147
152
```json
148
153
{
149
154
"type": "Microsoft.Compute/virtualMachines",
150
155
"name": "myVirtualMachine",
151
156
"location": "East US 2",
152
-
"apiVersion": "2018-06-01",
157
+
"apiVersion": "2019-12-01",
153
158
"properties": {
154
159
"storageProfile": {
155
160
"osDisk": {
156
161
"diffDiskSettings": {
157
-
"option": "Local"
162
+
"option": "Local" ,
163
+
"placement": "ResourceDisk"
158
164
},
159
165
"caching": "ReadOnly",
160
166
"createOption": "FromImage"
@@ -180,11 +186,11 @@ You can deploy a VM with an ephemeral OS disk using a template. The process to c
180
186
181
187
182
188
## Reimage a VM using REST
183
-
You can reimage a Virtual Machine instance with ephemeral OS disk using REST API as described below and via Azure Portal by going to Overview pane of the VM. For scale sets, reimaging is already available through Powershell, CLI, and the portal.
189
+
You can reimage a Virtual Machine instance with ephemeral OS disk using REST API as described below and via Azure portal by going to Overview pane of the VM. For scale sets, reimaging is already available through PowerShell, CLI, and the portal.
184
190
185
191
```
186
192
POST https://management.azure.com/subscriptions/{sub-
@@ -197,6 +203,10 @@ A: We support platform and custom images, up to the VM cache size, where all rea
197
203
198
204
A: No, once the ephemeral OS disk is provisioned, the OS disk cannot be resized.
199
205
206
+
**Q: Can the ephemeral OS disk placement be modified after creation of VM?**
207
+
208
+
A: No, once the ephemeral OS disk is provisioned, the OS disk placement cannot be changed. But the VM can be recreated via ARM template deployment/PowerShell/CLI by updating the OS disk placement of choosing. Resulting in the recreation of the VM with Data on the OS disk deleted and OS is reprovisioned.
209
+
200
210
**Q: Can I attach a Managed Disks to an Ephemeral VM?**
201
211
202
212
A: Yes, you can attach a managed data disk to a VM that uses an ephemeral OS disk.
@@ -232,7 +242,7 @@ A: No, you can't have a mix of ephemeral and persistent OS disk instances within
232
242
233
243
**Q: Can the ephemeral OS disk be created using Powershell or CLI?**
234
244
235
-
A: Yes, you can create VMs with Ephemeral OS Disk using REST, Templates, PowerShell and CLI.
245
+
A: Yes, you can create VMs with Ephemeral OS Disk using REST, Templates, PowerShell, and CLI.
236
246
237
247
**Q: What features are not supported with ephemeral OS disk?**
238
248
@@ -246,8 +256,8 @@ A: Ephemeral disks do not support:
246
256
247
257
> [!NOTE]
248
258
>
249
-
> Ephemeral disk will not be accessible through portal. You will receive "Resource not Found" or "404" error when accessing the ephemeral disk which is expected.
259
+
> Ephemeral disk will not be accessible through the portal. You will receive a "Resource not Found" or "404" error when accessing the ephemeral disk which is expected.
250
260
>
251
261
252
262
## Next steps
253
-
You can create a VM with an ephemeral OS disk using the [Azure CLI](/cli/azure/vm#az_vm_create).
263
+
You can create a VM with an ephemeral OS disk using the [Azure CLI](/cli/azure/vm#az_vm_create).
0 commit comments