129 sao GitHub và vẫn tăng — cilium/little-vm-helper là dự án Go mà TopGit đang theo dõi trên nền tảng. tool for building and running VMs for development and testing
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
little-vm-helper (lvh) is a VM management tool, aimed for testing and development of features that
depend on the kernel, such as BPF. It is used in cilium,
tetragon, and pwru. It can also be used for kernel development. It is not
meant, and should not be used for running production VMs. Fast booting and image building, as well
as being storage efficient are the main goals.
It uses qemu and libguestfs tools. See dependencies.
Configurations for specific images used in the Cilium project can be found in:
https://github.com/cilium/little-vm-helper-images.
Usage
For an example script, see scripts/example.sh.
LVH can be used to:
build root images for VMs
download images
build kernels
download kernels
boot VMs using above
Build root images
Build example images:
$ mkdir _data
$ go run ./cmd/lvh images example-config > _data/images.json
$ go run ./cmd/lvh images build --dir _data # this may require sudo as relies on /dev/kvm
The first command will create a configuration file:
a set of actions to be performed after the installation of the packages. There are multiple
actions supported, see pkg/images/actions.go.
Once the images build command completes, the two images described in the configuration file will
be present in the images directory. Note that the images are stored as sparse files so they take less
space:
$ ls -lh _data/images/
856M _data/images/base.img
1.7G _data/images/k8s.qcow2
Download images
Instead of building your own images, you can use lvh to download images built
from our cilium/little-vm-helper-images
repository. For that use the lvh images pull command.
You can find a list of the various images built under
https://quay.io/organization/lvh-images, see more information the project
README.md
If you don't know which image to choose, the most complete image to date is the
kind type. You can find the various tags for each kernel versions under
https://quay.io/repository/lvh-images/kind?tab=tags.
For example, pulling an image for testing the 5.15 kernel built by lvh image CI
on 2026/01/06 would be:
There are options that are applied to all kernels (common_opts) as well as
kernel-specific options.
The kernels are kept in worktrees. Specifically, there is a
git bare directory (git) that holds all the objects, and one worktree per kernel. This allows
efficient fetching and, also, having each kernel on its own separate directory.
For example:
$ ls -1 _data/kernels
5.18/
bpf-next/
git/
Currently, kernels are built using the bzImage for x86_64 or Image.gz for
arm64, and tar-pkg targets (see pkg/kernels/conf.go).
go run ./cmd/lvh run --image _data/images/base.img --kernel _data/kernels/bpf-next/arch/x86_64/boot/bzImage
Or, with the kernel installed in the image, using the image bootloader:
go run ./cmd/lvh run --image _data/images/base.img
[!IMPORTANT]
Only amd64 images contain a compatible bootloader. So even though kernels are
present in the arm64 images, you'll need to supply it to QEMU through the
--kernel lvh option flag from your host. See the above section
"Download Kernels" on how to download kernels from these images.
[!TIP]
As booting images goal is often to test BPF program on various kernel
versions, here are some useful lvh options:
--port to bind the VM ssh port to a custom port, letting you ssh -p 2222 root@localhost to have a fully capable shell.
--host-mount to mount your working directory, making applying changes and
testing them quicker (be aware that it requires kernel modules to load
correctly).
--cpu and --mem to adjust the specs for the VM, making building and
running inside the VM quicker.
Overall, a typical command would look like this on x86_64 (for arm64, you
would need to add --kernel for booting):
go run ./cmd/lvh run --image quay.io/lvh-images/root-images:main
[!NOTE]
Building images and kernels is only supported on Linux. On the other hand,
images and kernels already build on Linux can be booted in macOS (both x86
and arm64). The only requirement is qemu-system-x86_64. As macOS does not
support KVM, the commands to boot images are:
go run ./cmd/lvh run --image _data/images/base.img --qemu-disable-kvm
FAQ
Why not use packer to build images?
Existing packer builders
(e.g., https://github.com/cilium/packer-ci-build/blob/710ad61e7d5b0b6872770729a30bcdade2ee1acb/cilium-ubuntu.json#L19,
https://www.packer.io/plugins/builders/qemu) are meant to manage VMs with
longer lifetimes than a single use, and use facilities that introduce unnecessary overhead for our use-case.
Also, packer does not seem to have a way to provision images without booting a
machine. There is an outdated chroot package
https://github.com/summerwind/packer-builder-qemu-chroot, and cloud chroot builders
(e.g., https://www.packer.io/plugins/builders/amazon/chroot that uses https://github.com/hashicorp/packer-plugin-sdk/tree/main/chroot).
That being said, if we need packer functionality we can create a packer plugin
(https://www.packer.io/docs/plugins/creation#developing-plugins).
Why not use vagrant (or libvirt-based tools)?
These tools also target production VMs with lifetime stretching beyond a single
use. As a result, they introduce overhead in booting time, provisioning time,
and storage.
What are the dependencies of LVH?
On debian distribution, here is a list of packages needed for LVH to work.
images: configuration option for using different deb distros (hardcoded to sid now)
images: build tetragon images
unit tests
e2e tests (kind)
images: docker image with required binaries (libguestfs, mmdebstrap, etc.) to run the tool
- [x] is that possible? libguestfs needs to boot a mini-VM
kernels: add support for building kernels
runner: qemu runner wrapper
images bootable VMs: running qemu with --kernel is convenient for development. If we want to store images externally (e.g., AWS), it might make sense to support bootable VMs.
improve boot time: minimal init, use qemu microvm (https://qemu.readthedocs.io/en/latest/system/i386/microvm.html, https://mergeboard.com/blog/2-qemu-microvm-docker/)
images: on a failed run, save everything in a image-failed-$(date) directory
use guestfish --listen (see
https://github.com/libbpf/ci/blob/cbb3b92facbad705bbb619b496d0debb4b3d806f/prepare-rootfs/run.sh#L345)
cilium/little-vm-helper có phải mã nguồn mở không?
Có — cilium/little-vm-helper phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/cilium/little-vm-helper.
cilium/little-vm-helper có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho cilium/little-vm-helper. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
cilium/little-vm-helper có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho cilium/little-vm-helper. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
cilium/little-vm-helper còn đang phát triển không?
Commit gần nhất trên cilium/little-vm-helper là 11 ngày trước (theo timestamp GitHub). Repo có 30 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
cilium/little-vm-helper dùng license gì?
cilium/little-vm-helper phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc thêm về cilium/little-vm-helper ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/cilium/little-vm-helper là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về little-vm-helper?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về little-vm-helper.