Configure the Amazon Web Services drivers for RHEL, CentOS, Oracle Linux, and Suse Linux.
Procedure
If the source VM is Linux and not an Amazon EC2 instance, install the following Xen drivers on the source VM:
xen-blkfront
xen-netfront
Note: Installing the Xen drivers on the Linux guest VMs prior to replicating the VMs, enables them to be in place when the Amazon instances are created, started, and ready for you to access.
If converting to a Nitro instance type, then install the NVMe and ENA drivers on the source VMs. The following OS versions have the required NVMe and ENA drivers installed:
Red Hat Enterprise Linux 7.4 or later
CentOS 7.4.1708 or later
SUSE Linux Enterprise Server 12 SP2 or later
Check if the OS versions have the required NVMe and ENA drivers pre installed. Run the following command:
modinfo nvme
modinfo ena
If the drivers require an update, run the following command:
sudo yum update -y
For SUSE:
sudo zypper update -y
Reboot your instance to load the latest kernel version.
Once the drivers are installed, log on to the Linux VM as a root user. Go to the /boot folder:
cd /boot
Perform a backup of the .img file for the kernel.
Open the editor to edit the dracut.conf configuration file:
vi /etc/dracut.conf
Add the nvme-core and nvme module names to the "add_drivers" line with spaces separating each module.
For example, when both xen and nitro drivers are installed:
add_drivers+="xen-blkfront xen-netfront nvme-core nvme"
Return to the /boot folder:
cd /boot
Recut the initramfs:
dracut -f -v
Run the following command to verify if the drivers are loading successfully:
lsinitrd | grep -i -e nvme -e ena
Sample output:
[root@oracle-3 ~]# lsinitrd | grep -i -e nvme -e ena
drwxr-xr-x 3 root root 0 Apr 12 12:49 usr/lib/modules/5.4.17-2136.305.5.5.el7uek.x86_64/kernel/drivers/nvme
drwxr-xr-x 2 root root 0 Apr 12 12:49 usr/lib/modules/5.4.17-2136.305.5.5.el7uek.x86_64/kernel/drivers/nvme/host
-rw-r--r-- 1 root root 59980 Apr 6 02:42 usr/lib/modules/5.4.17-2136.305.5.5.el7uek.x86_64/kernel/drivers/nvme/host/nvme-core.ko.xz
-rw-r--r-- 1 root root 35968 Apr 6 02:42 usr/lib/modules/5.4.17-2136.305.5.5.el7uek.x86_64/kernel/drivers/nvme/host/nvme.ko.xz