Issue
CloudLinux 9.3 or 9.4, the follwoing message is on CloudLinux Manager Dashboard:
Reboot your system to update the kernel.
And kmodlve is not loaded:
# lsmod | grep kmod
# modprobe kmodlve
modprobe: ERROR: could not insert 'kmodlve': Cannot allocate memory
#
Environment
- CloudLinux 9
- cPanel
- kmod-lve
Solution
1- Check /etc/default/grub that contains:
GRUB_DEFAULT=saved
GRUB_ENABLE_BLSCFG=true
2- Update kmod-lve to the latest version
# yum update kmod-lve
And remove old versions:
# rpm -qa | grep kmod-lve
kmod-lve-2.1-20.el9.x86_64 <==== OLd kmod-lve
kmod-lve-2.1-29.el9.x86_64
# yum remove kmod-lve-2.1-20.el9.x86_64
3- In case the problem persists, reinstall the kernel:
# yum reinstall kernel
You need to check:
# modprobe kmodlve
# lsmod | grep kmod
4- If the issue persists, secure boot may be enabled. You can check with the following command:
# mokutil --sb-state
SecureBoot enabled
If enabled, please try disabling it. This should allow the LVE module to be loaded. For the specific method, you may check with your hosting provider, as there are several ways of disabling it.
At the moment, we're not aware of other methods to address the situation. The "Secure Boot" option prevents loading several third-party modules, and it's not easy to bypass (if possible). Disabling it typically involves disable the validation from command line:
# /usr/bin/mokutil --disable-validation
However, the most important steps are performed during the server's boot (accessing the BIOS). Every provider may have a different method depending on the specific hardware your server is running on, which is why is a bit difficult to provide exact steps to perform the operation. General guidelines are described here and can serve as reference:
Disable Secure Boot
But ultimately, it is advisable to consult with your hosting provider for exact steps.
5- If it does not help, or gives error:
# mokutil --sb-state
EFI variables are not supported on this system
#
Check if modules are in place:
# cd /lib/modules/
# find ./ -name kmodlve*
./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 kmodlve module:
./5.14.0-427.16.1.el9_4.x86_64/weak-updates/lve-2.1-27.el9/kmodlve.ko
So, Reboot the server would resolve the issue.
# lsmod | grep kmod
kmodlve 17657856 7
# modprobe kmodlve
#
Edit the file /etc/default/grub
:
Change systemd.unified_cgroup_hierarchy=1
to systemd.unified_cgroup_hierarchy=0
in the file. If the variable is missing, add it to the end of the "GRUB_CMDLINE_LINUX" line.
Also, you may try changing GRUB_ENABLE_BLSCFG
to false in /etc/default/grub
GRUB_ENABLE_BLSCFG=false
Check the file: /boot/grub2/grubenv
:
# cat /boot/grub2/grubenv
# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
saved_entry=0 <<<<<<------
Set default boot kernel:
# grubby --set-default=/boot/vmlinuz-5.14.0-427.16.1.el9_4.x86_64
Fixed the file to:
# cat /boot/grub2/grubenv
# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
saved_entry=12e7e1b2639e457cb83822420a4944cc-5.14.0-427.16.1.el9_4.x86_64 <<<<<<------
For KC, try to update the patches again as outlined by our article: insmod: Error 'Unable to load kmod' on KernelCare servers
Cause
Outdated kmod-lve. Or needs to reboot with the latest installed kernel if it support kmodlve.
Comments
0 comments
Please sign in to leave a comment.