AWS introduced 5th-generation EC2 instances in selected regions. These instances live on Nitro which is KVM based. These c5 and m5 instances are faster yet cheaper. The switch however cannot be done by a simple instance type change.

The following instructions apply to EL7

First, block devices switched to NVMe and their names changed to /dev/nvme0n1p1. If the AMI contains traditional block device names in /etc/fstab, they will be stuck at boot up. Use UUID or disk label solves the problem. Second, you may need ENA support enabled. Some of the 5th-generation instances uses 10Gbe NIC as the only option. Here is how I recently updated a CentOS AMI:

– launched a c4.large instance from existing AMI
– update kernel to the latest (yum update kernel)
– disable consistent network device naming (add biosdevname=0 net.ifnames=0 to /etc/sysconfig/grub)
– update grub config and regenerate initramfs images

– stop instance
– enable ENA with awscli and start instances

ENA support is included on kernel 3.2 and later, so there is no need to install it on EL7

For EL6, the ena driver needs to be installed manually. Use DKMS to install the module, so the driver is automatically installed during future kernel upgrade.



Leave a Comment