Issue
- After installing or updating CloudLinux OS, the CloudLinux Manager Dashboard displays the message:
Reboot your system to update the kernel.
- Additionally, the LVE kernel module (
kmodlve) is not loaded.
# lsmod | grep kmod
#
# modprobe kmodlve
modprobe: ERROR: could not insert 'kmodlve': Cannot allocate memory
Environment
-
CloudLinux OS 9
-
cPanel
-
Package:
kmod-lve
Solution
1. Verify GRUB configuration
Ensure that /etc/default/grub contains the following parameters:
GRUB_DEFAULT=saved
GRUB_ENABLE_BLSCFG=true
2. Update the LVE kernel module
Update the kmod-lve package to the latest version:
yum update kmod-lve
Then, remove any older versions if present:
rpm -qa | grep kmod-lve
yum remove kmod-lve-<old_version>.x86_64
-
- Example:
kmod-lve-2.1-20.el9.x86_64 # Old version
kmod-lve-2.1-29.el9.x86_64 # Latest version
3. Reinstall the kernel
If the issue persists, reinstall the kernel:
yum reinstall kernel
Then, check the module:
modprobe kmodlve
lsmod | grep kmod
4. Check Secure Boot status
Run:
mokutil --sb-state
- If the output shows `SecureBoot enabled`, disable it to allow the LVE module to load.
- You can disable validation from the command line:
/usr/bin/mokutil --disable-validation
Note: The preferred method to disable Secure Boot depends on your hosting provider and server hardware. It usually requires accessing the BIOS. For reference, see Disable Secure Boot.
5. Check kernel module files
- If
mokutilreturns:
# mokutil --sb-state
EFI variables are not supported on this system
verify that the module files exist:
cd /lib/modules/
find ./ -name kmodlve*
Example output:
./5.14.0-427.13.1.el9_4.x86_64/extra/lve-2.1-27.el9/kmodlve.ko
./5.14.0-427.16.1.el9_4.x86_64/weak-updates/lve-2.1-27.el9/kmodlve.ko
- If the kernel supports the module, reboot the server:
reboot
Then check:
# lsmod | grep kmod
kmodlve 17657856 7
# modprobe kmodlve
#
6. Adjust cgroup and GRUB configuration
If the module still fails to load, follow this article:
LVE load fail: could not insert kmodlve – Cannot allocate memory
Modify /etc/default/grub by changing:
systemd.unified_cgroup_hierarchy=1
to
systemd.unified_cgroup_hierarchy=0
- If missing, add this variable at the end of the
GRUB_CMDLINE_LINUXline. - You can also try setting:
GRUB_ENABLE_BLSCFG=false
in /etc/default/grub.
7. Verify the default boot kernel
Check the GRUB environment file:
cat /boot/grub2/grubenv
- If the file shows the
saved_entry=0line,
# cat /boot/grub2/grubenv
# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
saved_entry=0 <<<<<<------
set the correct default boot kernel:
grubby --set-default=/boot/vmlinuz-5.14.0-427.16.1.el9_4.x86_64
- Then verify again that
/boot/grub2/grubenvcontains:
saved_entry=12e7e1b2639e457cb83822420a4944cc-5.14.0-427.16.1.el9_4.x86_64
- If you are using KernelCare, reapply the patches as described here:
insmod: Error ‘Unable to load kmod’ on KernelCare servers
Cause
The issue occurs due to one of the following:
-
The
kmod-lvepackage is outdated. -
The server is not rebooted after a kernel update.
-
Secure Boot is enabled, preventing the LVE module from loading.
-
Incorrect GRUB or cgroup configuration.
Useful links
- LVE load fail: could not insert kmodlve – Cannot allocate memory
- insmod: Error ‘Unable to load kmod’ on KernelCare servers
- Disable Secure Boot for Tenable Network Monitor High Performance Mode
Comments
0 comments
Please sign in to leave a comment.