Menu
Amazon Elastic Compute Cloud
User Guide for Microsoft Windows Instances

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

This topic describes two methods for upgrading an older version of a Windows Server EC2 instance 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.

Note

This topic includes information about a known issue during the upgrade process where Setup removes portions of the para-virtual (PV) drivers that enable a user to connect to the instance by using Remote Desktop.

In-Place Upgrade

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

Important

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. For all other issues or problems with an operating system upgrade or migration we recommend reviewing the TechNet articles listed in the Before You Begin section of this document.

This section includes the following information:

Before You Begin

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 Expanding the Storage Space 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 before you upgrade.

Upgrade instances running AWS PV drivers

Use the following procedure to upgrade EC2 Windows Server 2012 RTM or R2 instances. These versions of EC2 Windows run AWS PV drivers and do not require that you run the AWS Upgrade Helper Service during your in-place upgrade.

To upgrade an EC2 Windows Server instance running AWS PV drivers

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

  2. Choose Instances and then locate the Windows Server EC2 instance that you want to upgrade. Make a note of the Instance ID and the Availability Zone. You will specify this information when you create and attach the Windows installation media volume later in this procedure.

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

    1. In the EC2 console, choose Snapshots.

    2. Choose Owned by me and then choose Public Snapshots.

      Choosing a public snapshot
    3. Choose the Search field, add then choose Owner from the Resource Attributes list.

      Filtering on the Owner attribute
    4. Choose Amazon images.

    5. Choose the Search field, add then choose Description from the Resource Attributes list.

      Filtering on the Description attribute
    6. Type Windows and press Enter.

    7. Select the snapshot that matches your system architecture. For example, select Windows 2012 R2 Installation Media if your instances is currently run Windows Server 2012 RTM.

    8. From the context menu (right-click) choose Create Volume.

    9. 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 the volume in the list, and then from the context menu (right-click) choose 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 earlier in this procedure.

  8. In the Sources folder, run Setup.exe.

  9. On the Select the operating system you want to install page, select the Full Installation SKU that matches your Windows Server instance, and choose Next.

  10. On the Which type of installation do you want? page, choose Upgrade.

  11. Complete the Setup wizard.

Windows Server Setup will then 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 as long as several hours. The instance will fail status check 1 of 2 in the EC2 console during the upgrade process. When the upgrade completes, both status checks pass. You can check the system log for console outputs or refer to Amazon CloudWatch monitors for disk and CPU activity to determine if the upgrade is not progressing.

If the instance has not passed both status checks after several hours see Troubleshooting the Upgrade in this topic.

Upgrade instance running Citrix PV drivers

This section describes how to upgrade EC2 Windows Server instances running 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.

About the Upgrade Helper Service

You must run UpgradeHelperService.exe 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 UpgradeHelperService.exe 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 UpgradeHelperService.exe on the system after the upgrade it performs the following tasks:

  • Enables the RealTimeIsUniversal registry key for correct time synchronization in Amazon Elastic Compute Cloud (Amazon EC2).

  • 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

  • Once complete, automatically removes the UpgradeHelperService Windows service.

Performing the Upgrade on Instances Running Citrix PV Drivers

This procedure describes how to attach the installation media volume to your EC2 instance and how to upgrade the instance by using UpgradeHelperService.exe.

To upgrade an EC2 Windows Server instance running Citrix PV drivers

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

  2. Choose Instances and then locate the Windows Server EC2 instance that you want to upgrade. Make a note of the Instance ID and the Availability Zone. You will specify this information when you create and attach the Windows installation media volume later in this procedure.

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

    1. In the EC2 console, choose Snapshots.

    2. Choose Owned by me and then choose Public Snapshots.

      Choosing a public snapshot
    3. Choose the Search field, add then choose Owner from the Resource Attributes list.

      Filtering on the Owner attribute
    4. Choose Amazon images.

    5. Choose the Search field, add then choose Description from the Resource Attributes list.

      Filtering on the Description attribute
    6. Type Windows and press Enter.

    7. Select the snapshot that matches your system architecture. For example, select Windows 2008 64-bit Installation Media if your Windows Server 2003 instance is 64-bit.

    8. From the context menu (right-click) choose Create Volume.

    9. 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 the volume in the list, and then from the context menu (right-click) choose 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 new folder called temp. This folder must be available in the same location after the upgrade. Creating the temp 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 UpgradeHelperService.exe from c:\temp and review the Log.txt file in c:\temp for any warnings.

  10. Use Microsoft Knowledge Base article 950376 to uninstall PowerShell from a Windows 2003 instance, or perform the following unsupported steps to bypass the Windows Upgrade check:

    1. In Windows Explorer, choose WINDOWS, and then choose System32.

    2. Rename the WindowsPowerShell folder to oldWindowsPowerShell. For 64-bit instances, you must also rename the WindowsPowerShell folder in the WINDOWS > SysWow64 folder.

  11. Begin the upgrade by using Windows Explorer to open the Installation Media volume you attached to the instance earlier in this procedure.

  12. In the Sources folder, run Setup.exe.

  13. On the Select the operating system you want to install page, select the Full Installation SKU that matches your Windows Server instance, and choose Next.

  14. On the Which type of installation do you want? page, choose Upgrade.

  15. Complete the Setup wizard.

Windows Server Setup will then 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 as long as several hours. The instance will fail status check 1 of 2 in the EC2 console during the upgrade process. When the upgrade completes, both status checks pass. You can check the system log for console outputs or refer to Amazon CloudWatch monitors for disk and CPU activity to determine if the upgrade is not progressing.

If the instance has not passed both status checks after several hours see Troubleshooting the Upgrade in this topic.

Post Upgrade Tasks

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

    Note

    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.

  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 when they are available. For more information, see Important information about Amazon EC2 instances running Windows Server 2012 R2.

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

Migration

Migrating involves capturing settings, configurations, and data and porting these to a newer operating system on separate hardware. Once validated, the migrated system can be promoted to production. You can migrate EC2 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 Simple 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, click AMIs.

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

  4. In the Search field, add the following filters and press Enter.

    1. Owner : Amazon images

    2. AMI Name : Windows_Server-2008

      Note

      The Search field is case sensitive.

  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

This section can help you locate and diagnose errors or failures.

  • If the instance has not passed both status checks after several hours do 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.