To change instance type from t2.large to t3.large on AWS Linux 1, I got an error when I went to start the instance:
An error occurred (InvalidParameterCombination) when calling the StartInstances operation:
Enhanced networking with the Elastic Network Adapter (ENA) is required for the 't3.large' instance type. Ensure that your instance 'i-04ae4c6f7bfa96e51' is enabled for ENA.
Below are the steps I needed to follow.
SUMMARY STEPS
Pre-flight tests on t2
modinfo ena
-> see “ERROR: modinfo: could not find module ena”
ethtool -i eth0 | grep ^driver:
-> see “driver: vif”
Install the latest drivers
sudo yum -y update
sudo reboot
modinfo ena | grep ^description:
-> see “description: Elastic Network Adapter (ENA)”
Convert the instance to t3 to get ENA working
aws ec2 stop-instances --instance-ids {instanceid}
aws ec2 modify-instance-attribute --instance-id {instanceid} --instance-type t3.large
aws ec2 start-instances --instance-ids {instanceid}
ethtool -i eth0 | grep ^driver:
-> see “driver: ena”
DETAILED STEPS
Ensure the latest drivers are installed:
sudo yum -y update
IMPORTANT: You must reboot once the updates are done!
After the reboot, check to ensure the driver is loaded properly:
modinfo ena
DRIVER NOT INSTALLED
ERROR: modinfo: could not find module ena
DRIVER INSTALLED √
filename: /lib/modules/4.14.232-123.381.amzn1.x86_64/kernel/drivers/amazon/net/ena/ena.ko
version: 2.4.0g
license: GPL
description: Elastic Network Adapter (ENA)
author: Amazon.com, Inc. or its affiliates
srcversion: A0EBAF712C13F1157615C85
alias: pci:v00001D0Fd0000EC21sv*sd*bc*sc*i*
...
Enable ENA on the instance
aws ec2 modify-instance-attribute --instance-id {instanceid} --ena-support
Note: To disable ENA support, use this command:
aws ec2 modify-instance-attribute --instance-id {instanceid} --no-ena-support
Check that it is enabled
aws ec2 describe-instances --instance-ids {instanceid} --query "Reservations[].Instances[].EnaSupport"
You should see the string ‘True’ as the result when enabled, and nothing when disabled.
Stop the instance so you can change the instance type.
aws ec2 stop-instances --instance-ids {instanceid}
Change instance type from t2 to t3
aws ec2 modify-instance-attribute --instance-id {instanceid} --instance-type t3.large
Start the instance
aws ec2 start-instances --instance-ids {instanceid}
Check the interface
ethtool -i eth0
DRIVER NOT INSTALLED
driver: vif
version:
firmware-version:
bus-info: vif-0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
DRIVER INSTALLED √
driver: ena
version: 2.4.0g
firmware-version:
bus-info: 0000:00:05.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
NOTE: As per the AWS docs -> “The following AMIs include the required ENA module and have ENA support enabled: Amazon Linux 2”
For reference, here is the AWS docs page: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-ena.html
To learn more, visit the Tungsten Clustering Docs: https://docs.continuent.com/
Or reach out: https://www.continuent.com/about-us/contact-us
Comments
Add new comment