15

My instance (Amazon AMI) has two network interfaces : eth0 and eth1. I would like to upgrade from T2.Medium to T3.Medium.

But, it gives me an error saying :

Enhanced networking with the Elastic Network Adapter (ENA) is required for the 't3.medium' instance type. Ensure that your instance is enabled for ENA.

So, I found out that running the command "aws ec2 modify-instance-attribute --instance-id instance_id --ena-support" will enable ENA support.

Now, would it enable ENA support for both eth0 and eth1 ?

I have found a script https://github.com/awslabs/aws-support-tools/tree/master/EC2/C5M5InstanceChecks that checks pre-requisites.

It modified the "“/etc/fstab” to replace the device name of each partition with its UUID. Is it a safe operation ?

Do I need to install NVMe module to upgrade from T2 to T3 ?

If anything goes wrong (like I cant boot or status check failed etc), can I switch back to my backup and t2 reliably ?

Thank You.

M Reza
  • 18,350
  • 14
  • 66
  • 71
sudip
  • 2,781
  • 1
  • 29
  • 41

1 Answers1

13

I have successfully upgraded my t2.medium instance to t3.medium. I am listing the steps here so that it can help others too.

My AMI is Amazon Linux AMI (https://aws.amazon.com/amazon-linux-ami/2018.03-release-notes/). It has HVM virtualization and a EBS root volume. First step is to take a backup of the root volume (or, creating a image from the existing instance). Then I run "sudo yum update" and restarted the instance to see if everything is good.

The ami had ENA and NVMe modules already installed. "/etc/fstab" already had uuid format enabled.

To check ENA : modinfo ena
To check NVMe : modinfo nvme
To check whether ena driver is loaded on eth0 : ethtool -i eth0 and on eth1: ethtool -i eth1

Running the script https://github.com/awslabs/aws-support-tools/tree/master/EC2/C5M5InstanceChecks returned success.

After that I installed AWS CLI (https://github.com/aws/aws-cli) and configured the cli with AWS access key, secret key and region.

Then I run ec2 describe-instances --instance-ids INSTANCE_ID --query "Reservations[].Instances[].EnaSupport"

It returned a response "[]" (According to the documentation the command supposed to return false).

Then I stopped the instance and run the following command from AWS cli : ec2 modify-instance-attribute --instance-id INSTANCE_ID --ena-support

I started the server and ethtool -i eth0 and ethtool -i eth1 output showed that both my interfaces has "ena" driver now.

Then I stopped the instance and change the instance type to t3.medium.

The below link has been very helpful : https://forums.aws.amazon.com/thread.jspa?threadID=290005 (njohari-aws answer).

sudip
  • 2,781
  • 1
  • 29
  • 41
  • https://github.com/awslabs/aws-support-tools/tree/master/EC2/C5M5InstanceChecks does not exist anymore. Do you have an alternative link? – Bruno Nov 23 '20 at 19:20
  • @Bruno No. If you can find it, please add it here. Thanks. – sudip Nov 23 '20 at 19:38
  • 3
    https://github.com/awslabs/aws-support-tools/tree/master/EC2/NitroInstanceChecks – Bruno Nov 24 '20 at 04:18