Remix.run Logo
ranger_danger 15 hours ago

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.

v_elem 12 hours ago | parent | next [-]

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 ;-)

jtbaker 13 hours ago | parent | prev | next [-]

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

https://smolmachines.com/

ranger_danger 13 hours ago | parent [-]

I tried smolvm, and built several single binaries with it for different distros. Less than a month later, those same binaries now silently exit with code 0 and I have absolutely no idea what's wrong or how to diagnose.

thepoet 14 hours ago | parent | prev | next [-]

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
liquid64 15 hours ago | parent | prev | next [-]

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.

ktm5j 13 hours ago | parent | next [-]

I don't think I've ever seen a kernel or initrd in a container image. The whole point of containers is not to duplicate the kernel, and you definitely don't need an initial ram disk since you already have a running operating system.

pullrun 13 hours ago | parent [-]

[dead]

spwa4 15 hours ago | parent | prev [-]

And if they don't have a kernel? You just specify kernel + initrd?

yakimbo90 14 hours ago | parent | next [-]

you don't have to source one manually — pullrun kernel install fetches a kata containers kernel into ~/.pullrun/kernels/vmlinux-<version>. One-time setup, then the daemon auto-discovers it.

moondev 14 hours ago | parent [-]

If you run an ubuntu image with a kata kernel, do you have difficulty installing some packages? For example if you need linux-headers-$(uname -r) or linux-modules-extra-$(uname -r), it won't exist in canonical apt repos?

12 hours ago | parent | next [-]
[deleted]
13 hours ago | parent | prev | next [-]
[deleted]
pullrun 12 hours ago | parent | prev [-]

[dead]

15 hours ago | parent | prev | next [-]
[deleted]
15 hours ago | parent | prev | next [-]
[deleted]
15 hours ago | parent | prev | next [-]
[deleted]
15 hours ago | parent | prev | next [-]
[deleted]
15 hours ago | parent | prev | next [-]
[deleted]
14 hours ago | parent | prev | next [-]
[deleted]
pullrun 14 hours ago | parent | prev [-]

[dead]

sureglymop 12 hours ago | parent | prev | next [-]

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
ranger_danger 10 hours ago | parent [-]

Error: default OCI runtime "krun" not found: invalid argument

sureglymop 8 hours ago | parent [-]

Oh, you do need to install it. e.g. on arch: https://archlinux.org/packages/extra/x86_64/krun/

ranger_danger 8 hours ago | parent [-]

I do have both podman and crun installed, but I don't see any krun or libkrun packages for ubuntu unfortunately :/

15 hours ago | parent | prev | next [-]
[deleted]
15 hours ago | parent | prev [-]
[deleted]