There are two steps to setting up crun-vm on a system:
- Installing the actual
crun-vm
binary; - Configuring Podman, Docker, and/or Kubernetes (whichever you intend to use crun-vm with) to recognize crun-vm as a runtime.
These steps are detailed in the sections below.
Navigation
$ dnf install crun-vm
-
Install crun-vm's build dependencies:
- cargo
- gzip
- libselinux, including development headers
- ronn-ng
-
Install crun-vm's runtime dependencies:
- bash
- coreutils
- crun
- crun-krun
- genisoimage
- grep
- libselinux
- libvirtd or virtqemud
- passt
- qemu-img
- qemu-system-x86_64, qemu-system-aarch64, and/or other QEMU system emulators for the VM architectures you want to support
- skopeo
- ssh
- util-linux
- virsh
- virtiofsd
- virtlogd
-
Install crun-vm's binary and man page:
$ make install
Nothing to do here, since Podman automatically recognizes crun-vm as a runtime.
Commands like podman create
and podman run
can be made to use the crun-vm
runtime by passing them the --runtime crun-vm
option.
See 2. Running VMs with Podman or Docker to get started.
-
Merge the following configuration into
/etc/docker/daemon.json
(creating that directory and file if necessary):{ "runtimes": { "crun-vm": { "path": "/usr/bin/crun-vm" } } }
-
Reload the
docker
service for the new configuration to take effect:$ service docker reload
Commands like docker create
and docker run
can then be made to use the
crun-vm runtime by passing them the --runtime crun-vm
option.
See 2. Using crun-vm and Podman or Docker to run a VM to get started.
For crun-vm to be usable as a runtime in a Kubernetes cluster, the latter must be use the CRI-O runtime. See the Kubernetes docs on runtimes for more information.
-
Install crun-vm on all cluster nodes where pods may be scheduled, using any of the methods described above.
-
Append the following to
/etc/crio/crio.conf
:[crio.runtime.runtimes.crun-vm] runtime_path = "/usr/bin/crun-vm"
-
Create a
RuntimeClass
object in the cluster that references crun-vm:apiVersion: node.k8s.io/v1 kind: RuntimeClass metadata: name: crun-vm # a name of your choice handler: crun-vm
Pods can then be configured to use this RuntimeClass
by specifying its name
under Pod.spec.runtimeClassName
.
See 4. Running VMs in Kubernetes to get started.