How do I install the Elastic Network Adapter (ENA) module on SUSE-SLES-12-SP1, and get the ENA driver to reload into memory after my Amazon Elastic Compute Cloud (Amazon EC2) instance is rebooted?

There is a systemctl service called systemd-modules-load.service that is an early boot service. At boot-up, the systemd-modules-load service loads kernel modules based upon the static configuration.

For the ENA module to automatically load into memory upon boot-up, the ENA driver must be loaded into the kernel.

When loaded into the kernel, the systemd-modules-load service then automatically loads the ENA module into memory at boot-up.

Note: This is not an issue with the SUSE SLES 12 SP3 server as it supports the ENA module, and the ENA module will persist after a reboot.

Install the ENA driver

1.    Download the ENA module, and then install the prerequisites. Note that root access is required to perform the commands:

git clone
sudo su
zypper install make
zypper install gcc
zypper update

2.    Reboot the instance from the console, and then run uname to be sure that the kernel version was updated:

uname -r 

3.    Install the kernel headers and makefiles to build modules against the kernel package. Be sure to install kernel-devel packages with the same version of kernel as found in the output of uname in step 2.

sudo zypper install kernel-devel

4.    Change to the ena directory, and then compile and install the driver using the make command. This step creates the ena.ko file:

cd amzn-drivers/kernel/linux/ena/

5.    Load the ENA driver into the kernel using the insmod command, and validate that driver loaded using the lsmod command:

sudo insmod ena.ko
lsmod | grep ena

The following lines from grep ena show that the driver loaded:

Module                 Size    Used by                
ena                    xxxxx      0

If the driver was not loaded, the following line appears:

modinfo: ERROR: Module ena not found.

Set up the ENA driver to automatically load after a reboot

1.    Copy the ENA driver into the /lib/modules/ directory so that the driver automatically loads into memory after reboot:

sudo echo 'ena' >> /etc/modules-load.d/ena.conf
cp ena.ko /lib/modules/$(uname -r)/

2.    Run the depmod command to update module dependencies:  

sudo depmod

3.    Use root access to edit the /etc/modprobe.d/10-unsupported-modules.conf config file, and then replace "allow_unsupported_modules 0" with "allow_unsupported_modules 1".

4.    Restart the systemd-modules-load service:

sudo systemctl restart systemd-modules-load

When you reboot the instance, the ENA module automatically loads into the memory.

5.    Run the modinfo command on ENA. The module is loaded if you can view the ena.ko file:

modinfo ena

The following lines appear as output from the modinfo ena command: 

filename:       /lib/modules/3.12.74-60.64.40-default/ena.ko
version:        1.3.0g
license:        GPL
description:    Elastic Network Adapter (ENA)
author:, Inc. or its affiliates
srcversion:     8980FA8BD79EC1E5D04BE84
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*
vermagic:       3.12.74-60.64.40-default SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.

Published: 2018-09-27