Skip to content

Commit 1dc9fb5

Browse files
AV
1 parent b3fa127 commit 1dc9fb5

File tree

6 files changed

+59
-37
lines changed

6 files changed

+59
-37
lines changed

articles/virtual-machines/ephemeral-os-disks.md

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Ephemeral OS disks
33
description: Learn more about ephemeral OS disks for Azure VMs.
4-
author: cynthn
4+
author: Aarthi-Vijayaraghavan
55
ms.service: virtual-machines
66
ms.workload: infrastructure-services
77
ms.topic: how-to
88
ms.date: 07/23/2020
9-
ms.author: cynthn
9+
ms.author: aarthiv
1010
ms.subservice: disks
1111
ms.custom: devx-track-azurepowershell
1212
---
@@ -15,15 +15,15 @@ ms.custom: devx-track-azurepowershell
1515

1616
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets :heavy_check_mark: Uniform scale sets
1717

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.
1919

2020
The key features of ephemeral disks are:
2121
- Ideal for stateless applications.
2222
- They can be used with both Marketplace and custom images.
2323
- Ability to fast reset or reimage VMs and scale set instances to the original boot state.
2424
- Lower latency, similar to a temporary disk.
2525
- 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.
2727
- Ephemeral OS Disk is supported by [Shared Image Gallery](./shared-image-galleries.md).
2828

2929

@@ -32,37 +32,44 @@ Key differences between persistent and ephemeral OS disks:
3232

3333
| | Persistent OS Disk | Ephemeral OS Disk |
3434
|-----------------------------|---------------------------------------------|------------------------------------------------|
35-
| **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 |
3737
| **Disk type support** | Managed and unmanaged OS disk | Managed OS disk only |
3838
| **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. |
4040
| **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 |
4141
| **Specialized OS disk support** | Yes | No |
4242
| **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+
4546

4647
## Size requirements
4748

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.
4951

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.
5153

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.
5455

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.
5658

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`.
5859

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`.
5968
```powershell
6069
Set-AzVMOSDisk -DiffDiskSetting Local -Caching ReadOnly
6170
```
62-
6371
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`.
6472

65-
6673
```powershell
6774
Set-AzVmssStorageProfile -DiffDiskSetting Local -OsDiskCaching ReadOnly
6875
```
@@ -86,27 +93,24 @@ For scale sets, you use the same `--ephemeral-os-disk true` parameter for [az-vm
8693

8794
## Portal
8895

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-
![Screenshot showing the radio button for choosing to use an ephemeral OS disk](./media/virtual-machines-common-ephemeral/ephemeral-portal.png)
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**.
9297

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+
![Screenshot showing the radio button for choosing to use an ephemeral OS disk](./media/virtual-machines-common-ephemeral/ephemeral-portal-temp.png)
9499

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.
96101

97-
![Screenshot showing the radio button for choosing to use an ephemeral OS disk for your scale set](./media/virtual-machines-common-ephemeral/scale-set.png)
98102

99103
## Scale set template deployment
100104
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.
102106

103107

104108
```json
105109
{
106110
"type": "Microsoft.Compute/virtualMachineScaleSets",
107111
"name": "myScaleSet",
108112
"location": "East US 2",
109-
"apiVersion": "2018-06-01",
113+
"apiVersion": "2019-12-01",
110114
"sku": {
111115
"name": "Standard_DS2_v2",
112116
"capacity": "2"
@@ -119,7 +123,8 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
119123
"storageProfile": {
120124
"osDisk": {
121125
"diffDiskSettings": {
122-
"option": "Local"
126+
"option": "Local" ,
127+
"placement": "ResourceDisk"
123128
},
124129
"caching": "ReadOnly",
125130
"createOption": "FromImage"
@@ -142,19 +147,20 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
142147
```
143148

144149
## 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.
146151

147152
```json
148153
{
149154
"type": "Microsoft.Compute/virtualMachines",
150155
"name": "myVirtualMachine",
151156
"location": "East US 2",
152-
"apiVersion": "2018-06-01",
157+
"apiVersion": "2019-12-01",
153158
"properties": {
154159
"storageProfile": {
155160
"osDisk": {
156161
"diffDiskSettings": {
157-
"option": "Local"
162+
"option": "Local" ,
163+
"placement": "ResourceDisk"
158164
},
159165
"caching": "ReadOnly",
160166
"createOption": "FromImage"
@@ -180,11 +186,11 @@ You can deploy a VM with an ephemeral OS disk using a template. The process to c
180186

181187

182188
## 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.
184190

185191
```
186192
POST https://management.azure.com/subscriptions/{sub-
187-
id}/resourceGroups/{rgName}/providers/Microsoft.Compute/VirtualMachines/{vmName}/reimage?a pi-version=2018-06-01"
193+
id}/resourceGroups/{rgName}/providers/Microsoft.Compute/VirtualMachines/{vmName}/reimage?a pi-version=2019-12-01"
188194
```
189195

190196
## Frequently asked questions
@@ -197,6 +203,10 @@ A: We support platform and custom images, up to the VM cache size, where all rea
197203

198204
A: No, once the ephemeral OS disk is provisioned, the OS disk cannot be resized.
199205

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+
200210
**Q: Can I attach a Managed Disks to an Ephemeral VM?**
201211

202212
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
232242

233243
**Q: Can the ephemeral OS disk be created using Powershell or CLI?**
234244

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.
236246

237247
**Q: What features are not supported with ephemeral OS disk?**
238248

@@ -246,8 +256,8 @@ A: Ephemeral disks do not support:
246256

247257
> [!NOTE]
248258
>
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.
250260
>
251261
252262
## 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).
64.3 KB
Loading

articles/virtual-machines/msv2-mdsv2-series.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The Msv2 and Mdsv2 Medium Memory VM Series features Intel® Xeon® Platinum 8280
2727
[VM Generation Support](generation-2.md): Generation 2<br>
2828
[Write Accelerator](./how-to-enable-write-accelerator.md): Supported<br>
2929
[Accelerated Networking](../virtual-network/create-vm-accelerated-networking-cli.md): Supported<br>
30-
[Ephemeral OS Disks](ephemeral-os-disks.md): Not Supported <br>
30+
[Ephemeral OS Disks](ephemeral-os-disks.md): Supported <br>
3131
<br>
3232

3333
## Msv2 Medium Memory Diskless

articles/virtual-machines/mv2-series.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Mv2-series VM’s feature Intel® Hyper-Threading Technology
2424
[VM Generation Support](generation-2.md): Generation 2<br>
2525
[Write Accelerator](./how-to-enable-write-accelerator.md): Supported<br>
2626
[Accelerated Networking](../virtual-network/create-vm-accelerated-networking-cli.md): Supported<br>
27-
[Ephemeral OS Disks](ephemeral-os-disks.md): Not Supported <br>
27+
[Ephemeral OS Disks](ephemeral-os-disks.md): Supported <br>
2828
<br>
2929

3030
|Size | vCPU | Memory: GiB | Temp storage (SSD) GiB | Max data disks | Max cached and temp storage throughput: IOPS / MBps (cache size in GiB) | Max uncached disk throughput: IOPS / MBps | Max NICs | Expected network bandwidth (Mbps) |

articles/virtual-machines/sizes-b-series-burstable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The B-series comes in the following VM sizes:
2525
[Memory Preserving Updates](maintenance-and-updates.md): Supported<br>
2626
[VM Generation Support](generation-2.md): Generation 1 and 2<br>
2727
[Accelerated Networking](../virtual-network/create-vm-accelerated-networking-cli.md): Supported**<br>
28-
[Ephemeral OS Disks](ephemeral-os-disks.md): Not Supported <br>
28+
[Ephemeral OS Disks](ephemeral-os-disks.md): Supported <br>
2929

3030
*B-series VMs are burstable and thus ACU numbers will vary depending on workloads and core usage.<br>
3131
**Accelerated Networking is only supported for *Standard_B12ms*, *Standard_B16ms* and *Standard_B20ms*.

0 commit comments

Comments
 (0)