The `ocivm run` command launches a QEMU microvm with an imported OCI
container image as its root filesystem. The custom init program
(`/linuxrc`) sets up the environment for the container's main process.
Configuration information are passed to the VM via a VirtIO block
device, which is read by the `/linuxrc` script. The main process is
attached to a VirtIO serial console, which is in turn attached to the
standart input/output streams of the `ocivm` process, thus allowing the
process to be controlled interactively or redirecting its output.
The `ocivm run` command supports mounting directories from the host
(using 9pfs), setting environment variables, setting the working
directory, and specifying the command to run in the VM, using a
command-line syntax similar to `podman run`. After the specified
command completes, the VM shuts down.
For now, `/linuxrc` is implemented in POSIX shell, and thus requires
that the container image must contain a complete userspace (including at
least *coreutils*, *util-linux*, and *iproute2*.