Skip to main content

So I had a unique support case recently, a customer using Veeam Agent for Linux with mixed success, they had one particular server that worked fine during implementation and then after a week the backups had started to immediately fail. The server was unable to load the veeamsnap module.

Veeam themselves have a great article dealing with this in general and it helps resolve the majority of the cases, link here.

One point I believe this article doesn’t properly discuss though is why this can happen, especially when it previously worked properly. To understand this we need to know a bit about how Veeam works with its Linux Agent.

To fully understand how the Veeam Agent for Linux works, the first question we need to answer is, what is “veeamsnap”? veeamsnap is a Linux kernel module used by Veeam to create volume snapshots. Due to the huge variety of Linux systems and updates supported by Veeam, there are some pre-requisites that must be met for veeamsnap to function, these are documented here.

The key pre-requisite that caused the issue for my customer was “linux-headers”. Veeam documentation does a good job is highlighting that you need these but stops short of telling you clearly how to find this. To find out what kernel you’re using just run the following command:

uname -srm

You’ll get output like this:

Linux 4.15.0-120-generic x86_64

The key piece of information here is the final suffix in the number “generic”. This means we’re using the generic Linux kernel and need the Linux Generic Headers.

So, what are these headers? At a technical level, kernel headers provide the various function/structure definitions required when compiling code that will interact with the kernel. At an overview level, we require the matching kernel headers to the exact kernel build we are using. This means when Veeam builds its veeamsnap module for our kernel, we have a high degree of confidence that whilst Veeam can’t test every possible kernel in existance, we can be sure that the structure being used for the invoking of functions and parameters being passed are compatible with what the kernel is expecting.

So now we know what headers are, how do we install them? The Veeam article I linked above includes commands for installing the specific kernel headers required, for archival purposes I’ve included the commands below:

Debian:
sudo apt-get install linux-headers-$(uname -r)

RHEL/OEL/Centos:
sudo yum install kernel-headers-$(uname -r)

Fedora:
sudo dnf install kernel-headers-$(uname -r)

My one issue with this is that if you enable automatic updates, this issue will reoccur the next time your kernel is updated as we’ve installed a specific version of the kernel headers. To resolve this permanently you need to install the main package of your relevant headers, for example to install the generic headers we can type in:

sudo apt-get install linux-headers-generic

Now there are other alternative kernel builds out and I won’t attempt to document them all here, but if you’ve inherited a system whereby someone deployed a different kernel and you’ve been hitting a brick wall, hopefully this will help. Once we’ve installed the main package instead of a specific version, when you run your updating, automatically or manually, this will be included.

Fun fact to close on, did you know there are numerous reduced latency kernels within Linux, mainly from the days of trying to achieve low/no latency audio processing? For example: -preempt, -lowlatency, -rt, -realtime. They rely on more aggressive context switching to reduce latency mainly with various tweaks and reduction in the use of power-saving techniques for responsiveness.

Ok, I had several problems with veeamsnap, but not his one up to now… :grin:

Thanks for sharing


That kind of problem that is good to know!

Thanks for share with @MicoolPaul.


Thanks for sharing


Thanks for sharing, it will be useful for me in the future :)


Now I come to know why every now and then the kernel is mismatching with header.

Very informative article and thanks for sharing.


Thanks for sharing. Very informative 


Thanks for sharing that was good to know

 


Thanks for sharing! 


Hi @MicoolPaul 

 

Thanks for post and I want to mention that often users are missing System Requirements, specifically required packages, as listed here https://helpcenter.veeam.com/docs/agentforlinux/userguide/system_requirements.html?ver=60

 

Thanks.


Using Ubuntu, kernel 6.9.3-76060903-generic

Install problem related to kernel bug.

veeam depends on veeamsnap (= 6.1.2.1781) | blksnap (= 6.1.2.1781); however:
  Package veeamsnap is not installed.
  Package blksnap is not configured yet.
-------

Problem installing blksnap

dpkg: error processing package blksnap (--configure):
 installed blksnap package post-installation script subprocess returned error exit status 10


blksnap failed to install due to bug.

See: /var/lib/dkms/blksnap/6.1.2.1781/build/make.log

Waiting on bug fix from kernel patch.


Using Ubuntu, kernel 6.9.3-76060903-generic

Install problem related to kernel bug.

veeam depends on veeamsnap (= 6.1.2.1781) | blksnap (= 6.1.2.1781); however:
  Package veeamsnap is not installed.
  Package blksnap is not configured yet.
-------

Problem installing blksnap

dpkg: error processing package blksnap (--configure):
 installed blksnap package post-installation script subprocess returned error exit status 10

blksnap failed to install due to bug.

See: /var/lib/dkms/blksnap/6.1.2.1781/build/make.log

Waiting on bug fix from kernel patch.

Hi @bitfolio 

Just to confirm, you are running Ubuntu Server 22.04 x64, aren’t you?


No, I am not running a headless server; rather, I am running a desktop.

bookworm/sid

6.9.3-76060903-generic #202405300957~1718348209~22.04~7817b67 SMP PREEMPT_DYNAMIC Mon J x86_64 x86_64 x86_64 GNU/Linux

 

Building initial module for 6.9.3-76060903-generic
ERROR (dkms apport): kernel package linux-headers-6.9.3-76060903-generic is not supported
Error! Bad return status for module build on kernel: 6.9.3-76060903-generic (x86_64)
Consult /var/lib/dkms/blksnap/6.1.2.1781/build/make.log for more information.
dpkg: error processing package blksnap (--configure):
 installed blksnap package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 blksnap
E: Sub-process /usr/bin/dpkg returned an error code (1)
 

From: /var/lib/dkms/blksnap/6.1.2.1781/build/make.log

/var/lib/dkms/blksnap/6.1.2.1781/build/snapimage.c: In function ‘snapimage_create’:
/var/lib/dkms/blksnap/6.1.2.1781/build/snapimage.c:265:64: error: macro "blk_mq_alloc_disk" requires 3 arguments, but only 2 given
  265 |         disk = blk_mq_alloc_disk(&snapimage->tag_set, snapimage);
      |                                                                ^
In file included from /var/lib/dkms/blksnap/6.1.2.1781/build/snapimage.c:5:
./include/linux/blk-mq.h:690: note: macro "blk_mq_alloc_disk" defined here
  690 | #define blk_mq_alloc_disk(set, lim, queuedata)                          \
      | 
/var/lib/dkms/blksnap/6.1.2.1781/build/snapimage.c:265:16: error: ‘blk_mq_alloc_disk’ undeclared (first use in this function); did you mean ‘blk_mq_alloc_queue’?
  265 |         disk = blk_mq_alloc_disk(&snapimage->tag_set, snapimage);
      |                ^~~~~~~~~~~~~~~~~
      |                blk_mq_alloc_queue
/var/lib/dkms/blksnap/6.1.2.1781/build/snapimage.c:265:16: note: each undeclared identifier is reported only once for each function it appears in
make62]: *** tscripts/Makefile.build:244: /var/lib/dkms/blksnap/6.1.2.1781/build/snapimage.o] Error 1
make 1]: *** [/usr/src/linux-headers-6.9.3-76060903-generic/Makefile:1925: /var/lib/dkms/blksnap/6.1.2.1781/build] Error 2
make: *** sMakefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.9.3-76060903-generic'
 


Thanks for reply @bitfolio 

Stay tuned for upcoming releases of VAL. 


I have a broken backup, just like @bitfolio . When will a new version of VAL be released to fix this? 
Thank you in advance.


I have a broken backup, just like @bitfolio . When will a new version of VAL be released to fix this? 
Thank you in advance.

Very very soon.


Comment