Share via

Resize of SQL Virtual Machine loses all settings

TBFG Azure Admin 0 Reputation points
2026-04-08T23:03:15.69+00:00

I create a SQL VM using the sql2022-ws2022 image and started to setup. Machine is D8ds_v4

This image setup

  • C Drive with the operating system
  • D Drive (temp drive including the SQL Temp Database)
  • E Drive (1 GB Drive for SQL Data Files)
  • F Drive (1 GB Drive for SQL Log Files

I then installed IIS on the C Drive and setup web sites that were located on the E Drive, and FTP for this site.

I also setup SSH for SFTP, created accounts

Everything was setup and working

Because this is a new setup and I hadn't done too much work (though a few days worth) I decided to Resize the VM to determine how that works and what the outcome is.

I resized to E8bds_v5 which seemed the next logical step up for us.


The Resize resulted in

  • SQL Server Settings being lost
    • Temp Database no longer on the Temp Drive
    • the 5 Database no longer attached
    • All SQL Users were no longer setup
  • IIS was not installed at all
  • SSHOpen was not installed
  • All users setup in Windows Admin were no longer there

Basically I had to set everything up again.


What am I missing here?

Luckily I didn't wait for the need to resize to find all of this out, our system is in about 800 venues around Australia and 2-3 hour downtime is not a desired outcome after resizing.

Any guidance before I set everything up again would be appreciated.

Thanks in Advance

Wayne

SQL Server on Azure Virtual Machines

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-08T23:03:39.34+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    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:

    1. 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 tempdb or 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.”
    2. SQL Server image + certain VM SKUs can reconfigure storage
      • Some newer VM sizes (those with uninitialized ephemeral NVMe storage, often indicated by a lowercase d in 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 if tempdb or system databases are tied to ephemeral storage.
      • There is explicit guidance to avoid impacted SKUs or to choose SKUs without the lowercase d when using SQL images, or to reconfigure tempdb away from ephemeral storage.
    3. 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 tempdb appropriately. 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 for tempdb.
    4. 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 tempdb is 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.
    5. If using impacted VM sizes
      • If a desired SKU is on the impacted list (for example Ddsv6, Ebdsv6, FXmdsv2, Dadsv6, etc.), use the non‑d variant where possible (for example FXmsv2 instead of FXmdsv2) so that tempdb is 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 tempdb and data/log locations explicitly on persistent disks.

    In practice, to rebuild this environment safely:

    1. Recreate the VM using a supported SQL Server image and a non‑impacted SKU (or the non‑d variant of the SKU family).
    2. On the SQL Server settings → Storage configuration page:
      • Place system and user databases on dedicated data/log managed disks.
      • Configure tempdb on either the local SSD with SQL IaaS Agent management or on a persistent data disk.
    3. Install IIS and SSH on the OS disk and keep web content and SFTP data on persistent data disks (not D:).
    4. Document and script configuration (ARM/Bicep/Terraform, PowerShell, or Azure CLI) so that a resize or redeploy can be recovered quickly.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.