Menu
Amazon Elastic Compute Cloud
User Guide for Windows Instances

Upgrading a Windows Server EC2 Instance to a Newer Version of Windows Server

There are two methods to upgrade an older version of an instance running Windows Server to a newer version: in-place upgrade and migration (also called side-by-side upgrade). Microsoft has traditionally recommended migrating to a newer version of Windows Server instead of upgrading. Migrating can result in fewer upgrade errors or issues, but can take longer than an in-place upgrade because of the need to provision a new instance, plan for and port applications, and adjust configurations settings on the new instance. An in-place upgrade can be faster, but software incompatibilities can produce errors.

Before You Begin an In-Place Upgrade

Before you perform an in-place upgrade, you must determine which PV drivers the instance is running. PV drivers enable you to access your instance using Remote Desktop. Starting with Windows Server 2012 RTM, instances use AWS PV drivers. Earlier Windows Server instances use Citrix PV drivers. For more information, see Paravirtual Drivers.

Complete the following tasks and note the following important details before you upgrade.

  • Read the Microsoft documentation to understand the upgrade requirements, known issues, and restrictions. You should also review the official instructions for upgrading.

  • We do not recommend performing an operating system upgrade on a T1 or T2 instance type. These types of instances might not have enough resources to manage the upgrade process. If you need to upgrade one of these instances, you must resize the instance to another instance type, perform the upgrade, and then resize it back to a T1 or T2 instance type. For more information, see Resizing Your Instance.

  • 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 Creating an Amazon EBS-Backed Windows AMI.

  • 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 Modifying the Size, IOPS, or Type of an EBS Volume on Windows.

  • 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 anti-virus and anti-spyware software and firewalls. These types of software can conflict with the upgrade process. Re-enable anti-virus and anti-spyware software and firewalls after the upgrade completes.

  • 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.

In-Place Upgrade with AWS PV drivers

Use the following procedure to upgrade instances running AWS PV drivers.

To upgrade a Windows Server instance running AWS PV drivers

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Instances. Locate the instance. Make a note of the instance ID and Availability Zone for the instance. You will need this information later in this procedure.

  3. Create a new volume from a Windows Server installation media snapshot.

    1. In the navigation pane, choose Snapshots.

    2. From the filter bar, choose Public Snapshots.

    3. Add the Owner filter and choose Amazon images.

    4. Add the Description filter and type Windows.

    5. Press Enter.

    6. Select the snapshot that matches your system architecture and language preference. For example, select Windows 2012 R2 English Installation Media if your instance is running Windows Server 2012 R2.

    7. Choose Actions, Create Volume.

    8. In the Create Volume dialog box, choose the Availability Zone that matches your Windows instance, and then choose Create.

  4. In the Volume Successfully Created message, choose the volume you just created.

  5. Choose Actions, Attach Volume.

  6. In the Attach Volume dialog box, type the instance ID and choose Attach.

  7. Begin the upgrade by using Windows Explorer to open the installation media volume you attached to the instance.

  8. Run Sources\Setup.exe.

  9. For Select the operating system you want to install, select the full installation SKU for your Windows Server instance, and then choose Next.

  10. For Which type of installation do you want?, choose Upgrade.

  11. Complete the wizard.

Windows Server Setup will copy and process files. After several minutes, your Remote Desktop session closes. The time it takes to upgrade will depend 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.

If the instance has not passed both status checks after several hours, see Troubleshooting an Upgrade.

In-Place Upgrade with Citrix PV drivers

Citrix PV drivers are used in all versions of Windows Server 2003 and 2008. There is a known issue during the upgrade process where 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.

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 executes 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 called UpgradeHelperService.

  • Verifies that 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 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.

Performing 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

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Instances. Locate the instance. Make a note of the instance ID and Availability Zone for the instance. You will need this information later in this procedure.

  3. Create a new volume from a Windows Server installation media snapshot.

    1. In the navigation pane, choose Snapshots.

    2. From the filter bar, choose Public Snapshots.

    3. Add the Owner filter and choose Amazon images.

    4. Add the Description filter and type Windows.

    5. Press Enter.

    6. Select the snapshot that matches the system architecture of your instance. For example, Windows 2008 64-bit Installation Media.

    7. Choose Actions, Create Volume.

    8. In the Create Volume dialog box, choose the Availability Zone that matches your Windows instance, and then choose Create.

  4. In the Volume Successfully Created message, choose the volume you just created.

  5. Choose Actions, Attach Volume.

  6. In the Attach Volume dialog box, type the instance ID and choose Attach.

  7. On your Windows instance, on the C:\ drive, create a folder named temp.

    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.

  8. Download OSUpgrade.zip and extract the files into the C:\temp folder.

  9. Run C:\temp\UpgradeHelperService.exe review the C:\temp\Log.txt file for any warnings.

  10. Use Knowledge Base article 950376 from Microsoft to uninstall PowerShell from a Windows 2003 instance.

  11. Begin the upgrade by using Windows Explorer to open the installation media volume that you attached to the instance.

  12. Run Sources\Setup.exe folder.

  13. For Select the operating system you want to install, select the full installation SKU for your Windows Server instance, and then choose Next.

  14. For Which type of installation do you want?, choose Upgrade.

  15. Complete the wizard.

Windows Server Setup will copy and process files. After several minutes, your Remote Desktop session closes. The time it takes to upgrade will depend 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

  1. Log into the instance to initiate an upgrade for the .NET Framework and reboot the system when prompted.

  2. Install the latest version of the EC2Config service. For more information, see Installing the Latest Version of EC2Config.

  3. Install Microsoft hotfix KB2800213.

  4. Install Microsoft hotfix KB2922223.

  5. If you upgraded to Windows Server 2012 R2, we recommend that you upgrade the PV drivers to AWS PV drivers. For more information, see Windows Server 2012 R2.

  6. Re-enable anti-virus and anti-spyware software and firewalls.

Migration Process

Migrating involves capturing settings, configurations, and data and porting these to a newer operating system on separate hardware. After validation, the migrated system can be promoted to production. You can migrate instances by launching a new instance from an AMI of the new operating system. You can streamline the process further by using AWS CloudFormation and Amazon EC2 Systems Manager to automatically apply settings and configurations to the new system with little manual work.

To migrate your server

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose AMIs.

  3. Choose Owned by me, and then choose Public images.

  4. For Search, add the following filters and press Enter. Note that Search is case sensitive.

    • Owner : Amazon images

    • AMI Name : Windows_Server-2008

  5. Launch a new instance from an AMI.

  6. Log onto the new instance and install all updates.

  7. Perform application installation and configuration changes.

  8. Test the server.

  9. When validated, promote the server to production.

Troubleshooting an Upgrade

AWS provides upgrade support for issues or problems with the Upgrade Helper Service, an AWS utility that helps you perform in-place upgrades involving Citrix PV drivers.

After the upgrade, the instance might temporarily experience higher than average CPU utilization while the .NET Runtime Optimization service optimizes the .NET framework. This is expected behavior.

If the instance has not passed both status checks after several hours, check the following.

  • If you upgraded to Windows Server 2008 and both status checks fail after several hours, the upgrade may have failed and be presenting a prompt to Click OK to confirm rolling back. Because the console is not accessible at this state, there is no way to click the button. To get around this, perform a reboot via the EC2 console or API. The reboot will take ten minutes or more to initiate. The instance might become available after 25 minutes.

  • Remove applications or server roles from the server and try again.

If the instance does not pass both status checks after removing applications or server roles from the server, do the following.

  • Stop the instance and attach the root volume to another instance. For more information, see the description of how to stop and attach the root volume to another instance in "Waiting for the metadata service",.

  • Analyze Windows Setup log files and event logs for failures.

For other issues or problems with an operating system upgrade or migration, we recommend reviewing the articles listed in Before You Begin an In-Place Upgrade.