跳到主要內容

Import VMware VM to EC2 and support T3/M5/C5 ENA and Nitro Hypervisor

If you need to update an CentOS AMI to support AWS new generation instance type such as T3/T3a/C5/M5, Enhanced Networking Adaptor (ENA) or EBS Optimized disk. You will need to include drivers into initramfs, otherwise instance will boot fail.

The first thing is enable and install enhanced networking driver. You can refer document: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-ena.html#enhanced-networking-ena-linux

However, after rebuild initramfs via dracut and reboot, your instance might boot fail. Because of the new instance type supports ENA usually will also need to support EBS optimized volume. 

To troubleshoot I will suggest turn on console logging for your AMI first, so that you can troubleshoot via Get Instance Screenshot.
You need to update grub.cfg remove "rhgb quiet" and add "console=tty0" into /etc/default/grub and then install it via grub2-mkconfig -o /boot/grub2/grub.cfg

The second thing is to make initramfs support nvme drive (EBS Optimized disk).
You might check this document for general check points https://aws.amazon.com/premiumsupport/knowledge-center/boot-error-linux-m5-c5/
But there is still one thing missed. By default in CentOS 7, the dracut will auto detect and include necessary drivers into initramfs. But if you want your AMI to support both legacy and modern hypervisor such as Nitro, ENA, nvme. You need to built-in more generic drivers via dracut -f -v -N. The -N indicates dracut should disable host-only mode. 


By doing so, you can connect everything together and make your AMI support all HVM instance types in AWS.

BTW, before publish AMI, check this document to clean up your instance is also suggested:


留言

這個網誌中的熱門文章

3M UVA3000 更換濾芯紫外線燈匣

用了一年的3M濾水器提示說要換濾芯和燈匣 上 Youtube 想找教學的影片可是沒看到 UVA 3000 的 經過了一番奮戰後在這邊記錄一下 希望可以幫助後人,以免再重蹈覆轍。 Step 1. 拔掉插頭,把淨水器從牆上拿下來(基本上他是掛著而已),比較方便施工。 Step 2. 把前蓋往上拉,很容易就可以看到裡面的東西了。 Step 3. 打開後可以看到有兩個柱狀體,左邊的是燈匣,右邊的是濾芯。 Step 4. 這裡有個祕技是,這兩個柱狀體是可以往上 翻開30 度左右,這樣就可以有比較大的空間施工。 Step 4. 更換濾芯的話,柱狀體的瓶身上有箭頭,往左就是轉開,往右就是鎖緊。 Step 5. 更換燈匣的話比較麻煩一點,因為他底部是電源,頂部的右邊有個突出來的小方塊。對照淨水器上方連接處的話會有個弧形的凹槽,這是要 match 的.如果你只注意瓶身的箭頭往右鎖回去,就會造成漏水...Orz... Step 6. 把前蓋蓋回,機器掛回牆上,插插頭,開水,如果機器沒有告訴你有燈匣異常或漏水的話,就可以長按 C / UV  Reset 計數器了. 所以關鍵字就是,要往上翻 30 度,燈匣上面的小凸點要在右側,要看瓶身的 小箭頭. May it helps!

Getting start with Golang!

#Get started with Go https://talks.golang.org/2012/tutorial.slide#1 #Go for C programmers https://talks.golang.org/2012/goforc.slide#1 #Share Memory By Communicating https://blog.golang.org/share-memory-by-communicating #Codewalk: Share Memory By Communicating https://golang.org/doc/codewalk/sharemem/ #Go Concurrency Patterns: Timing out, moving on https://blog.golang.org/go-concurrency-patterns-timing-out-and #Go Language for Ops and Site Reliability Engineering https://talks.golang.org/2013/go-sreops.slide#1 #Go Dynamic Tools https://talks.golang.org/2015/dynamic-tools.slide#1 #Program your next server in Go https://talks.golang.org/2016/applicative.slide#1 #HTTP/2 Server Push https://blog.golang.org/h2push #gRPC Basics - Go http://www.grpc.io/docs/tutorials/basic/go.html #Go talks https://talks.golang.org/