- Newest
- Most votes
- Most comments
You are correct in understanding that you need to have both the ENA (Elastic Network Adapter) driver and the NVMe (Non-Volatile Memory Express) driver support in your raw disk to use Nitro-based instances. However, you don't need to alter the way you build your raw disk or use NVMe emulation during the build process.
The actual raw disk image content is indeed independent of the target storage controllers. When you import your raw disk as a snapshot and create an AMI, AWS handles the necessary adjustments to make it compatible with Nitro-based instances.
That being said, there are a few important considerations:
-
Ensure that your raw disk image includes the latest AWS NVMe driver. This driver is crucial for optimal performance and capabilities when the volumes are exposed as NVMe block devices on Nitro-based instances.
-
Make sure the ENA driver is installed and up-to-date in your raw disk image. This is necessary for enhanced networking on Nitro instances.
-
If you're using Linux, it's recommended to use UUID/Label instead of device names for mounting file systems in /etc/fstab. This is because the device names specified in the block device mapping are renamed using NVMe device names (/dev/nvme[0-26]n1) on Nitro instances.
-
For Windows images, you may need to update EC2Config and EC2Launch utilities to ensure full functionality on the Nitro system.
-
When creating the AMI from your imported snapshot, make sure to set the correct virtualization type (usually HVM for Nitro instances) and the appropriate boot mode (UEFI if required).
By following these guidelines, your raw disk image should be compatible with both Nitro and non-Nitro instances without needing to change your build process or use NVMe emulation during the build.
Sources
Amazon EBS volumes and NVMe - Amazon EBS
Compatibility for changing the instance type - Amazon Elastic Compute Cloud
Migrate an EC2 Windows instance to a Nitro-based instance type - Amazon Elastic Compute Cloud
Import and export virtual machine images with Image Builder - EC2 Image Builder
answered a year ago
Relevant content
asked 4 years ago

The answer is correct, I did not modify my process to create the disk/snapshot. I used the register-image cli with ena-support parameter to ensure nitro was supported. I was able to install the image on an M5 and I could also install on a T2. So worked out great.