从T2.medium升级到T3.medium

sud*_*dip 6 upgrade amazon-ec2 amazon-web-services

我的实例(Amazon AMI)有两个网络接口:eth0和eth1。我想从T2.Medium升级到T3.Medium。

但是,这给了我一个错误:

't3.medium'实例类型需要使用弹性网络适配器(ENA)进行增强的联网。确保您的实例已启用ENA。

因此,我发现运行命令 “ aws ec2 modify-instance-attribute --instance-id instance_id --ena-support”将启用ENA支持。

现在,它将启用对eth0和eth1的ENA支持吗?

我发现了一个脚本https://github.com/awslabs/aws-support-tools/tree/master/EC2/C5M5InstanceChecks检查先决条件。

它修改了““ / etc / fstab””,以每个分区的设备名称替换为其UUID。这是安全的操作吗?

我是否需要安装NVMe模块才能从T2升级到T3?

如果出现任何问题(例如无法启动或状态检查失败等),我可以可靠地切换回备份和t2吗?

谢谢。

sud*_*dip 5

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
Run Code Online (Sandbox Code Playgroud)

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.

以下链接非常有帮助:https ://forums.aws.amazon.com/thread.jspa ? threadID = 290005(njohari-aws答案)。

  • 创建一个支持ena的新ami可能是个好主意 (2认同)
  • https://github.com/awslabs/aws-support-tools/tree/master/EC2/NitroInstanceChecks (2认同)