Cedana
Cedana Daemon
Cedana
Cedana Daemon
  • Cedana Daemon
  • Get started
    • Installation
    • Authentication
    • Configuration
    • Health checks
    • Plugins
    • Feature matrix
  • Guides
    • Managed process/container
    • Checkpoint/restore basics
    • Checkpoint/restore with GPUs
    • Checkpoint/restore runc
    • Checkpoint/restore containerd
    • Checkpoint/restore streamer
    • Checkpoint/restore kata
      • how-to-create-custom-busybox-image
      • how-to-install-criu-in-guest
      • how-to-install-on-aws
      • how-to-make-kernel-criu-compatible
      • how-to-make-rootfs-criu-compatible
      • Checkpoint/Restore kata containers
  • Developer guides
    • Architecture
    • Profiling
    • Testing
    • Writing plugins
  • References
    • CLI
      • cedana
      • cedana attach
      • cedana checkpoint
      • cedana checkpoints
      • cedana completion
      • cedana completion bash
      • cedana completion fish
      • cedana completion powershell
      • cedana completion zsh
      • cedana daemon
      • cedana daemon check
      • cedana daemon start
      • cedana delete
      • cedana dump
      • cedana dump containerd
      • cedana dump job
      • cedana dump process
      • cedana dump runc
      • cedana exec
      • cedana features
      • cedana inspect
      • cedana job
      • cedana job attach
      • cedana job checkpoint
      • cedana job checkpoint inspect
      • cedana job checkpoint list
      • cedana job checkpoints
      • cedana job delete
      • cedana job inspect
      • cedana job kill
      • cedana job list
      • cedana jobs
      • cedana k8s-helper
      • cedana k8s-helper destroy
      • cedana kill
      • cedana manage
      • cedana manage containerd
      • cedana manage process
      • cedana manage runc
      • cedana plugin
      • cedana plugin features
      • cedana plugin install
      • cedana plugin list
      • cedana plugin remove
      • cedana plugins
      • cedana ps
      • cedana query
      • cedana query k8s
      • cedana query runc
      • cedana restore
      • cedana restore job
      • cedana restore process
      • cedana restore runc
      • cedana run
      • cedana run containerd
      • cedana run process
      • cedana run runc
    • API
    • GitHub
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Guides
  2. Checkpoint/restore kata

how-to-make-kernel-criu-compatible

Previoushow-to-install-on-awsNexthow-to-make-rootfs-criu-compatible

Last updated 2 months ago

Was this helpful?

This doc describes how we can build a kernel which is CRIU compatible. Go must be installed. Other package requirements can be installed as follows :

go install github.com/mikefarah/yq/v4@latest
sudo apt install flex
sudo apt install bison
sudo apt install libelf-dev

The vanilla build steps for 5.15.26 version of the kernel are :

cd ~/kata-containers/tools/packaging/kernel
sudo ./build-kernel.sh -v 5.15.26 setup
sudo ./build-kernel.sh -v 5.15.26 build
sudo ./build-kernel.sh -v 5.15.26 install

Since CRIU has optimizations for kernel versions post 6.x.x, we will build 6.1.62, using the configuration file directly. The configuration file contains all the flags set (as required for CRIU, mentioned ). The configuration file is added to the Cedana fork of kata-containers, in commit.

cd ~/kata-containers/tools/packaging/kernel
sudo ./build-kernel.sh -v 6.1.62 -c ~/kata-containers/tools/packaging/kernel/configs/amd64-6.1.62-criu-compatible.conf setup

The command above will ask certain config details, you can answer them as follows :

Track memory changes (MEM_SOFT_DIRTY) [N/y/?] (NEW) y
UDP: socket monitoring interface (INET_UDP_DIAG) [N/y/?] (NEW) y
RAW: socket monitoring interface (INET_RAW_DIAG) [N/y/?] (NEW) y
INET: allow privileged process to administratively close sockets (INET_DIAG_DESTROY) [N/y/?] (NEW) N

The build and install steps can continue as before :

sudo ./build-kernel.sh -v 6.1.62 build
sudo ./build-kernel.sh -v 6.1.62 install

This will finally create “/usr/share/kata-containers/vmlinux.container”. We can now check the config by logging inside the guest VM. Example :

zcat /proc/config.gz | grep CONFIG_CHECKPOINT_RESTORE
here
this