因為原本的機器需要升級的關係,所以做了一點研究,希望可以幫助大家如果有舊的 EC@ 要從 T2 轉到 T3 Type 的時候可以快一點。
- 首先機器要是開機的狀態,這邊以 Ubuntu 為例子只要使用下圖指令執行完成即可This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
sudo apt-get update && sudo apt-get upgrade -y linux-aws
檢查一下是否成功This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters[ec2-user ~]$ modinfo ena filename: /lib/modules/4.14.33-59.37.amzn2.x86_64/kernel/drivers/amazon/net/ena/ena.ko version: 1.5.0g license: GPL description: Elastic Network Adapter (ENA) author: Amazon.com, Inc. or its affiliates srcversion: 692C7C68B8A9001CB3F31D0 alias: pci:v00001D0Fd0000EC21sv*sd*bc*sc*i* alias: pci:v00001D0Fd0000EC20sv*sd*bc*sc*i* alias: pci:v00001D0Fd00001EC2sv*sd*bc*sc*i* alias: pci:v00001D0Fd00000EC2sv*sd*bc*sc*i* depends: retpoline: Y intree: Y name: ena ...
如下圖就是 ENA 的模組還沒安裝This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersubuntu:~$ modinfo ena ERROR: modinfo: could not find module ena - 接下來就可以把 EC2 關機囉 ~
- 以上兩步驟都成功後就先用 AWS CLI 檢查 ENA support 是否有開啟,如果如下圖就是目前沒有 SupportThis file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
ubuntu:~$ aws ec2 describe-instances --instance-ids i-00000000000000000 --query "Reservations[].Instances[].EnaSupport" [] - 如果檢查沒有 Support 就使用 AWS CLI 開啟 ENA supportThis file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
ubuntu:~$ aws ec2 modify-instance-attribute --instance-id i-00000000000000000 --ena-support - 接下來就可以快樂的使用 T3 囉 ~
以上的內容其實只是用簡單的敘述說明如何讓機器支援 ENA,如果像要了解詳細的內容可以看官方文件: https://docs.aws.amazon.com/zh_tw/AWSEC2/latest/UserGuide/enhanced-networking-ena.html
《AWS CDK 完全學習手冊:打造雲端基礎架構程式碼 IaC》
第 12 屆 iT 邦幫忙鐵人賽 DevOps 組冠的《用 CDK 定 義 AWS 架構》
第 11 屆 iT 邦幫忙鐵人賽《LINE bot 好好玩 30 天玩轉 LINE API》
一個熱愛分享的雲端工程師!