1. 13
  1.  

  2. 1

    What is the essential feature that NetBSD provides for this use case? Is it also possible with OpenBSD, FreeBSD, Linux, Plan9, Darwin?

    1. 3

      The major BSDs (Open, Free, and Net) all share a feature that makes this kind of construction easier than at least most mainstream Linux distros: namely, the idea of building a “world” that contains a custom kernel and userland in one pass, rather than separately building the kernel and some set of critical utilities, perhaps swapping in a more minimal libc, busybox in lieu of GNU coreutils, etc.

      You absolutely could build a custom kernel and userland for Linux, Darwin, or (probably) Plan9, but the OS build system (or lack thereof) will likely create more friction when it comes time to strip things down to a really minimal set of drivers and system processes.

      There are of course dedicated mobile and embedded Linux build chains to do this, and even the Alpine derivatives used in so many Docker builds could be a practical substrate if you want to build a Linux guest. I don’t know of much work in the Darwin OSS community (such as it is) to create stripped-down embedded/guest OS images, but there might be some interesting potential there given the shared DNA of Mac OS and iOS.

      Finally, Firecracker does provide some value beyond just starting tiny VMs quickly: it exposes a REST API for VM state management, and a metadata service bridged to the VM guest not entirely dissimilar from the one available to EC2 nodes.

      1. 1

        It’s just KVM, but with an image to run that’s as minimal as possible. The author talks about stripping the NetBSD kernel down to its bare essentials to reduce boot time, and you’ll notice that the image built by “sailor” includes very little. I think that’s it.

        I guess, since it’s the well established KVM, that this is free from the same problems that you’d have with LXC and docker on linux….