Frequently asked questions about Ephemeral OS disks

Q: What is the size of the Ephemeral OS Disks?

A: We support platform, Shared Image Gallery, and custom images. Size of Ephemeral OS disk depends on the local storage (cache disk, or temp disk) available on the Virtual Machine (VM). Max size of Ephemeral OS disk can be 2 TiB. All writes to the OS disk are local on the same node as the Virtual Machine.

Q: Can the ephemeral OS disk be resized?

A: No, once the ephemeral OS disk is provisioned, the OS disk can't be resized.

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

A: No, once the ephemeral OS disk is provisioned, the OS disk placement can't be changed. But the VM can be recreated via ARM template deployment/PowerShell/CLI by updating the OS disk placement of choosing. This results in the recreation of the VM with Data on the OS disk deleted and OS is reprovisioned.

Q: Is there any Temp disk created if image size equals to Temp disk size of VM size selected?

A: No, in that case, Temp disk is not created.

Q: Are Ephemeral OS disks supported on low-priority VMs and Spot VMs?

A: Yes. There's no option of Stop-Deallocate for Ephemeral VMs, rather users need to Delete instead of deallocating them.

Q: Can I attach a managed disks to an Ephemeral VM?

A: Yes, you can attach a managed data disk to a VM that uses an ephemeral OS disk.

Q: Will all VM sizes be supported for ephemeral OS disks?

A: No, most Premium Storage VM sizes are supported (DS, ES, FS, M, etc.). To know whether a particular VM size supports ephemeral OS disks for an OS image size, you can use the following script. It takes the OS image size and location as inputs and provides a list of VMs and corresponding placement supported. If cache, temp, and NVMe disk placement are marked as not supported then Ephemeral OS disk can't be used for the given OS image size.

[CmdletBinding()]
param([Parameter(Mandatory=$true)]
      [ValidateNotNullOrEmpty()]
      [string]$Location,
      [Parameter(Mandatory=$true)]
      [long]$OSImageSizeInGB
      )
 
Function HasSupportEphemeralOSDisk([object[]] $capability)
{
    return $capability | where { $_.Name -eq "EphemeralOSDiskSupported" -and $_.Value -eq "True"}
}
 
Function Get-MaxTempDiskAndCacheSize([object[]] $capabilities)
{
    $MaxResourceVolumeGB = 0;
    $CachedDiskGB = 0;
    $NvmeDiskGB = 0;
 
    foreach($capability in $capabilities)
    {
        if ($capability.Name -eq "MaxResourceVolumeMB")
        { $MaxResourceVolumeGB = [int]($capability.Value / 1024) }
 
        if ($capability.Name -eq "CachedDiskBytes")
        { $CachedDiskGB = [int]($capability.Value / (1024 * 1024 * 1024)) }

         if ($capability.Name -eq "NvmeDiskSizeInMiB")
        { $NvmeDiskGB = [int]($capability.Value / (1024)) }

        if ($capability.Name -eq "SupportedEphemeralOSDiskPlacements")
        { $NvmeSupported = [bool]($capability.Value -contains "NvmeDisk") }
    
    }
    
    if (!$NvmeSupported)
    { $NvmeDiskGB = 0; }
    return ($MaxResourceVolumeGB, $CachedDiskGB, $NvmeDiskGB)
}
 
Function Get-EphemeralSupportedVMSku
{
    [CmdletBinding()]
    Param
    (
        [Parameter(Mandatory=$true)]
        [long]$OSImageSizeInGB,
        [Parameter(Mandatory=$true)]
        [string]$Location
    )
 
    $VmSkus = Get-AzComputeResourceSku $Location | Where-Object { $_.ResourceType -eq "virtualMachines" -and (HasSupportEphemeralOSDisk $_.Capabilities) -ne $null }
 
    $Response = @()
    foreach ($sku in $VmSkus)
    {
        ($MaxResourceVolumeGB, $CachedDiskGB, $NvmeDiskGB) = Get-MaxTempDiskAndCacheSize $sku.Capabilities
 
        $Response += New-Object PSObject -Property @{
            ResourceSKU = $sku.Size
            NvmeDiskPlacement = @{ $true = "NOT SUPPORTED"; $false = "SUPPORTED"}[$NvmeDiskGB -lt $OSImageSizeInGB]
            TempDiskPlacement = @{ $true = "NOT SUPPORTED"; $false = "SUPPORTED"}[$MaxResourceVolumeGB -lt $OSImageSizeInGB]
            CacheDiskPlacement = @{ $true = "NOT SUPPORTED"; $false = "SUPPORTED"}[$CachedDiskGB -lt $OSImageSizeInGB]
         };
    }
 
    return $Response
}
 
Get-EphemeralSupportedVMSku -OSImageSizeInGB $OSImageSizeInGB -Location $Location | Format-Table

Q: Can the ephemeral OS disk be applied to existing VMs and scale sets?

A: No, ephemeral OS disk can only be used during VM and scale set creation.

Q: Can you mix ephemeral and normal OS disks in a scale set?

A: No, you can't have a mix of ephemeral and persistent OS disk instances within the same scale set.

Q: Can the ephemeral OS disk be created using PowerShell or CLI?

A: Yes, you can create VMs with Ephemeral OS Disk using REST, Templates, PowerShell, and CLI.

Q: What is ephemeral OS disk with full caching?

A: An ephemeral OS disk with full caching enhances the standard ephemeral OS disk by fully caching the OS disk onto the local disk. This caching removes the dependency on remote storage in steady state, improving resilience during remote storage outages. By using partial caching (the default mode), writes go to a different disk on local storage and reads for original files come from a remote base disk. By using full caching, the entire OS disk is cached locally, eliminating remote read and write latency.

Q: What are the prerequisites for full caching?

A: The local disk size of the VM SKU must be greater than (2 × OS disk size + 1 GiB), and the API version must be 2025-04-01 or later. Azure supports full caching on VMs with eight or more vCPUs in all N-series, L-series, and M-series; v5 D-series, and E-series. For more information, see Ephemeral OS disks.

Q: Is there any additional cost for full caching?

A: No, there's no additional cost charged for full caching beyond the standard VM and disk costs.

Q: What is the current availability status of full caching?

A: Ephemeral OS disk with full caching is generally available for supported VM sizes with eight or more vCPUs. Support for VMs with two or four vCPUs is planned for a future release.