Skip to content

Latest commit

 

History

History
96 lines (68 loc) · 2.16 KB

1-installing.md

File metadata and controls

96 lines (68 loc) · 2.16 KB

1. Installing crun-vm

On Fedora

Run:

$ dnf install crun-vm

Podman will then be able to make use of the crun-vm runtime.

To also set up crun-vm for use with Docker:

  • Merge the following configuration into /etc/docker/daemon.json:

    {
      "runtimes": {
        "crun-vm": {
          "path": "/usr/bin/crun-vm"
        }
      }
    }
  • Reload the docker service for the new configuration to take effect:

    $ service docker reload

Build and install from source (on Fedora)

  1. Install crun-vm's runtime dependencies:

    $ dnf install bash coreutils crun genisoimage grep libselinux-devel libvirt-client libvirt-daemon-driver-qemu libvirt-daemon-log openssh-clients qemu-img qemu-system-x86-core shadow-utils util-linux virtiofsd
  2. Install Rust and Cargo if you do not already have Rust tooling available:

    $ dnf install cargo
  3. Build crun-vm:

    $ cargo build
  4. Copy the target/debug/crun-vm binary to wherever you prefer:

    $ cp target/debug/crun-vm /usr/local/bin/
  5. If you're using Podman:

    • Merge the following configuration into /etc/containers/containers.conf:

      For rootless Podman, you can instead use ${XDG_CONFIG_PATH}/containers/containers.conf, where $XDG_CONFIG_PATH defaults to ${HOME}/.config.

      [engine.runtimes]
      crun-vm = ["/usr/local/bin/crun-vm"]

    If you're using Docker:

    • Merge the following configuration into /etc/docker/daemon.json:

      {
        "runtimes": {
          "crun-vm": {
            "path": "/usr/local/bin/crun-vm"
          }
        }
      }
    • Reload the docker service for the new configuration to take effect:

      $ service docker reload

With Podman, it is possible to use crun-vm without installing it, i.e., performing only steps 1–3 above. In this case, instead of setting the runtime with --runtime crun-vm, specify an absolute path to the runtime binary: --runtime "$PWD"/target/debug/crun-vm.