Migrate to latest generation instance types - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Migrate to latest generation instance types

The Amazon Windows AMIs are configured with the default settings used by the Microsoft installation media, with some customizations. The customizations include drivers and configurations that support the latest generation instance types, which are instances built on the Amazon Nitro System, such as an M5 or C5.

When migrating to Nitro-based instances, including bare metal instances, we recommend that you follow the steps in this topic in the following cases:

  • If you are launching instances from custom Windows AMIs

  • If you are launching instances from Windows AMIs provided by Amazon that were created before August 2018

Note

The following migration procedures can be performed on Windows Server version 2008 R2 and later. To migrate Linux instances to the latest generation instance types, see Change the instance type.

Note

Alternatively, you can use the AWSSupport-UpgradeWindowsAWSDrivers automation document to automate the procedures described in Part 1, Part 2, and Part 3. If you choose to use the automated procedure, see (Alternative) Upgrade the Amazon PV, ENA, and NVMe drivers using Amazon Systems Manager, and then continue with Part 4 and Part 5.

Before you begin

This procedure assumes that you are currently running on a previous generation Xen-based instance type, such as an M4 or C4, and you are migrating to an instance built on the Amazon Nitro System.

You must use PowerShell version 3.0 or later to successfully perform the upgrade.

Note

When migrating to the latest generation instances, the static IP or custom DNS network settings on the existing ENI may be lost as the instance will default to a new Enhanced Networking Adapter device.

Before following the steps in this procedure, we recommend that you create a backup of the instance. From the EC2 console, choose the instance that requires the migration, open the context (right-click) menu, and choose Instance State, Stop.

Warning

When you stop an instance, the data on any instance store volumes is erased. To preserve data on instance store volumes, ensure that you back up the data to persistent storage.

Open the context (right-click) menu for the instance in the EC2 console, choose Image, and then choose Create Image.

Note

Parts 4 and 5 of these instructions can be completed after you migrate or change the instance type to the latest generation. However, we recommend that you complete them before you migrate if you are migrating specifically to an bare metal instance type.

Part 1: Install and upgrade Amazon PV drivers

Though Amazon PV drivers are not used in the Nitro system, you should still upgrade them if you are on previous versions of either Citrix PV or Amazon PV. The latest Amazon PV drivers resolve bugs in previous versions of the drivers that may appear while you are on a Nitro system, or if you need to migrate back to a Xen-based instance. As a best practice, we recommend always updating to the latest drivers for Windows instances on Amazon.

Use the following procedure to perform an in-place upgrade of Amazon PV drivers, or to upgrade from Citrix PV drivers to Amazon PV drivers on Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, or Windows Server 2019. For more information, see Upgrade PV drivers on Windows instances.

To upgrade a Domain Controller, see Upgrade a domain controller (Amazon PV upgrade).

To perform an upgrade of or to Amazon PV drivers
  1. Connect to the instance using Remote Desktop and prepare the instance for upgrade. Take all non-system disks offline before you perform the upgrade. If you are performing an in-place update of Amazon PV drivers, this step is not required. Set non-essential services to Manual start-up in the Services console.

  2. Download the latest driver package to the instance.

  3. Extract the contents of the folder and run AWSPVDriverSetup.msi.

After running the MSI, the instance automatically reboots and upgrades the driver. The instance may not be available for up to 15 minutes.

After the upgrade is complete and the instance passes both health checks in the Amazon EC2 console, connect to the instance using Remote Desktop and verify that the new driver was installed. In Device Manager, under Storage Controllers, locate Amazon PV Storage Host Adapter. Verify that the driver version is the same as the latest version listed in the Driver Version History table. For more information, see Amazon PV driver package history.

Part 2: Install and upgrade ENA

Upgrade to the latest Elastic Network Adapter driver to ensure that all network features are supported. If you launched your instance and it does not have enhanced networking already enabled, you must download and install the required network adapter driver on your instance. Then, set the enaSupport instance attribute to activate enhanced networking. You can only enable this attribute on supported instance types and only if the ENA driver is installed. For more information, see Enable enhanced networking with the Elastic Network Adapter (ENA) on Windows instances.

  1. Downloadthe latest driver to the instance.

  2. Extract the zip archive.

  3. Install the driver by running the install.ps1 PowerShell script from the extracted folder.

    Note

    To avoid installation errors, run the install.ps1 script as an administrator.

  4. Check if your AMI has enaSupport activated. If not, continue by following the documentation at Enable enhanced networking with the Elastic Network Adapter (ENA) on Windows instances.

Part 3: Upgrade Amazon NVMe drivers

Amazon NVMe drivers are used to interact with Amazon EBS and SSD instance store volumes that are exposed as NVMe block devices in the Nitro system for better performance.

Important

The following instructions are modified specifically for when you install or upgrade Amazon NVMe on a previous generation instance with the intention to migrate the instance to the latest generation instance type.

  1. Downloadthe latest driver package to the instance.

  2. Extract the zip archive.

  3. Install the driver by running dpinst.exe.

  4. Open a PowerShell session and run the following command:

    PS C:\> start rundll32.exe sppnp.dll,Sysprep_Generalize_Pnp -wait
    Note

    To apply the command, you must run the PowerShell session as an administrator. PowerShell (x86) versions will result in an error.

    This command only runs sysprep on the device drivers. It does not run the full sysprep preparation.

  5. For Windows Server 2008 R2 and Windows Server 2012, shut down the instance, change the instance type to a latest generation instance and start it, then proceed to Part 4. If you start the instance again on a previous generation instance type before migrating to a latest generation instance type, it will not boot. For other supported Windows AMIs, you can change the instance type anytime after the device sysprep.

Part 4: Update EC2Config and EC2Launch

For Windows instances, the latest EC2Config and EC2Launch utilities provide additional functionality and information when running on the Nitro system, including on EC2 Bare Metal. By default, the EC2Config service is included in AMIs prior to Windows Server 2016. EC2Launch replaces EC2Config on Windows Server 2016 and later AMIs.

When the EC2Config and EC2Launch services are updated, new Windows AMIs from Amazon include the latest version of the service. However, you must update your own Windows AMIs and instances with the latest version of EC2Config and EC2Launch.

To install or update EC2Config
  1. Download and unzip theEC2Config Installer.

  2. Run EC2Install.exe. For a complete list of options, run EC2Install with the /? option. By default, setup displays prompts. To run the command with no prompts, use the /quiet option.

For more information, see Install the latest version of EC2Config.

To install or update EC2Launch
  1. If you have already installed and configured EC2Launch on an instance, make a backup of the EC2Launch configuration file. The installation process does not preserve changes in this file. By default, the file is located in the C:\ProgramData\Amazon\EC2-Windows\Launch\Config directory.

  2. Download EC2-Windows-Launch.zip to a directory on the instance.

  3. Download install.ps1 to the same directory where you downloaded EC2-Windows-Launch.zip.

    Download install.ps1 to the same directory where you downloaded EC2-Windows-Launch.zip.

  4. Run install.ps1.

    Note

    To avoid installation errors, run the install.ps1 script as an administrator.

  5. If you made a backup of the EC2Launch configuration file, copy it to the C:\ProgramData\Amazon\EC2-Windows\Launch\Config directory.

For more information, see Configure a Windows instance using EC2Launch.

Part 5: Install the serial port driver for bare metal instances

The i3.metal instance type uses a PCI-based serial device rather than an I/O port-based serial device. The latest Windows AMIs automatically use the PCI-based serial device and have the serial port driver installed. If you are not using an instance launched from an Amazon-provided Windows AMI dated 2018.04.11 or later, you must install the Serial Port Driver to enable the serial device for EC2 features such as Password Generation and Console Output. The latest EC2Config and EC2Launch utilities also support i3.metal and provide additional functionality. Follow the steps in Part 4, if you have not yet done so.

To install the serial port driver
  1. Downloadthe serial driver package to the instance.

  2. Extract the contents of the folder, open the context (right-click) menu for aws_ser.INF, and choose install.

  3. Choose Okay.

Part 6: Update power management settings

The following update to power management settings sets displays to never turn off, which allows for graceful OS shutdowns on the Nitro system. All Windows AMIs provided by Amazon as of 2018.11.28 already have this default configuration.

  1. Open a command prompt or PowerShell session.

  2. Run the following commands:

    powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0 powercfg /setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0 powercfg /setacvalueindex a1841308-3541-4fab-bc81-f71556f20b4a 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0

Part 7: Update Intel chipset drivers for new instance types

The u-6tb1.metal, u-9tb1.metal, and u-12tb1.metal instance types use hardware that requires chipset drivers that were not previously installed on Windows AMIs. If you are not using an instance launched from an Amazon-provided Windows AMI dated 2018.11.19 or later, you must install the drivers using the Intel Chipset INF Utility.

To install the chipset drivers
  1. Download the chipset utility to the instance.

  2. Extract the files.

  3. Run SetupChipset.exe.

  4. Accept the Intel software license agreement and install the chipset drivers.

  5. Reboot the instance.

(Alternative) Upgrade the Amazon PV, ENA, and NVMe drivers using Amazon Systems Manager

The AWSSupport-UpgradeWindowsAWSDrivers automation document automates the steps described in Part 1, Part 2, and Part 3. This method can also repair an instance where the driver upgrades have failed.

The AWSSupport-UpgradeWindowsAWSDrivers automation document upgrades or repairs storage and network Amazon drivers on the specified EC2 instance. The document attempts to install the latest versions of Amazon drivers online by calling the Amazon Systems Manager Agent (SSM Agent). If SSM Agent is not contactable, the document can perform an offline installation of the Amazon drivers if explicitly requested.

Note

This procedure will fail on a domain controller. To update drivers on a domain controller, see Upgrade a domain controller (Amazon PV upgrade).

To automatically upgrade the Amazon PV, ENA, and NVMe drivers using Amazon Systems Manager
  1. Open the Systems Manager console at https://console.amazonaws.cn/systems-manager.

  2. Choose Automation, Execute Automation.

  3. Search for and then select the AWSSupport-UpgradeWindowsAWSDrivers automation document, and then choose Execute automation.

  4. In the Input Parameters section, configure the following options:

    Instance ID

    Enter the unique ID of the instance to upgrade.

    AllowOffline

    (Optional) Choose one of the following options:

    • True — Choose this option to perform an offline installation. The instance is stopped and restarted during the upgrade process.

      Warning

      When you stop an instance, the data on any instance store volumes is erased. To preserve data on instance store volumes, ensure that you back up the data to persistent storage.

    • False — (Default) To perform an online installation, leave this option selected. The instance is restarted during the upgrade process.

    Important

    Online and offline upgrades create an AMI before attempting the upgrade operations. The AMI persists after the automation completes. Secure your access to the AMI, or delete it if it is no longer needed.

    SubnetId

    (Optional) Enter one of the following values:

    • SelectedInstanceSubnet — (Default) The upgrade process launches the helper instance into the same subnet as the instance that is to be upgraded. The subnet must allow communication to the Systems Manager endpoints (ssm.*).

    • CreateNewVPC — The upgrade process launches the helper instance into a new VPC. Use this option if you're not sure whether the target instance's subnet allows communication to the ssm.* endpoints. Your user must have permission to create a VPC.

    • A specific subnet ID — Specify the ID of a specific subnet into which to launch the helper instance. The subnet must be in the same Availability Zone as the instance that is to be upgraded, and it must allow communication with the ssm.* endpoints.

  5. Choose Execute.

  6. Allow the upgrade to complete. It could take up to 10 minutes to complete an online upgrade, and up to 25 minutes to complete an offline upgrade.