logoalt Hacker News

ranger_dangertoday at 3:41 PM7 repliesview on HN

Where does the microvm kernel/initrd come from? How can it be built?

I just want a system that's as easy as "docker run ubuntu" but launches as a microvm instead, without me having to source a kernel or remember hugenormously long qemu incantation lines.


Replies

v_elemtoday at 7:27 PM

Looks like everyone is converging on the same idea these days :-)

You might be interested in my project then: https://github.com/virtkit-dev/virtkit (also inspired by smolvm and similar projects). Default kernel included, but can also boot a custom kernel if necessary.

I built it at work to replace years of accumulated tooling around complex multi-stage docker/docker-compose builds. The same workloads now run more securely, often faster, and with much less disk space. Also acts as a Gitlab executor to run CI jobs in microvms :-)

Obviously built with AI (this would otherwise have been a multi-year effort... and therefore not exist at all!) but I think the design is not bad.

Still beta and under-documented, but already quite usable.

Edit: it's not just a runtime, it also replaces docker build with its own native build engine — the build steps themselves run inside microVMs (not "docker inside a VM"). I haven't seen any other tool actually do that, that's quite fun ;-)

sureglymoptoday at 7:27 PM

You can do this with libkrun. I use it as a podman backend which works exactly as you describe here.

    podman run --rm -it --runtime=krun ubuntu sh
show 1 reply
jtbakertoday at 5:40 PM

I think `smolvm` may fit the bill? I've been using it to run pi.dev in a sandbox.

https://smolmachines.com/

show 1 reply
thepoettoday at 5:21 PM

We will be soon including this in Tarit, a firecracker alternative https://github.com/instavm/tarit

Currently we have to supply a kernel to run the OCI as a microVM with a warm pool.

  TARIT_KERNEL=/path/vmlinux

  taritd image build --oci ubuntu:24.04 --name ubuntu
  taritd vm create --image ubuntu
liquid64today at 4:02 PM

The kernel/initrd come from a regular OCI container image — there's no separate VM image format. Any OCI image containing /boot/vmlinux (and optionally /boot/initramfs.cpio.gz) works as a kernel image.

show 1 reply