Upgrading from T2.medium to T3.medium

时间:2019-01-18 18:59:55

标签: amazon-web-services amazon-ec2 upgrade

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.

1 个答案:

答案 0 :(得分:0)

我已成功将我的t2.medium实例升级到t3.medium。我在这里列出了步骤,以便它也可以帮助其他人。

我的AMI是Amazon Linux AMI(https://aws.amazon.com/amazon-linux-ami/2018.03-release-notes/)。它具有HVM虚拟化和EBS根卷。第一步是对根卷进行备份(或从现有实例创建映像)。然后,我运行“ sudo yum update”并重新启动实例以查看一切是否正常。

ami已安装ENA和NVMe模块。 “ / etc / fstab”已启用uuid格式。

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

运行脚本 https://github.com/awslabs/aws-support-tools/tree/master/EC2/C5M5InstanceChecks 返回成功。

此后,我安装了AWS CLI( https://github.com/aws/aws-cli ),并为cli配置了AWS访问密钥,私有密钥和区域。

然后我跑 ec2 describe-instances --instance-ids INSTANCE_ID --query“ Reservations []。Instances []。EnaSupport”

它返回了响应“ []”(根据文档,该命令应该返回false)。

然后,我停止了实例并从AWS cli运行以下命令: ec2 Modify-instance-attribute --instance-id INSTANCE_ID --ena-support

我启动了服务器,并且ethtool -i eth0和ethtool -i eth1的输出表明我的两个接口现在都具有“ ena”驱动程序。

然后我停止了实例并将实例类型更改为t3.medium。

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