An Azure service that is used to provision Windows and Linux virtual machines.
Resizing the SQL Server VM changed the underlying VM SKU and storage layout, which in this case effectively redeployed the SQL image and its configuration rather than performing an in‑place resize of the existing OS and data disks. As a result, the VM came back as if it were a fresh SQL image deployment, and anything that was not on a persistent data disk that survived the operation was lost or reset.
Key points relevant to this scenario:
- Ephemeral/temporary disks are not persistent
- The D: drive in Azure Windows VMs is a temporary disk. It is explicitly not supported for storing data that must survive host moves or redeployments.
- When the VM is moved to different hardware (which can happen on resize), the temporary disk is recreated and its contents are lost. This includes anything stored there, such as
tempdbor any other files. - Official guidance is not to use the temporary disk for persistent data: “Don't use the temporary disk to store data. It is only temporary storage, so you would risk losing data that can't be recovered. Data loss can occur when the virtual machine moves to a different host. Resizing a virtual machine, updating the host, or a hardware failure on the host are some of the reasons a virtual machine might move.”
- SQL Server image + certain VM SKUs can reconfigure storage
- Some newer VM sizes (those with uninitialized ephemeral NVMe storage, often indicated by a lowercase
din the SKU name) change how the temporary disk is presented. - SQL Server on Azure VM images are tightly integrated with the VM size and storage layout. Moving between certain SKUs (for example, between generations or to SKUs with different ephemeral disk behavior like
Ddsv6,Ebdsv6,FXmdsv2, etc.) can cause SQL deployment or configuration issues iftempdbor system databases are tied to ephemeral storage. - There is explicit guidance to avoid impacted SKUs or to choose SKUs without the lowercase
dwhen using SQL images, or to reconfiguretempdbaway from ephemeral storage.
- Some newer VM sizes (those with uninitialized ephemeral NVMe storage, often indicated by a lowercase
- Correct pattern for persistent SQL and app configuration
- System and user databases, IIS content, and configuration that must persist across resizes and host moves should be on:
- The OS disk (C:) for OS and installed roles/features, or
- Dedicated data/log managed disks attached to the VM (for example, E:, F: created as data disks), not on the temporary disk.
- For SQL Server VMs, use the SQL Server settings → Storage configuration blade at deployment time to:
- Place system and user databases on persistent data disks.
- Configure
tempdbappropriately. If using local SSD, ensure it is understood as non‑persistent and that the SQL IaaS Agent extension manages re‑provisioning, or choose a non‑ephemeral drive fortempdb.
- System and user databases, IIS content, and configuration that must persist across resizes and host moves should be on:
- How to avoid this outcome on future resizes
- Do not store any required data or configuration on the temporary disk (D: by default).
- When choosing VM sizes for SQL Server on Azure VMs:
- Prefer SKUs recommended in the SQL VM performance best practices.
- Avoid impacted SKUs that deploy an uninitialized ephemeral drive unless
tempdbis explicitly moved off that storage.
- Before resizing:
- Ensure SQL data/log files, IIS content, and any configuration that must persist are on managed data disks.
- Take a full backup or create a managed image/snapshot of the VM and disks.
- If using impacted VM sizes
- If a desired SKU is on the impacted list (for example
Ddsv6,Ebdsv6,FXmdsv2,Dadsv6, etc.), use the non‑dvariant where possible (for exampleFXmsv2instead ofFXmdsv2) so thattempdbis placed on the same persistent storage as data files. - Alternatively, deploy a Windows‑only VM with the desired SKU, manually install SQL Server, and configure
tempdband data/log locations explicitly on persistent disks.
- If a desired SKU is on the impacted list (for example
In practice, to rebuild this environment safely:
- Recreate the VM using a supported SQL Server image and a non‑impacted SKU (or the non‑
dvariant of the SKU family). - On the SQL Server settings → Storage configuration page:
- Place system and user databases on dedicated data/log managed disks.
- Configure
tempdbon either the local SSD with SQL IaaS Agent management or on a persistent data disk.
- Install IIS and SSH on the OS disk and keep web content and SFTP data on persistent data disks (not D:).
- Document and script configuration (ARM/Bicep/Terraform, PowerShell, or Azure CLI) so that a resize or redeploy can be recovered quickly.
References: