Ephemeral OS Disk Support in Azure Virtual Desktop: A Game Changer for Stateless Workloads
Microsoft Azure Virtual Desktop (AVD) continues innovating with features that simplify host management and enhance performance for organizations running virtual desktop infrastructures. With the public preview of ephemeral OS disk support, enterprises can now leverage a new approach for session host creation, tailored for stateless workloads that value speed, scalability, and cost optimization. 
What Are Ephemeral OS Disks?
Ephemeral OS disks are a special type of disk that stores the virtual machine (VM) operating system directly on the VM’s local storage rather than remote Azure-managed disk storage. This is ideal for stateless applications where persistent OS storage is unnecessary—and where virtual machines are frequently created, reset, and reimaged. The OS disk lives only as long as the VM; when the VM is deleted or deallocated, the disk data is lost. For environments where user data and settings are stored elsewhere (e.g., using FSLogix for user profiles), ephemeral OS disks can dramatically speed up both deployment and re-imaging cycles.
- Faster Provisioning: Session hosts can be created and reset in less time, thanks to lower disk provisioning overhead
- Improved Performance: Read/write operations happen on local storage with lower latency, improving session host responsiveness
- Cost Optimization: Eliminates the need for persistent OS disk storage, reducing ongoing storage costs for large host pools
- Security: As OS data is not persisted after VM removal, security risks from stale OS disks are reduced
- Stateless Workload Fit: Perfect for environments where session hosts do not need to retain state between uses (such as pooled, non-persistent desktops).
- Supported VM Sizes: Only VM sizes with sufficient local storage (typically Standard SSD-backed temporary disks) are supported during public preview
- No NVMe/Premium Storage: NVMe and premium SSD are not available in this preview phase
- Pooled Host Pools Only: Ephemeral OS disks are meant for AVD pooled host pools with a session host configuration enabled
- Data Loss on VM Removal: As VM deallocation removes the OS disk, use FSLogix or other solutions for user profile persistence
The feature is best suited for:
- Educational labs
- Call centers
- Development/test environments
- Temporary/short-lived virtual desktops for external contractors or events.
Implementation: Step-by-Step Guide
Below is a step-by-step procedure for deploying Azure Virtual Desktop session hosts with ephemeral OS disks using the Azure Portal. PowerShell and CLI instructions are possible, but the portal method is most accessible for beginners.
Ensure you have the following:
- An Azure subscription
- The relevant permissions to create AVD resources
- User profiles configured with FSLogix or an equivalent solution
- Log in to the Azure Portal.
- Enter Azure Virtual Desktop in the search bar and select the service.
- Go to Host pools and click Create.
- Fill out the Basic tab:

- Click Next: Session hosts.
Step 3: Configure Session Hosts
On the Session hosts tab:
- Number of session hosts: Choose as needed.
- Name prefix: e.g., ephemeralsh (max 11 characters; each session host gets a numbered suffix).
- Virtual machine type: Azure virtual machine.
- Virtual machine location: Must match virtual network region.
- Availability options: Select zones as preferred.
- Security type: Choose Standard/Trusted launch/Confidential VMs.
- Image: Select your desired Windows image (or use a custom image).
- Virtual machine size: Select a VM size that supports ephemeral OS disks (check for sufficient local temporary disk)
Step 4: Configure Ephemeral OS Disk
- OS disk type: Standard SSD (automatically selected when configuring ephemeral disk).
- Ephemeral OS disk: Must select this option. If the chosen VM size lacks sufficient local disk, this option will be unavailable.
- Boot Diagnostics: Enable or disable as preferred.
- Network and security: Select virtual network, subnet, and configure NSG if desired (AVD does not require public inbound ports).
- Domain to join: Pick Microsoft Entra ID or Active Directory, and complete required fields.
- Virtual Machine Administrator account: Choose Key Vault secret for local administrator credentials.

Optional:
- Proceed to configure Workspaces and integration as required.
- Click Review + create and ensure validation passes.
- Review all settings and select Create.

- Once the host pool and session hosts are created, go to the Overview page.
- Under Virtual machines, select the created session hosts and review their configuration.
- Confirm under the Disk section that “Ephemeral OS Disk” is displayed.
You may also deploy ephemeral OS disks with automation tools. For example, in Azure CLI:
Replace resources and parameters as per your requirements.
Automation via Azure CLI
az vm create \
--resource-group myResourceGroup \
--name myVM \
--image imageName \
--ephemeral-os-disk true \
--ephemeral-os-disk-placement ResourceDisk \
--os-disk-caching ReadOnly \
--admin-username azureuser \
--generate-ssh-keys
Automation via Azure Powershell
To deploy an Azure Virtual Desktop session host with an Ephemeral OS Disk using PowerShell, you will use the Az PowerShell module with special arguments. The key command is Set-AzVMOSDisk with -DiffDiskSetting Local, which ensures the OS disk is stored on the VM’s local resource disk. Below is a step-by-step PowerShell deployment guide for a session host VM with an Ephemeral OS Disk.
# Prerequisites:
# - Install Az PowerShell module (Install-Module -Name Az -Scope CurrentUser)
# - Authenticate: Connect-AzAccount
# - Set variables as needed for resource names and VM details
$resourceGroupName = "yourResourceGroup"
$location = "East US"
$vmName = "AVDephemeralHost01"
$vmSize = "Standard_D2s_v3" # Ensure sufficient local disk for ephemeral OS
$virtualNetworkName = "yourVnet"
$subnetName = "yourSubnet"
$imagePublisher = "MicrosoftWindowsDesktop"
$imageOffer = "windows-11"
$imageSku = "24h2-evd"
$imageVersion = "latest"
$adminUsername = "azureuser"
$adminPassword = ConvertTo-SecureString "Password123!" -AsPlainText -Force
# 1. Create VM configuration object using a gallery image
$vmConfig = New-AzVMConfig -VMName $vmName -VMSize $vmSize
$vmConfig = Set-AzVMOperatingSystem -VM $vmConfig -Windows -ComputerName $vmName -Credential (New-Object System.Management.Automation.PSCredential ($adminUsername, $adminPassword))
$vmConfig = Set-AzVMSourceImage -VM $vmConfig -PublisherName $imagePublisher -Offer $imageOffer -Skus $imageSku -Version $imageVersion
# 2. Configure Ephemeral OS Disk
$vmConfig = Set-AzVMOSDisk -VM $vmConfig -DiffDiskSetting Local -DiffDiskPlacement ResourceDisk -Caching ReadOnly
# 3. Set VM networking
$vnet = Get-AzVirtualNetwork -ResourceGroupName $resourceGroupName -Name $virtualNetworkName
$subnet = Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $subnetName
$nic = New-AzNetworkInterface -Name "$vmName-nic" -ResourceGroupName $resourceGroupName -Location $location -SubnetId $subnet.Id
$vmConfig = Add-AzVMNetworkInterface -VM $vmConfig -Id $nic.Id
# 4. Create the VM
New-AzVM -ResourceGroupName $resourceGroupName -Location $location -VM $vmConfig
# Optionally: Add to Host Pool, domain join, FSLogix setup, etc.
This script does the following:
- Sets up a VM configuration object for Windows 10 multisession (customize as required for your image).
- Configures the Ephemeral OS Disk with local diff disk settings.
- Attaches the VM to a virtual network and subnet.
- Creates the VM in the specified resource group and location.
Notes and Best Practices
- Ensure your chosen VM size has sufficient temporary local disk space to support the OS image. If the disk is too small, deployment will fail.
- Ephemeral OS Disks are optimal for stateless session hosts where no persistent OS-level changes are needed between VM resets or deletions.
- Combine this script with automation for domain joining and FSLogix user profile management for full Azure Virtual Desktop integration.
- For more complex scenarios, wrap this script in provisioning templates or deploy using Azure Automation.
- Size your host pool based on workload and disk requirements.
- Use autoscale features for cost efficiency in stateless environments.
- Persist user profiles and critical data outside the VM using FSLogix.
- Regularly monitor VM and disk performance to optimize host pool design.
Ephemeral OS Disk deployment in Azure Virtual Desktop via PowerShell enables faster provisioning and reduces cloud storage costs for stateless workloads. Use the provided script as a foundational template and adapt it for your specific host pool, image, and session requirements.
Using Dynamic Autoscaling plans with Ephemeral OS Disks
Ephemeral OS disks are designed for stateless workloads and don’t support traditional start or deallocate operations. To ensure reliable scaling and lifecycle management, we recommend using Dynamic Autoscaling plans when deploying session hosts with ephemeral OS disks.
With this setup, session hosts are created and deleted according to the rules defined in your scaling plan, ensuring efficient resource use while aligning with the stateless design of ephemeral OS disks.
Conclusion
Ephemeral OS disk support in public preview for Azure Virtual Desktop delivers a compelling advantage for stateless workloads needing rapid, cost-effective scalability. By following the steps above, Azure administrators can unlock new efficiencies while maintaining consistent and secure user experience. As this feature moves toward general availability, expect continued innovation and broader support for VM configurations—a sign of Microsoft’s commitment to agile cloud desktop delivery.