Challenge
There is an express version of this article here.The backup session of Veeam Agent for Linux fails with message
modprobe: FATAL: Module veeamsnap not found
or during the installation of veeamsnap package you see the following output:
Debian based systems:
Setting up veeamsnap (1.0.0.944) ... Loading new veeamsnap-1.0.0.944 DKMS files... First Installation: checking all kernels... Building only for 3.16.0-4-amd64 Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed. Setting up veeam (1.0.0.944) ...
Red Hat based systems:
Installing : veeamsnap-1.0.0.944-1.noarch 1/2 Loading new veeamsnap-1.0.0.944 DKMS files... Building for 2.6.32-642.11.1.el6.x86_64 Module build for kernel 2.6.32-642.11.1.el6.x86_64 was skipped since the kernel headers for this kernel does not seem to be installed. WARNING: Package not configured! See output! warning: %post(veeamsnap-1.0.0.944-1.noarch) scriptlet failed, exit status 1 Non-fatal POSTIN scriptlet failure in rpm package veeamsnap-1.0.0.944-1.noarch Installing : veeam-1.0.0.944-1.el6.x86_64 2/2 Starting veeamservice: [ OK ] Verifying : veeam-1.0.0.944-1.el6.x86_64 1/2 Verifying : veeamsnap-1.0.0.944-1.noarch 2/2 Installed: veeam.x86_64 0:1.0.0.944-1.el6 veeamsnap.noarch 0:1.0.0.944-1 Complete!
SUSE based systems:
Installing: veeamsnap-1.0.0.944-1.sles [error] Installation of veeamsnap-1.0.0.944-1.sles failed: (with --nodeps --force) Error: Subprocess failed. Error: RPM failed: Loading new veeamsnap-1.0.0.944 DKMS files... First Installation: checking all kernels... Building only for 3.0.101-63-default Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed. WARNING: Package not configured! See output! error: %post(veeamsnap-1.0.0.944-1.sles.noarch) scriptlet failed, exit status 1 Abort, retry, ignore? [a/r/i] (a): i Installing: veeam-1.0.0.944-1.sles11 [done] Additional rpm output: Starting veeamservice..done
Cause
These message are issued by DKMS and mean that veeamsnap module has not been compiled and installed.Here is a list of possible root causes:
- The kernel headers package is missing.
- The kernel headers version and the running kernel version mismatch.
- The kernel headers package for a wrong kernel type is installed.
- The kernel headers and the sources version mismatch.
- Unexpected DKMS or compiler issue.
- Loading 3rd party kernel modules is not allowed.
Solution
In order to build the veeamsnap module, the following criteria must be met:- The kernel headers version installed in the OS must match the running kernel version.
- The kernel sources version must match the kernel headers version.
- Loading 3rd party modules must be allowed.
Scenario 1: veeamsnap module has been compiled, but couldn't be loaded by some reason
1. Try to load module manually. Issue following command in terminal:
sudo modprobe veeamsnap
If it fails with message FATAL: Module veeamsnap not found, proceed to solution for Scenario 2.
2. If it fails on SUSE based Linux systems with following message: FATAL: module '/lib/modules/3.0.101-94-default/updates/veeamsnap.ko' is unsupported, use --allow-unsupported or set allow_unsupported_modules to 1 in
/etc/modprobe.d/unsupported-modules
You can manually load this module on permanent basis, use this command:
sudo modprobe --allow-unsupported veeamsnap
Or you can tune file /etc/modprobe.d/unsupported-modules accordingly.
Scenario 2: module has not been compiled
You will need to check the module status and rebuild it manually.
1. Check the status of veeamsnap module in the dkms tree:
sudo dkms status
The output should contain this line:
veeamsnap, 1.0.0.944: added
In the DKMS, "added" means that module source is included in the kernel tree.
2. If the veeamsnap module is not present in the dynamic modules list, you will need to reinstall the veeamsnap package or add the module manually to the kernel tree like this (otherwise this step can be skipped):
sudo dkms add -m veeamsnap -v 1.0.0.944 Creating symlink /var/lib/dkms/veeamsnap/1.0.0.944/source -> /usr/src/veeamsnap-1.0.0.944 DKMS: add completed.
Note the command result and check the module status again. If it is listed in the kernel tree, proceed with the next step.
3. Try to build the module manually by runing the following command:
sudo dkms build -m veeamsnap -v 1.0.0.944
If there is no proper kernel sources and headers installed you will see an output like this:
For Centos/RHEL/OEL/Fedora or SUSE based systems:
sudo dkms build -m veeamsnap -v 1.0.0.944 Error! echo Your kernel headers for kernel 3.10.0-514.6.2.el7.x86_64 cannot be found at /lib/modules/3.10.0-514.6.2.el7.x86_64/build or /lib/modules/3.10.0514.6.2.el7.x86_64/source.
For Debian based systems:
sudo dkms build -m veeamsnap -v 1.0.0.944 Error! Your kernel headers for kernel 3.16.0-4-amd64 cannot be found. Please install the linux-headers-3.16.0-4-amd64 package, or use the --kernelsourcedir option to tell DKMS where it's located
Go to the next step to define proper sources and headers to be installed.
4. To compile the veeamsnap module, kernel headers with the same version as the currently running kernel must be installed. You can check if the required version is available and install it using these commands:
Debian based systems:
sudo apt-get install linux-headers-$(uname -r) Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: linux-headers-3.16.0-4-amd64
For RHEL/OEL/Centos:
sudo yum install kernel-headers-$(uname -r) Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.awanti.com * epel: mirror.awanti.com * extras: mirror.awanti.com * updates: mirror.awanti.com Resolving Dependencies --> Running transaction check ---> Package kernel-headers.x86_64 0:3.10.0-514.6.2.el7 will be installed --> Finished Dependency Resolution
For Fedora:
sudo dnf install kernel-headers-$(uname -r) Last metadata expiration check: 0:07:52 ago on Tue Mar 7 05:13:32 2017. Dependencies resolved. ====================================================================================================================================== Package Arch Version Repository Si ====================================================================================================================================== Installing: kernel-headers x86_64 4.9.13-200.fc25 updates 1.1 Transaction Summary ====================================================================================================================================== Install 1 Package Total download size: 1.1 M Installed size: 3.8 M
For SUSE based systems
In SUSE based systems, there is no such logic in package naming, so you need to check the package versions manually. You need the kernel-source package to be installed, this way you can check all available versions of this package:
sudo zypper se -s --match-exact kernel-source Refreshing service 'nu_novell_com'. Loading repository data... Reading installed packages...
Check if you see a package matching your running kernel version and then try to install it. For example:
user@host:~> uname -r 3.0.101-65-default user@host:~> sudo zypper in kernel-source-3.0.101-65.1 Refreshing service 'nu_novell_com'. Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW packages are going to be installed: kernel-default-devel kernel-source 2 new packages to install. Overall download size: 95.4 MiB. After the operation, additional 429.9 MiB will be used. Continue? [y/n/? shows all options] (y): y Retrieving package kernel-source-3.0.101-65.1.x86_64 (1/2), 88.9 MiB (427.1 MiB unpacked) Retrieving: kernel-source-3.0.101-65.1.x86_64.rpm [done (1.4 MiB/s)] Retrieving package kernel-default-devel-3.0.101-65.1.x86_64 (2/2), 6.5 MiB (2.8 MiB unpacked) Retrieving: kernel-default-devel-3.0.101-65.1.x86_64.rpm [done] Installing: kernel-source-3.0.101-65.1 [done] Installing: kernel-default-devel-3.0.101-65.1 [done]
The version shown by uname can be different from that in in zypper. You can check the available versions of your kernel the same way as you did for kernel sources:
sudo zypper se -s --match-exact kernel-default Refreshing service 'nu_novell_com'. Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository --+----------------+------------+--------------+--------+------------------- i | kernel-default | package | 3.0.101-94.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-91.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-88.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-84.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-80.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-77.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-71.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-68.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-65.1 | x86_64 | SLES11-SP4-Updates v | kernel-default | package | 3.0.101-63.1 | x86_64 | SLES11-SP4-Pool | kernel-default | srcpackage | 3.0.101-94.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-91.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-88.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-84.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-80.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-77.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-71.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-68.1 | noarch | SLES11-SP4-Updates | kernel-default | srcpackage | 3.0.101-65.1 | noarch | SLES11-SP4-Updates
It this output we have a kernel-default package matching the uname -r version (except for the last digit which indicates the package release version).
5. After that you can rebuild the veeamsnap module again:
sudo dkms build -m veeamsnap -v 1.0.0.944 Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area.... make KERNELRELEASE=3.0.101-94-default -C /lib/modules/3.0.101-94-default/build M=/var/lib/dkms/veeamsnap/1.0.0.944/build........ cleaning build area.... DKMS: build completed.
Scenario 3: the module has been built, but for a different kernel
It is possible that this package version has been superseded by the distribution vendor or you do not have the correct repositories enabled.
1. Check the list of available repositories.
For Debian based:
sudo apt-cache policy Package files: 100 /var/lib/dpkg/status release a=now 500 http://repository.veeam.com/backup/linux/agent/dpkg/debian/x86_64/ noname/veeam amd64 Packages release o=veeam,a=stable,n=noname,l=veeam,c=veeam origin repository.veeam.com 500 http://ftp.us.debian.org/debian/ jessie-updates/main Translation-en 500 http://ftp.us.debian.org/debian/ jessie-updates/main i386 Packages release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=main origin ftp.us.debian.org 500 http://ftp.us.debian.org/debian/ jessie-updates/main amd64 Packages release o=Debian,a=stable-updates,n=jessie-updates,l=Debian,c=main origin ftp.us.debian.org 500 http://security.debian.org/ jessie/updates/main Translation-en 500 http://security.debian.org/ jessie/updates/main i386 Packages release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=main origin security.debian.org 500 http://security.debian.org/ jessie/updates/main amd64 Packages release v=8,o=Debian,a=stable,n=jessie,l=Debian-Security,c=main origin security.debian.org 500 http://ftp.us.debian.org/debian/ jessie/main Translation-en 500 http://ftp.us.debian.org/debian/ jessie/main i386 Packages release v=8.7,o=Debian,a=stable,n=jessie,l=Debian,c=main origin ftp.us.debian.org 500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages release v=8.7,o=Debian,a=stable,n=jessie,l=Debian,c=main origin ftp.us.debian.org Pinned packages:
For RHEL/OEL/CentOS:
sudo yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.awanti.com * epel: mirror.awanti.com * extras: mirror.awanti.com * updates: mirror.awanti.com repo id repo name status !base/7/x86_64 CentOS-7 - Base 9,363 !epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 11,290 !extras/7/x86_64 CentOS-7 - Extras 266 !updates/7/x86_64 CentOS-7 - Updates 1,086 !veeam Veeam Backup for GNU/Linux - x86_64 2 repolist: 22,007 repo id repo name status base CentOS-6 - Base 6,696 epel Extra Packages for Enterprise Linux 6 - x86_64 12,251 extras CentOS-6 - Extras 63 updates CentOS-6 - Updates 955 veeam Veeam Backup for GNU/Linux - x86_64 2 repolist: 19,967 [user@host ~]$
For SUSE based:
sudo zypper lr root's password: # | Alias | Name | Enabled | Refresh ---+--------------------------------------------------+--------------------------------------------------+---------+-------- 1 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | No | No 2 | nu_novell_com:SLE11-Public-Cloud-Module | SLE11-Public-Cloud-Module | No | Yes 3 | nu_novell_com:SLE11-SP4-Debuginfo-Pool | SLE11-SP4-Debuginfo-Pool | No | Yes 4 | nu_novell_com:SLE11-SP4-Debuginfo-Updates | SLE11-SP4-Debuginfo-Updates | No | Yes 5 | nu_novell_com:SLE11-Security-Module | SLE11-Security-Module | No | Yes 6 | nu_novell_com:SLES11-Extras | SLES11-Extras | No | Yes 7 | nu_novell_com:SLES11-SP4-Pool | SLES11-SP4-Pool | Yes | Yes 8 | nu_novell_com:SLES11-SP4-Updates | SLES11-SP4-Updates | Yes | Yes 9 | packman_1 | packman | Yes | Yes 10 | veeam | Veeam Backup for GNU/Linux - x86_64 | Yes | Yes
For Fedora:
sudo dnf repolist Last metadata expiration check: 1:13:54 ago on Wed Mar 8 14:58:04 2017. repo id repo name status *fedora Fedora 25 - x86_64 51,669 *updates Fedora 25 - x86_64 - Updates 17,234
2. If all necessary repositories are enabled, try to find all available package versions manually:
For Debian:
sudo apt-cache madison linux-headers-* linux-headers-3.16.0-4-all | 3.16.39-1+deb8u1 | http://security.debian.org/ jessie/updates/main amd64 Packages linux-headers-3.16.0-4-all | 3.16.39-1 | http://ftp.us.debian.org/debian/ jessie/main amd64 Packages linux-headers-3.16.0-4-all | 3.16.7-ckt25-2 | http://ftp.us.debian.org/debian/ jessie-updates/main amd64 Packages linux-headers-3.16.0-4-amd64 | 3.16.39-1+deb8u1 | http://security.debian.org/ jessie/updates/main amd64 Packages linux-headers-3.16.0-4-amd64 | 3.16.39-1 | http://ftp.us.debian.org/debian/ jessie/main amd64 Packages linux-headers-3.16.0-4-amd64 | 3.16.7-ckt25-2 | http://ftp.us.debian.org/debian/ jessie-updates/main amd64 Packages linux-headers-amd64 | 3.16+63 | http://ftp.us.debian.org/debian/ jessie/main amd64 Packages linux-headers-3.16.0-4-common | 3.16.39-1+deb8u1 | http://security.debian.org/ jessie/updates/main amd64 Packages linux-headers-3.16.0-4-common | 3.16.39-1 | http://ftp.us.debian.org/debian/ jessie/main amd64 Packages linux-headers-3.16.0-4-common | 3.16.7-ckt25-2 | http://ftp.us.debian.org/debian/ jessie-updates/main amd64 Packages linux-headers-3.16.0-4-all-amd64 | 3.16.39-1+deb8u1 | http://security.debian.org/ jessie/updates/main amd64 Packages linux-headers-3.16.0-4-all-amd64 | 3.16.39-1 | http://ftp.us.debian.org/debian/ jessie/main amd64 Packages linux-headers-3.16.0-4-all-amd64 | 3.16.7-ckt25-2 | http://ftp.us.debian.org/debian/ jessie-updates/main amd64 Packages
For RHEL/OEL/CentOS:
sudo yum list kernel-headers-\*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.awanti.com
* epel: mirror.awanti.com
* extras: mirror.awanti.com
* updates: mirror.awanti.com
Installed Packages
kernel-headers.x86_64 3.10.0-514.10.2.el7 @updates
For Fedora:
sudo dnf list kernel-headers-\* Last metadata expiration check: 1:47:48 ago on Wed Mar 8 14:58:04 2017. Installed Packages kernel-headers.x86_64 4.9.13-200.fc25 @updates
For SUSE based systems:
sudo zypper se -s --match-exact kernel-source Refreshing service 'nu_novell_com'. Retrieving repository 'SLES11-SP4-Updates' metadata [done] Building repository 'SLES11-SP4-Updates' cache [done] Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository --+---------------+------------+--------------+--------+------------------- i | kernel-source | package | 3.0.101-94.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-91.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-88.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-84.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-80.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-77.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-71.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-68.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-65.1 | x86_64 | SLES11-SP4-Updates v | kernel-source | package | 3.0.101-63.1 | x86_64 | SLES11-SP4-Pool | kernel-source | srcpackage | 3.0.101-94.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-91.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-88.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-84.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-80.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-77.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-71.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-68.1 | noarch | SLES11-SP4-Updates | kernel-source | srcpackage | 3.0.101-65.1 | noarch | SLES11-SP4-Updates3. If the package has not been found, here is what can be done to resolve this issue:
- Search for the package on the installation media of your distribution
- Request the package from your vendor or search for it in the public repositories across the web
- Install the most recent kernel version for your distribution and reboot the machine
More Information
If none of the solutions help, please follow these instructions to collect the diagnostic data for submitting a support case.The behavior described above is the design of DKMS. DKMS framework builds modules for the currently running kernel. Otherwise the module would be built for another kernel version and would not be loaded or built at all.
When you create a support case, it will be very helpful if you complete the steps above and share a short summary of what has been done. It will also be helpful if you collect the diagnostic information as follows:
1. Open your Linux shell.
2. Run the following commands in the terminal:
cat /etc/*release uname -a lsb_release -a
3. Depending on your distribution vendor and version, run the following commands to provide us with the information about the installed packages and repositories:
For Debian based systems:
sudo apt-cache madison veeam* sudo apt-cache madison linux* sudo apt-cache policy
For SUSE based systems:
sudo zypper se -s --match-exact veeam\* sudo zypper se -s --match-exact kernel\* sudo zypper lr
For RHEL/OEL/CentOS systems:
sudo yum list veeam\* sudo yum list kernel\* sudo yum repolist all
For Fedora:
sudo dnf list veeam\* sudo dnf list kernel\* sudo dnf repolist all
4. Provide the information about DKMS modules and build attempt:
dkms status dkms build -m veeamsnap -v 1.0.0.944 –all
5. Compiler information and module load attempt:
gcc -v modprobe veeamsnap
Please save the output of all these actions and provide it to us.