Skip to content

Latest commit

 

History

History
156 lines (118 loc) · 4.62 KB

1-installing.md

File metadata and controls

156 lines (118 loc) · 4.62 KB

1. Installing crun-vm

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
  1. Installing crun-vm
  2. Running VMs with Podman or Docker
  3. Running VMs as systemd services
  4. Running VMs in Kubernetes
  5. crun-vm(1) man page

Installing the crun-vm binary

On Fedora

$ dnf install crun-vm

From source

  1. Install crun-vm's build dependencies:

  2. Install crun-vm's runtime dependencies:

  3. Install crun-vm's binary and man page:

    $ make install

Making crun-vm available as a runtime

For Podman

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.

For Docker

  1. Merge the following configuration into /etc/docker/daemon.json (creating that directory and file if necessary):

    {
      "runtimes": {
        "crun-vm": {
          "path": "/usr/bin/crun-vm"
        }
      }
    }
  2. 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 Kubernetes

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.

  1. Install crun-vm on all cluster nodes where pods may be scheduled, using any of the methods described above.

  2. Append the following to /etc/crio/crio.conf:

    [crio.runtime.runtimes.crun-vm]
    runtime_path = "/usr/bin/crun-vm"
  3. 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.