13–15 Nov 2023
America/New_York timezone

Speeding up Kernel Testing and Debugging with virtme-ng

13 Nov 2023, 12:15
45m
"James River Salon D" (Omni Richmond Hotel)

"James River Salon D"

Omni Richmond Hotel

183
LPC Refereed Track LPC Refereed Track

Speaker

Andrea Righi (Canonical)

Description

Testing and debugging kernels can be painfully slow: compiling the kernel, setting up a testing system (bare-metal or VM), deploying the recompiled kernel, executing tests, collect results and repeating the cycle.

Intensified by the fact that each kernel developer employs their own distinctive set of custom scripts and workflows to accomplish comparable goals can lead to inefficiencies and it is often a major deterrent for newcomers aspiring to venture into kernel development.

Virtme-ng aims to provide a standardized tool for kernel developers that can help to expedite this process. It uses a combination of QEMU/KVM, virtio-fs and overlayfs to boot a recompiled kernel (or any kernel image in the system) inside a virtualized copy-on-write (CoW) live snapshot of the running system.

This allows to basically "fork" the system with a new kernel, creating a safe sandbox for executing tests (with performance comparable to native host execution), all while eliminating the need for the deployment and maintenance of dedicated testing systems.

This tool can be extremely useful in a CI/CD scenario or for kernel bisecting, offering substantial time and resource savings. Furthermore, this talk is also an opportunity to raise awareness of common kernel development tools. Sharing our typical development workflow can be a real benefit for the whole kernel community, as even seemingly minor details in our daily routine can help or inspire others to become more involved in kernel development.

Primary author

Andrea Righi (Canonical)

Presentation materials

Diamond Sponsors

Platinum Sponsor
Gold Sponsors




Silver Sponsors



Catchbox Sponsor
Livestream Sponsors

T-Shirt Sponsor
Conference Services Provided by