Upgrading Azure Virtual Machine from Windows Server 2012 R2 to Windows Server 2016

Upgrading Azure Virtual Machine from Windows Server 2012 R2 to Windows Server 2016

Microsoft currently doesn’t support in-place upgrade of Windows operating systems running on virtual machines in Microsoft Azure. I have successfully performed several upgrades for customers throughout the last couple of years.

Microsoft and other community blog post would recommend that you either create and new server or download the VHD from Microsoft Azure and perform the upgrade on a local Hyper-V installation. This is a very time consuming task that can be avoided, if a in-place upgrade can be completed successfully

Note: Before performing the steps below it is highly recommended that you save a copy of the VHD or before a backup of the virtual machines using Azure Backup. Just in case anything doesn’t go as expected and a restore is needed.

Performing the upgrade to Windows Server 2016

Steps needed to complete the upgrade.

  1. Make sure you have a backup or copy of the VHD
  2. Download the Windows Server 2016 Datacenter from Microsoft Volumen Licensing
  3. Mount the ISO file on the server where you are performing the upgrade.
  4. Open a elevated command-prompt and navigate to the installation source
  5. Execute the following command: [Windows Server 2016 Source]\setup.exe /auto upgrade /DynamicUpdate enable /pkey XXXXXXXXXXXXXXXXXXXX-XXXXX /showoobe none
    1. Remember to replace “XXXXXXXXXXXXXXXXXXXX-XXXXX” with the product key
  6. Respond to all question in the Windows Server setup
  7. The server starts the upgrade and the RDP connection gets disconnected
  8. Monitor the progress of the upgrade from Azure VM boot diagnostics

Considering that everything went as expected you should see that the server was upgraded to Windows Server 2016.

Microsoft knowledge article: An in-place system upgrade is not supported on Windows-based Azure VMs

Microsoft recommended steps for performing a upgrade:

Vote for official support for in-place upgrade:

https://feedback.azure.com/forums/216843-virtual-machines/suggestions/18691129-support-upgrading-existing-azure-vm-with-windows-s

Getting stuck at the EULA / License Terms?

Microsoft Azure do not provide any access to console mode, which makes it impossible to accept the EULA by clicking “Accept”. You can see a screenshot of the console under boot diagnostics, if your Windows Server is stuck and requiring user input a rollback will be needed.

 

8 thoughts on “Upgrading Azure Virtual Machine from Windows Server 2012 R2 to Windows Server 2016”

  • Kai

    Where do I get the Product Key from?

  • Hi Peter, we use Azure and have a 2012 DataCenter R2. Do you assist on upgrading to the latest Azure Server? While we do a good job of maintaining our server, this seems to be something we need assistance on. Thanks!

  • Hi Peter,
    I am trying In-Place upgrade from 2012r2 to 2016
    after completing upgrade. in boot diagnostic I saw that VM is asking to change Administrator password, How can I skip that part. it required manual intervention.

    • SJ

      Ran in to the same issue. That is because by default 2016 installs as server core with RDP disabled. I am guessing the only way around this will be to re-install with the desktop experience.
      @Peter: How did you get around this issue?

    • sy

      may i know how you do the in-place upgrade? Thank you.

  • I just faced this problem today – as you say having Azure Backup of the VM is key. I really did not want to go thru the hassle of downloading the VHD – building a VM around it – upgrading it on-prem – performing the inplace upgrad – migrating it back up to Azure. All because there was no facility to click the “accept” box on the EULA.
    Thanks for sharing this key workaround.

Comments are closed.