Check the kernel
CRIU needs some support from the kernel to work. While developing CRIU we sometimes push patches into the Linux kernel. This article describes how to check whether the needed functionality is in the kernel or not.
In the simplest case just running
criu check would tell you whether the current kernel provides the minimally required support for CRIU to work. If everything is good the console would look like
# criu check Looks good.
This means that you can try playing with the Checkpoint/Restore functionality. The minimal kernel version to check is 3.11, since only in it all the basic patches are merged, however, the required functionality can be compiled out. Check your kernel config.
However, if the processes you dump use some specific resource (e.g. perform AIO or use TUN devices in netns) more than basic kernel support will be needed.
To check for more kernel stuff that might be needed to C/R the
--extra option should be used. In case something is missing in the kernel the message would appear
Looks good but some kernel features are missing which, depending on your process tree, may cause dump or restore failure.
In this case a more detailed analysis is required. Don't hesitate to contact us at [email@example.com] for help.
From time to time we develop a new feature whose kernel support is not yet in the upstream. In this case the kernel patches can be found in our kernel and the
--experimental option should be used to detect them.
For ZDTM test suite CRIU has an ability to check individual features. The list of features is seen in the help text, and the particular kernel feature is checked with the
--feature $name option. E.g. like this
criu check --feature mnt_id mnt_id is supported