An Azure service that is used to provision Windows and Linux virtual machines.
Hi LSI,
Thank you for your detailed post and for confirming key details like your use of managed disks, the Windows_Server license type (via PowerShell), the 2016 Datacenter edition, and your US English region. I understand you're attempting an in-place upgrade from Windows Server 2016 Datacenter to newer Datacenter versions (2019/2022/2025), but the setup process doesn't offer the "Keep files, settings, and apps" option—it's forcing a clean install instead.
This is a common issue when using a standard downloaded ISO. For Azure VMs, Microsoft requires a specific Azure Marketplace upgrade media managed disk to enable data preservation. Generic ISOs (even official ones) often result in the keep-files option being unavailable due to license, edition, or media compatibility checks. Your current setup (managed disks + Windows_Server licensing) is fully compatible with the supported Azure in-place upgrade process.
- Supported: Direct in-place upgrade from Windows Server 2016 Datacenter is supported to 2019, 2022, or 2025 Datacenter.
- Why the option is missing: You're likely using non-Azure upgrade media. The official method creates a dedicated upgrade disk that automatically enables "Keep files, settings, and apps."
- Prerequisites: Enough free space on the OS disk (at least 32 GB recommended—expand if needed), snapshots for safety, and temporarily disable AV/firewalls.
- Your VM is ready: Managed disks confirmed, license type correct, and en-US locale matches the upgrade media.
Steps to work on:
- Backup first Create a snapshot of your OS disk (and data disks) via the Azure portal. This lets you roll back instantly if needed.
- Create the Azure upgrade media managed disk (one-time step) Run a short PowerShell script in the Azure Cloud Shell or your local Az module. Example for Windows Server 2022 (repeat with the correct SKU for your target):
This creates a managed disk from the official MicrosoftWindowsServer/WindowsServerUpgrade offer.$resourceGroup = "WindowsServerUpgrades" $location = "EastUS" # Your region $diskName = "WinServer2022UpgradeDisk" $sku = "server2022Upgrade" # Use server2019Upgrade, server2022Upgrade, or server2025Upgrade # ... (full script in the doc – it pulls the latest Marketplace image) - Attach the upgrade disk to your running VM In the Azure portal → Your VM → Disks → Attach existing → Select the upgrade disk → Save.
- Perform the in-place upgrade (via RDP)
- Connect to the VM.
- Note the drive letter of the attached upgrade disk (usually E: or F:).
- Open an elevated PowerShell prompt in that drive and run:
.\setup.exe /auto upgrade /dynamicupdate disable /eula accept
- Post-upgrade
- The VM will reboot several times.
- Delete the upgrade media disk and any temporary snapshots once verified.
- Re-enable your AV/firewall software.
- Note: Azure Auto OS patching / Update Manager features may need re-configuration (the doc explains this).
Link : https://dori-uw-1.kuma-moon.com/en-us/azure/virtual-machines/windows-in-place-upgrade
Thanks,
Manish.