marvin c3b6a72d39 Fix U3: escape commas in --mount path for QEMU -virtfs
QEMU QemuOpts splits on commas; escape literal commas in the host
path as ,, per QEMU convention to prevent option injection and
boot failures on paths containing commas.

Fix U5: extract b64dec() helper in slim-init.sh

Deduplicate the 3-line base64 fallback decode block used by both
the slim.mount and slim.cmd handlers into a single b64dec() function.

Fix U6: add multi-mount test case

test_mount now passes two --mount flags and asserts both slim0
and slim1 9p tags appear, covering the multi-mount tag-generation
path.
2026-09-10 12:21:30 +02:00
2026-08-26 19:25:20 +02:00

slim

Turning containers into bootable VMs

Example

# Build the container
podman build ./example/alpine -t slim-alpine

# Make the container bootable. slim injects /slim/init and /slim/exec,
# then packs the rootfs as a qcow2 disk.
slim build qcow2 slim-alpine

# Boot the image using QEMU. The container's CMD runs automatically.
slim run slim-alpine

# Override the command at runtime (base64-encoded on the kernel cmdline):
slim run slim-alpine --cmd '/bin/sh'

# Override the command at build time (baked into /slim/exec):
slim build qcow2 slim-alpine --cmd '/bin/sh'

# Cleanup
slim image rm slim-alpine
podman image rm slim-alpine

Kernel

slim boots VMs using a shared kernel at $XDG_DATA_HOME/slim-rs/registry/vmlinuz. Place a suitable x86 bzImage there before running slim run.

S
Description
Turn container images into bootable VMs
Readme
251 KiB
Languages
Rust 75.1%
Shell 24.7%
Dockerfile 0.2%