Perform an in-place upgrade
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. Starting with Windows Server 2008 R2, instances use either Amazon PV, Intel Network Adapter, or the Enhanced Networking drivers. Instances with Windows Server 2003 and Windows Server 2008 use Citrix PV drivers. For more information, see Paravirtual drivers for Windows instances.
Automated upgrades
For steps on how to use Amazon Systems Manager to automate the upgrade of your Windows Server
2008 R2 to Server 2012 R2 or from SQL Server 2008 R2 on Windows Server 2012 R2 to
SQL Server 2016, see Upgrade Your End of Support Microsoft 2008 Workloads in Amazon with
Ease
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 Change the instance type.
-
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.
-
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 to latest generation instance types.
-
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 Amazon PV, Intel Network Adapter, or the Enhanced Networking drivers
Use the following procedure to upgrade a Windows Server instance using the Amazon 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 a custom Windows AMI.
-
Ensure that your Windows Server instance is using the latest network drivers. See Upgrade PV drivers on Windows instances for information on upgrading your Amazon PV driver.
-
Open the Amazon EC2 console at https://console.amazonaws.cn/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, 2019, or 2022, perform the following on your instance before proceeding:
-
Uninstall the EC2Config service. For more information, see Stop, restart, delete, or uninstall EC2Config.
-
Install EC2Launch v1 or the EC2Launch v2 agent.
-
Install the Amazon Systems Manager SSM Agent. For more information, see Working with SSM Agent in the Amazon 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. In the search bar filter, choose Public Snapshots.
-
Add the Owner alias filter to the search bar and choose amazon.
-
Add the Description filter and enter
Windows
. Select Enter. -
Select the snapshot that matches the system architecture and language preference you are upgrading to. For example, select Windows 2019 English Installation Media to upgrade to Windows Server 2019.
-
Choose Actions, Create Volume.
-
In the Create Volume dialog box, choose the Availability Zone that matches your Windows instance, and choose Create Volume.
-
-
In the Create Volume Request Succeeded message, choose the volume that you just created.
-
Choose Actions, Attach Volume.
-
In the Attach Volume dialog box, enter the instance ID of your Windows instance and choose Attach.
-
Make the new volume available for use by following the steps at Make an Amazon EBS volume available for use on Windows.
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 upgrade.
Upgrade an instance in-place with Citrix PV drivers
Citrix PV drivers are used in Windows Server 2003 and 2008. There is a known issue during the upgrade process where Windows Setup removes portions of the Citrix PV drivers that enable you to connect to the instance by using Remote Desktop. To avoid this problem, the following procedure describes how to use the Upgrade Helper Service during your in-place upgrade.
Using the upgrade helper service
You must run the Upgrade Helper Service before you start the upgrade. After you run it, the utility creates a Windows service that runs during the post-upgrade steps to correct the driver state. The executable is written in C# and can run on .NET Framework versions 2.0 through 4.0.
When you run Upgrade Helper Service on the system before the upgrade, it performs the following tasks:
-
Creates a new Windows service named
UpgradeHelperService
. -
Verifies that the Citrix PV drivers are installed.
-
Checks for unsigned boot critical drivers and presents a warning if any are found. Unsigned boot critical drivers could cause system failure after the upgrade if the drivers are not compatible with the newer Windows Server version.
When you run Upgrade Helper Service on the system after the upgrade, it performs the following tasks:
-
Enables the
RealTimeIsUniversal
registry key for the correct time synchronization. -
Restores the missing PV driver by executing the following command:
pnputil -i -a "C:\Program Files (x86)\Citrix\XenTools\*.inf"
-
Installs the missing device by executing the following command:
C:\Temp\EC2DriverUtils.exe install "C:\Program Files (x86)\Citrix\XenTools\xevtchn.inf" ROOT\XENEVTCHN
-
Automatically removes
UpgradeHelperService
when complete.
Perform the upgrade on instances running Citrix PV drivers
To complete the upgrade, you must attach the installation media volume to your
EC2 instance and use UpgradeHelperService.exe
.
To upgrade a Windows Server instance running Citrix PV drivers
-
Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/
. -
In the navigation pane, choose Instances and locate the instance. Make a note of the instance ID and Availability Zone for the instance. You need this information later in this procedure.
-
Create a new volume from a Windows Server installation media snapshot.
-
In the navigation pane, choose Snapshots, and next to the filter field, choose Public snapshots.
-
From the Search field, choose Owner alias, then =, then amazon (new console), or choose Owner and then Amazon images (old console).
-
From the Search field, choose Description, then : (contains), and then enter
Windows
(new console), or choose Description and then enterWindows
(old console). Press Enter. -
Select the snapshot that matches the system architecture of your instance. For example, Windows 2012 Installation Media.
-
Choose Actions, Create volume from snapshot (new console) or Create Volume (old console).
-
In the Create volume dialog box, select the Availability Zone that matches your Windows instance, and choose Create volume.
-
-
(New console) From the navigation pane, choose Volumes, and then choose the volume that you just created
(Old console) In the Volume Successfully Created dialog box, choose the volume that you just created.
-
Choose Actions, Attach volume.
-
In the Attach volume dialog box, enter the instance ID and choose Attach volume.
-
On your Windows instance, on the
C:\
drive, create a folder namedtemp
.Important
This folder must be available in the same location after the upgrade. Creating the folder in a Windows system folder or a user profile folder, such as the desktop, can cause the upgrade to fail.
-
Run
C:\temp\UpgradeHelperService.exe
and review theC:\temp\Log.txt
file for any warnings. -
Uninstall PowerShell from the Windows Server 2003 instance.
-
Begin the upgrade by using Windows Explorer to open the installation media volume that you attached to the instance.
-
Run the
Sources\Setup.exe
file. -
For Select the operating system you want to install, select the full installation SKU for your Windows Server instance, and then 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.
Post upgrade tasks
-
Log in to the instance to initiate an upgrade for the .NET Framework and reboot the system when prompted.
-
Install the latest version of the EC2Config service (Windows 2012 R2 and earlier) or EC2Launch (Windows 2016 and later). For more information, see Install the latest version of EC2Config.
-
Install Microsoft hotfix KB2800213
. -
Install Microsoft hotfix KB2922223
. -
If you upgraded to Windows Server 2012 R2, we recommend that you upgrade the PV drivers to Amazon 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
, Install or upgrade Amazon NVMe drivers using PowerShell, or Enable enhanced networking on Windows. -
Re-enable antivirus and anti-spyware software and firewalls.