Perform an in-place upgrade on your EC2 Windows instance
Before you perform an in-place upgrade, you must determine which network drivers the instance is running. PV network drivers enable you to access your instance using Remote Desktop. Instances use either AWS PV, Intel Network Adapter, or the Enhanced Networking drivers. For more information, see Paravirtual drivers for Windows instances.
Before you begin an in-place upgrade
Complete the following tasks and note the following important details before you begin your in-place upgrade.
-
Read the Microsoft documentation to understand the upgrade requirements, known issues, and restrictions. Also review the official instructions for upgrading.
-
We recommend performing an operating system upgrade on instances with at least 2 vCPUs and 4GB of RAM. If needed, you can change the instance to a larger size of the same type (t2.small to t2.large, for example), perform the upgrade, and then resize it back to the original size. If you are required to retain the instance size, you can monitor the progress using the instance console screenshot. For more information, see Amazon EC2 instance type changes.
-
Verify that the root volume on your Windows instance has enough free disk space. The Windows Setup process might not warn you of insufficient disk space. For information about how much disk space is required to upgrade a specific operating system, see the Microsoft documentation. If the volume does not have enough space, it can be expanded. For more information, see Amazon EBS Elastic Volumes in the Amazon EBS User Guide.
-
Determine your upgrade path. You must upgrade the operating system to the same architecture. For example, you must upgrade a 32-bit system to a 32-bit system. Windows Server 2008 R2 and later are 64-bit only.
-
Disable antivirus and anti-spyware software and firewalls. These types of software can conflict with the upgrade process. Re-enable antivirus and anti-spyware software and firewalls after the upgrade completes.
-
Update to the latest drivers as described in Migrate an EC2 Windows instance to a Nitro-based instance type.
-
The Upgrade Helper Service only supports instances running Citrix PV drivers. If the instance is running Red Hat drivers, you must manually upgrade those drivers first.
Upgrade an instance in-place with AWS PV, Intel Network Adapter, or the Enhanced Networking drivers
Use the following procedure to upgrade a Windows Server instance using the AWS PV, Intel Network Adapter, or the Enhanced Networking network drivers.
To perform the in-place upgrade
-
Create an AMI of the system you plan to upgrade for either backup or testing purposes. You can then perform the upgrade on the copy to simulate a test environment. If the upgrade completes, you can switch traffic to this instance with little downtime. If the upgrade fails, you can revert to the backup. For more information, see Create an Amazon EBS-backed AMI.
-
Ensure that your Windows Server instance is using the latest network drivers.
-
To update your AWS PV driver, see Upgrade PV drivers on EC2 Windows instances.
-
To update your ENA driver, see Install the ENA driver on EC2 Windows instances.
-
To update your Intel drivers, see Enhanced networking with the Intel 82599 VF interface
-
-
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Instances. Locate the instance. Make a note of the instance ID and Availability Zone for the instance. You need this information later in this procedure.
-
If you are upgrading from Windows Server 2012 or 2012 R2 to Windows Server 2016 or later, perform the following on your instance before you proceed.
-
Uninstall the EC2Config service. For more information, see Windows Service administration for EC2Launch v2 and EC2Config agents.
-
Install EC2Launch v1 or the EC2Launch v2 agent. For more information, see Use the EC2Launch v1 agent to perform tasks during EC2 Windows instance launch and Use the EC2Launch v2 agent to perform tasks during EC2 Windows instance launch.
-
Install the AWS Systems Manager SSM Agent. For more information, see Working with SSM Agent in the AWS Systems Manager User Guide.
-
-
Create a new volume from a Windows Server installation media snapshot.
-
In the left navigation pane, under Elastic Block Store, choose Snapshots.
-
From the filter bar, choose Public snapshots.
-
In the search bar, specify the following filters:
-
Choose Owner Alias, then =, then amazon.
-
Choose Description, and then start typing
Windows
. Select the Windows filter that matches the system architecture and language preference you're upgrading to. For example, choose Windows 2019 English Installation Media to upgrade to Windows Server 2019.
-
-
Select the checkbox next to the snapshot that matches the system architecture and language preference you're upgrading to, and then choose Actions, Create volume from snapshot.
-
On the Create volume page, choose the Availability Zone that matches your Windows instance, and then choose Create volume.
-
-
In the Successfully created volume vol-
1234567890example
banner at the top of the page, choose the ID of the volume that you just created. -
Choose Actions, Attach volume.
-
On the Attach volume page, for Instance, select the instance ID of your Windows instance, and then choose Attach volume.
-
Make the new volume available for use by following the steps at Make an Amazon EBS volume available for use.
Important
Do not initialize the disk because doing so will delete the existing data.
-
In Windows PowerShell, switch to the new volume drive. Begin the upgrade by opening the installation media volume you attached to the instance.
-
If you are upgrading to Windows Server 2016 or later, run the following:
.\setup.exe /auto upgrade /dynamicupdate disable
Note
Running the setup.exe with the
/dynamicupdate
option set to disabled prevents Windows from installing updates during the Windows Server upgrade process, as installing updates during the upgrade can cause failures. You can install updates with Windows Update after the upgrade completes.If you are upgrading to an earlier version of Windows Server, run the following:
Sources\setup.exe
-
For Select the operating system you want to install, select the full installation SKU for your Windows Server instance, and choose Next.
-
For Which type of installation do you want?, choose Upgrade.
-
Complete the wizard.
-
Windows Server Setup copies and processes files. After several minutes, your Remote Desktop session closes. The time it takes to upgrade depends on the number of applications and server roles running on your Windows Server instance. The upgrade process could take as little as 40 minutes or several hours. The instance fails status check 1 of 2 during the upgrade process. When the upgrade completes, both status checks pass. You can check the system log for console output or use Amazon CloudWatch metrics for disk and CPU activity to determine whether the upgrade is progressing.
Note
If upgrading to Windows Server 2019, after the upgrade is complete you can change the desktop background manually to remove the previous operating system name if desired.
If the instance has not passed both status checks after several hours, see Troubleshoot an operating system upgrade on an EC2 Windows instance.
Post upgrade tasks
-
Log in to the instance to initiate an upgrade for the .NET Framework and reboot the system when prompted.
-
If you haven't already done so in a prior step, install the EC2Launch v1 or EC2Launch v2 agent. For more information, see Use the EC2Launch v1 agent to perform tasks during EC2 Windows instance launch and Use the EC2Launch v2 agent to perform tasks during EC2 Windows instance launch.
-
If you upgraded to Windows Server 2012 R2, we recommend that you upgrade the PV drivers to AWS PV drivers. If you upgraded on a Nitro-based instance, we recommend that you install or upgrade the NVME and ENA drivers. For more information, see Windows Server 2012 R2
, AWS NVMe drivers, or Enable enhanced networking on Windows. -
Re-enable antivirus and anti-spyware software and firewalls.