Introduction
When migrating AWS EC2 instances between different instance families, you may encounter status check failures, especially with older Windows instances. This blog post details a recent issue I faced when moving a Windows Server 2016 instance from the M5 to R6i instance family and provides a comprehensive solution to resolve these status check failures.
The Problem
After changing the instance type from the M5 instance family to the R6i instance family, my Windows Server 2016 EC2 instance began failing status checks. This prevented the instance from properly booting and becoming accessible.
Root Cause Analysis
The primary cause of this issue was outdated drivers that weren’t compatible with the newer R6i instance family. Specifically, three critical drivers needed updating:
- NVMe drivers (for storage)
- PV drivers (for paravirtualization)
- ENA drivers (for enhanced networking)
Step-by-Step Solution
Step 1: Check the Current NVMe Driver Version
First, I needed to verify the installed NVMe driver version. To do this:
- Connect to your EC2 instance
- Open PowerShell as Administrator
- Run the following command:
Get-WmiObject win32_PnPSignedDriver | Select-Object DeviceName, Manufacturer, DriverVersion | Where-Object {$_.Manufacturer -contains "Amazon Inc."}
The output showed:
DeviceName Manufacturer DriverVersion ---------- ------------ ------------- AWS NVMe Elastic Block Storage Adapter Amazon Inc. 1.2.0.249 AWS NVMe Elastic Block Storage Adapter Amazon Inc. 1.2.0.249
This confirmed I was running an outdated NVMe driver (version 1.2.0.249 from June 13, 2018), while the latest version was 1.6.0.
Step 2: Update the NVMe Driver
To update the NVMe driver to the latest version:
- Download the latest NVMe driver package from AWS
- Extract the downloaded package
- Run the setup file as Administrator
- Follow the on-screen instructions to complete the installation
- Restart the instance when prompted
For detailed instructions, refer to the AWS NVMe driver documentation.
Step 3: Update the PV Drivers
Next, I needed to update the PV drivers:
- Open Control Panel
- Navigate to “Programs and Features”
- Check the installed AWS PV driver version (found 8.2.3 was installed)
- Download the latest PV driver package (version 8.6.0)
- Run the installer as Administrator
- Follow the on-screen instructions
- Restart the instance when prompted
For detailed instructions, refer to the AWS PV driver documentation.
Step 4: Update the ENA Drivers
Finally, I updated the ENA drivers for enhanced networking:
- Download the latest ENA driver package (version 2.10.0)
- Extract the downloaded package
- Run the setup file as Administrator
- Follow the on-screen instructions
- Restart the instance when prompted
For detailed instructions, refer to the AWS ENA driver documentation.
Step 5: Change the Instance Type Again
After updating all three drivers:
- Stop the EC2 instance
- Change the instance type back to the R6i family
- Start the instance
The instance should now pass all status checks successfully.
Verification
To verify that all drivers are updated correctly, run the PowerShell command again:
Get-WmiObject win32_PnPSignedDriver | Select-Object DeviceName, Manufacturer, DriverVersion | Where-Object {$_.Manufacturer -contains "Amazon Inc."}
Confirm that the driver versions match the latest versions you installed.
Conclusion
When migrating EC2 instances between different instance families, particularly from older to newer generations, it’s essential to ensure that all drivers are up-to-date. This is especially critical for Windows instances, where outdated drivers can cause status check failures.
By following this guide, you can successfully update the NVMe, PV, and ENA drivers on your Windows EC2 instances, enabling smooth transitions between instance families.