Migrating my Windows VM from a size with local temp disk to a VM size with no local temp disk. whether the existing data disk gets affected while doing this Migration?

Lini Mariam Mathew 25 Reputation points
2026-04-23T15:18:40.9233333+00:00

During migration of a Windows VM from a VM size with a local temporary (resource) disk to a diskless VM size, what is the impact, if any, on existing attached managed data disks (including data persistence and drive letter assignments)?

Azure Disk Storage
Azure Disk Storage

A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.

0 comments No comments

Answer accepted by question author
Andreas Baumgarten 132.8K Reputation points MVP Volunteer Moderator
2026-04-23T15:49:19.2733333+00:00

Hi @Lini Mariam Mathew ,

the data stored on the disks aren't affected.

But the driver letter assignment will.

The temp disk/remote disk get's by default drive letter "D", the first data disk might have the drive letter "E".

The migration process is straight forward:

  • Note the configuration of the VM configuration (drive letter assignments, network and IP configuration, public IP if there is any, ...)
  • Move the pagefile.sys file from drive D: to drive C: -> Move pagefile.sys to C drive
  • Shutdown the VM
  • Create a backup of the full VM (better be safe than sorry)
  • Create a full snapshot of the OS disk
  • Create a new managed disk from the snapshot
  • Delete the VM -> KEEP THE DISKS! / DON'T DELETE THE DISKS!
  • Create a new VM from the new created disk and attach the data disks
  • After the VM is started you can configure the drive letter assignments if required

(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards

Andreas Baumgarten

Was this answer helpful?


1 additional answer

Sort by: Oldest
  1. AI answer

    2026-04-23T15:19:00.76+00:00

    Existing attached managed data disks are not affected by migrating from a Windows VM size with a local temporary disk to a VM size with no local temporary disk, as long as the migration is done using the documented snapshot-based method.

    Key points:

    1. Data persistence on managed data disks
      • Managed data disks are independent resources from the VM size and from the local temporary (resource) disk.
      • The temporary disk is explicitly non-persistent and intended only for short-term data such as page files or tempdb.
      • When changing VM size or recreating the VM from a snapshot as described, the OS and data disks remain intact and their data is preserved.
      • The retirement guidance for DCsv2 → DCdsv3 explicitly states that OS and data disks are not affected by the resize; the same principle applies when using the snapshot-based migration to a diskless size.
    2. Impact on drive letters
      • The local temporary disk (commonly D:) is the one that disappears when moving to a diskless size.
      • Managed data disks are registered as SCSI drives and can be assigned drive letters as needed.
      • If the environment followed the recommended pattern (applications and data on data disks, not on the temporary disk), those data disks and their volumes remain available after migration.
      • However, if any scripts, images, or configurations explicitly depend on the presence of the local temp disk or expect a specific drive letter for it, those may fail on a diskless size. The documentation notes that images or scripts that point to the local temp disk might not work correctly with diskless sizes.
    3. Required precautions for Windows migration
      • For Windows, direct resize from a VM with local temp disk to a diskless VM size is not supported; the documented workaround is:
        1. Move the pagefile from the temporary disk (D:) to C: using the “Temporarily move pagefile.sys to C drive” procedure.
        2. Take a snapshot of the VM.
        3. Create a new VM (diskless size) from that snapshot.
      • Deviation from these steps can cause resize errors but does not imply data loss on existing managed data disks; the risk is primarily around the operation failing or the image not being compatible if it depends on the resource disk.

    In summary: managed data disks and their data are preserved through this migration. The main change is the removal of the non-persistent local temporary disk and any dependencies on it; drive letters for data disks can be managed as usual after the new VM is created.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.