Skip to content

Commit 4d8b8f8

Browse files
AV
1 parent 1dc9fb5 commit 4d8b8f8

File tree

2 files changed

+50
-45
lines changed

2 files changed

+50
-45
lines changed

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

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,19 @@ Ephemeral OS disks are created on the local virtual machine (VM) storage and not
1919

2020
The key features of ephemeral disks are:
2121
- Ideal for stateless applications.
22-
- They can be used with both Marketplace and custom images.
22+
- Supported by Marketplace, custom images, and by [Shared Image Gallery](./shared-image-galleries.md).
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.
25-
- Ephemeral OS disks are free, you incur no storage cost for OS disk.
26-
- Available in all Azure regions.
27-
- Ephemeral OS Disk is supported by [Shared Image Gallery](./shared-image-galleries.md).
28-
25+
- Ephemeral OS disks are free, you incur no storage cost for OS disks.
26+
- Available in all Azure regions.
2927

3028

3129
Key differences between persistent and ephemeral OS disks:
3230

3331
| | Persistent OS Disk | Ephemeral OS Disk |
3432
|-----------------------------|---------------------------------------------|------------------------------------------------|
3533
| **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 |
34+
| **VM sizes supported** | All | VM sizes that support Premium storage such as DSv1, DSv2, DSv3, Esv3, Fs, FsV2, GS, M, Mdsv2,Bs, Dav4, Eav4 |
3735
| **Disk type support** | Managed and unmanaged OS disk | Managed OS disk only |
3836
| **Region support** | All regions | All regions |
3937
| **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. |
@@ -43,68 +41,38 @@ Key differences between persistent and ephemeral OS disks:
4341
| **Resizing to a new VM size** | OS disk data is preserved | Data on the OS disk is deleted, OS is reprovisioned
4442
| **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). |
4543

46-
4744
## Size requirements
4845

4946
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.
47+
The image OS disk’s size should be less than or equal to the temp/cache size of the VM size chosen.
5148

5249
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.
5350

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.
51+
If you want to opt for **Temp disk placement**: Standard Ubuntu server image from marketplace is about 30 GiB. To enable Ephemeral OS disk on temp, the temp 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. Upon creation of the VM, the temp disk space would be 2 GiB.
52+
> [!Important] If opting for temp disk placement the Final Temp disk size = (Initial temp disk size - OS image size).
5553
5654
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.
5755
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.
5856

59-
6057
## Ephemeral OS Disks can now be stored on temp/Resource disks
6158
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.
59+
This feature enables Ephemeral OS disks to be created for all the VMs, which don't have cache or have insufficient cache (such as Dav3, Dav4, Eav4, and Eav3) but has sufficient temp disk to host the Ephemeral OS disk.
6360
[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.
6461
With this feature, when a Windows VM is provisioned, we configure the pagefile to be located on the OS Disk.
6562

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`.
68-
```powershell
69-
Set-AzVMOSDisk -DiffDiskSetting Local -Caching ReadOnly
70-
```
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`.
72-
73-
```powershell
74-
Set-AzVmssStorageProfile -DiffDiskSetting Local -OsDiskCaching ReadOnly
75-
```
76-
77-
## CLI
78-
79-
To use an ephemeral disk for a CLI VM deployment, set the `--ephemeral-os-disk` parameter in [az vm create](/cli/azure/vm#az_vm_create) to `true` and the `--os-disk-caching` parameter to `ReadOnly`.
80-
81-
```azurecli-interactive
82-
az vm create \
83-
--resource-group myResourceGroup \
84-
--name myVM \
85-
--image UbuntuLTS \
86-
--ephemeral-os-disk true \
87-
--os-disk-caching ReadOnly \
88-
--admin-username azureuser \
89-
--generate-ssh-keys
90-
```
91-
92-
For scale sets, you use the same `--ephemeral-os-disk true` parameter for [az-vmss-create](/cli/azure/vmss#az_vmss_create) and set the `--os-disk-caching` parameter to `ReadOnly`.
93-
9463
## Portal
9564

9665
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**.
9766

9867
![Screenshot showing the radio button for choosing to use an ephemeral OS disk](./media/virtual-machines-common-ephemeral/ephemeral-portal-temp.png)
68+
9969

10070
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.
10171

102-
10372
## Scale set template deployment
10473
The process to create a scale set that uses an ephemeral OS disk is to add the `diffDiskSettings` property to the
10574
`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.
10675

107-
10876
```json
10977
{
11078
"type": "Microsoft.Compute/virtualMachineScaleSets",
@@ -184,6 +152,35 @@ You can deploy a VM with an ephemeral OS disk using a template. The process to c
184152
}
185153
```
186154

155+
> [!NOTE] Ephemeral OS disk placement option (VM cache disk or VM temp/resource disk) is coming soon on PowerShell and CLI
156+
157+
## PowerShell
158+
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`.
159+
```powershell
160+
Set-AzVMOSDisk -DiffDiskSetting Local -Caching ReadOnly
161+
```
162+
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`.
163+
164+
```powershell
165+
Set-AzVmssStorageProfile -DiffDiskSetting Local -OsDiskCaching ReadOnly
166+
```
167+
168+
## CLI
169+
170+
To use an ephemeral disk for a CLI VM deployment, set the `--ephemeral-os-disk` parameter in [az vm create](/cli/azure/vm#az_vm_create) to `true` and the `--os-disk-caching` parameter to `ReadOnly`.
171+
172+
```azurecli-interactive
173+
az vm create \
174+
--resource-group myResourceGroup \
175+
--name myVM \
176+
--image UbuntuLTS \
177+
--ephemeral-os-disk true \
178+
--os-disk-caching ReadOnly \
179+
--admin-username azureuser \
180+
--generate-ssh-keys
181+
```
182+
183+
For scale sets, you use the same `--ephemeral-os-disk true` parameter for [az-vmss-create](/cli/azure/vmss#az_vmss_create) and set the `--os-disk-caching` parameter to `ReadOnly`.
187184

188185
## Reimage a VM using REST
189186
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.
@@ -197,15 +194,23 @@ id}/resourceGroups/{rgName}/providers/Microsoft.Compute/VirtualMachines/{vmName}
197194

198195
**Q: What is the size of the local OS Disks?**
199196

200-
A: We support platform and custom images, up to the VM cache size, where all read/writes to the OS disk will be local on the same node as the Virtual Machine.
197+
A: We support platform, Shared Image Gallery, and custom images, up to the VM cache size with OS cache placement and up to Temp disk size with Temp disk placement, where all read/writes to the OS disk will be local on the same node as the Virtual Machine.
201198

202199
**Q: Can the ephemeral OS disk be resized?**
203200

204201
A: No, once the ephemeral OS disk is provisioned, the OS disk cannot be resized.
205202

206203
**Q: Can the ephemeral OS disk placement be modified after creation of VM?**
207204

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.
205+
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. This would result in the recreation of the VM with Data on the OS disk deleted and OS is reprovisioned.
206+
207+
**Q: Is there any Temp disk created if image size equals to Temp disk size of VM size selected?**
208+
209+
A: No, in that case, there won't be any Temp disk drive created.
210+
211+
**Q: Are Ephemeral OS disks supported on low-priority VMs and Spot VMs?**
212+
213+
A: Yes. There is no option of Stop-Deallocate for Ephemeral VMs, rather users need to Delete instead of deallocating them.
209214

210215
**Q: Can I attach a Managed Disks to an Ephemeral VM?**
211216

@@ -215,7 +220,7 @@ A: Yes, you can attach a managed data disk to a VM that uses an ephemeral OS dis
215220

216221
A: No, most Premium Storage VM sizes are supported (DS, ES, FS, GS, M, etc.). To know whether a particular VM size supports ephemeral OS disks, you can:
217222

218-
Call the `Get-AzComputeResourceSku` PowerShell cmdlet
223+
Call `Get-AzComputeResourceSku` PowerShell cmdlet
219224
```azurepowershell-interactive
220225
221226
$vmSizes=Get-AzComputeResourceSku | where{$_.ResourceType -eq 'virtualMachines' -and $_.Locations.Contains('CentralUSEUAP')}

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): Supported <br>
30+
[Ephemeral OS Disks](ephemeral-os-disks.md): Supported for Mdsv2 <br>
3131
<br>
3232

3333
## Msv2 Medium Memory Diskless

0 commit comments

Comments
 (0)