WOAAAA!!!! #smolBSD with libkrun on aarch64!! By the one and only @slp ❤️

https://x.com/slpnix/status/1984400857077572027?t=h59EGz3mWrbKtTDdlq6fOA&s=19

Sergio López (@slpnix) on X

smolBSD with libkrun on aarch64 is pretty cool (and FAST!) cc/ @iMilnb

X (formerly Twitter)
@imil Just for fun, I’m writing a C variant of startnb that links against libkrun (on Linux and macOS) to launch the smolBSD payload, for ultra-low service-ready times.

@slp what am I missing to run this?

$ LD_LIBRARY_PATH=../target/release ./external_kernel -b ../../smolBSD/images/rescue-amd64.img -c "console=viocon root=ld0a -v" ../../smolBSD/kernels/netbsd-SMOL
kernel_path: ../../smolBSD/kernels/netbsd-SMOL
kernel_cmdline: console=viocon root=ld0a -v
nested=0
[returns with rc=0, krun_start_enter() is reached]
$

I built libkrun with:

make BLK=1 NET=1

Or can't it boot PVH? If not you might be interested in https://github.com/firecracker-microvm/firecracker/blob/f5c26749ae696ceb0bbb1084e2094121be96dfcd/CHANGELOG.md?plain=1#L147

@imil It can't boot PVH. On aarch64, you need this branch with fixes that will go in this week.
https://github.com/slp/libkrun/tree/fix-bsd-aarch64-boot
GitHub - slp/libkrun at fix-bsd-aarch64-boot

A dynamic library providing Virtualizaton-based process isolation capabilities - GitHub - slp/libkrun at fix-bsd-aarch64-boot

GitHub
@imil A contributor did an initial implementation of PVH, but didn't got in shape to be merged. It's just a matter of someone coming up to the task and finishing it.
https://github.com/containers/libkrun/pull/284
feat: add support for PVH boot protocol by dsseng · Pull Request #284 · containers/libkrun

WIP support for PVH boot, enabling e.g. smolBSD to boot. Parts copied from: firecracker-microvm/firecracker@a52890b firecracker-microvm/firecracker@20b50ce firecracker-microvm/firecracker@6e87d70

GitHub