Summary

This blog provides a comprehensive overview of in-place upgrades for Azure virtual machines, detailing the process, benefits, and best practices for seamlessly upgrading VMs with minimal downtime and risk.

Azure VM in-place upgrades are a total game changer for your IT strategy. To have performance, security, and functionality you need to keep your infrastructure up to date in this ever-changing digital world. Businesses using Microsoft Azure need to manage their virtual machines.

The Azure in-place upgrade is one of the most powerful tools to help you achieve that. The Azure in-place upgrade allows you to move your virtual machines across different operating systems or major updates without having to redeploy or recreate the VM from scratch. The upgrade process is simpler, with less downtime, risk of data loss, and custom configurations intact. So you can smoothly move to newer OS releases or get new features without disrupting your services.

Let’s know all about in-place upgrades in this blog.

Table of Contents:

Steps to Follow Before Beginning an In-Place Upgrade

Examine the operating system upgrade requirements for the target.

  • Options to upgrade from Windows Server 2008 or Windows Server 2008 R2 to Windows Server 2012
  • Options for upgrading Windows Server 2012 or Windows Server 2012 R2 to Windows Server 2016
  • The options are available for upgrading to Windows Server 2019 from Windows Server 2012 R2 or Windows Server 2016.
  • Upgrade options for Windows Server 2022 from Windows Server 2016 or Windows Server 2019
  • Ensure that there is enough free space on the OS disk so that in-place upgrades can be done.
  • Disable firewalls and antivirus along with antimalware applications.
  • Certain software can conflict with the upgrading procedure.
  • After the update is finished, reactivate firewalls and antivirus.
  • Volume licenses are a must-use for the virtual machines (VM) that you have in place. When these VMs are built on Azure, it happens automatically by default. If a virtual machine had previously been migrated to Azure, then it must be upgraded to become a volume license.
  • Managed Disks on the virtual machine to be upgraded must be used for the in-place upgrading procedure.

1. Convert VM to Volume License (Activation of KMS Server)

  • The virtual machine must be set up for Windows Server volume licensing to use the upgrade media that Azure provides.
  • In Azure, any Windows Server VM that was set up from a generalized image has the default behavior.
  • To use the upgrade media that Azure provides, the virtual machine (VM) may need to be switched to volume licensing if it was imported into Azure.

2. Upgrade to Managed Disks

  • The in-place upgrading procedure must use Managed Disks on the virtual machine (VM) to be upgraded.
  • Managed disks are used by the majority of virtual machines (VMs) in Azure, and support for unmanaged disk retirement was announced in November 2022.

Also Read: Mastering Industry-Specific Compliance in Azure Cloud

How to Upgrade Windows Server on Azure In-Place?

1. Create a Snapshot of the Operating System Disk

  • Taking a snapshot of your operating system disk and any data disks is recommended before starting the in-place upgrade process.
  • This enables you to restore the virtual machine to its original state if something goes wrong in the course of the in-place upgrade process.

2. Create Upgrade Media Disk

  • The upgrade media needs to be connected to the virtual machine as a managed disk in order to perform an in-place upgrade.
  • To create the upgrade media, modify the variables in the following PowerShell script for Windows Server 2022.

  • To initiate an upgrade, connect the media supporting the desired Windows Server version to the VM that will be upgraded. This procedure can be executed on either a running or a stopped VM. Follow the instructions below.
    1. Sign in to the Azure portal.
    2. Search for and select Virtual machines.
    3. Select a virtual machine to perform the in-place upgrade from the list.
    4. On the Virtual Machine page, select Disks.
    5. On the Disks page, select Attach existing disks.
    6. In the drop-down for the Disk name, select the name of the upgrade disk created in the previous step.
    7. Select Save to attach the upgrade disk to the VM.

Perform In-Place Upgrade

  • It’s just like on the local Windows server. Log into the Windows Server via any remote desktop connection.
  • Identify the upgrade disk’s drive letter.
  • Start Windows PowerShell. Change the directory to the only directory on the upgrade disk.
  • Execute the following command to start the upgrade:
  • .\setup.exe /auto upgrade /dynamic update disable
  • Select the correct “Upgrade to” image based on the current version and configuration of the VM.
  • The virtual machine will immediately disconnect from the remote desktop session while it is upgrading. Using the snapshot feature offered by the Azure portal, one can keep an eye on the upgrade’s progress until the virtual machine has been disconnected from the remote desktop session.

1. Perform In-Place Upgrade for Windows Server 2012

  • The virtual machine needs to be running to start the in-place update.
  • Use these steps to carry out the upgrade
    1. Connect to the VM using RDP or RDP-Bastion.
    2. Determine the drive letter for the upgraded disk
    3. Start Windows PowerShell.
    4. Change the directory to the only directory on the upgrade disk.
    5. Execute the following command to start the upgrade:
    6. .\setup.exe
    7. When Windows Setup launches, select Install Now.
    8. To get important updates for Windows Setup, select No thanks.
    9. Select the correct Windows Server 2012 “Upgrade to” image based on the current version and configuration of the VM.
    10. On the License terms page, select I accept the license terms and then select Next.
    11. Select Upgrade: Install Windows and keep files, settings, and applications.
  • The virtual machine will immediately disconnect from the remote desktop session while it is upgrading. Using the snapshot feature offered by the Azure portal, one can keep an eye on the upgrade’s progress until the virtual machine has been disconnected from the remote desktop session.

2. Windows Server Upgrade Matrix

After-Upgrade Procedures

Once the upgrade process is completed successfully, the following steps must be taken to eliminate any artifacts created during the upgrade process.

  • Delete the snapshots of the OS disk and data disk(s) if they were created.
  • Delete the upgrade media Managed Disk.
  • Turn on any firewall, antivirus, or anti-spyware software that was turned off at the beginning of the upgrade process.

Benefits of In-Place Upgrades

  • Business Continuity: No downtime in business operations, in-place upgrades mean evolution. You can upgrade your current VMs instead of new ones, so services don’t get interrupted and customers are happier.
  • Cost Savings: If you want to upgrade a current VM instead of building a new one from scratch it will cost less than building a new one. You don’t have to pay for new resources and other costs associated with reconfiguration and data migration.
  • Increased Productivity: By keeping everything as is, software and data, companies can avoid the hassle of setting up again. That’s why taking a break is always recommended before getting back to work. This allows IT teams to focus on more strategic stuff.
  • Reduced Risk and Complexity: Risks of data transfer, configuration mistakes, or incompatibility issues are reduced when upgrading in place. The predictability and control of the upgrade process benefit the organization by keeping the system intact and minimizing post-upgrade problems.
  • Better Security: Upgrading to the latest versions gets you the latest security patches and features so your systems are more secure. This protects from vulnerabilities and compliance while adhering to industry standards.
  • Simplified Licensing: With in-place updates, you can manage licenses better because you don’t have to get new licenses for the new VMs. This way you can control the license costs.

Benefits of Upgrading an Azure Virtual Machine In-Place

  • Minimized Downtime: Downtime is usually reduced when comparing in-place updates to redeploying or building new virtual machines.
  • Preservation of Configuration and Data: The installed apps, data, and configuration settings are all preserved during an in-place upgrade.
  • Streamlined Licensing: In the event that software or services are authorized on a per-VM basis, then upgrading the current VM could ease license control because you do not have to contend with fresh VM instances which may need more licensing.
  • Improved Performance and Features: Not only does upgrading to a newer version allow you to enhance its performance, but you can also get access to new features and obtain enhanced protection without having to redeploy it entirely.

Also Read: Embracing the Cloud: Migrating Your Hyper-V Infrastructure to Microsoft Azure

Conclusion

Performing an In-place upgrade of an Azure Virtual Machine could be an excellent way of keeping your system up to date, maintaining its efficiency and uniformity as well as reducing outages. The seamless enhancement of VM capabilities along with the adoption of new features and improvements can be achieved through careful planning of the upgrade process, ensuring that all prerequisites are met, and validating configurations after upgrading.

This method simplifies the upgrade procedure as well as ensures that there is operational constancy, reduces the extensive reconfiguration needs, and subsequently leads to an efficient IT environment that is also resilient.

The team at Hurix Digital is more than equipped to help your business out. You can schedule a free call to get to know how your needs can be taken care of.