2.2 KiB
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
dockerservice for the new configuration to take effect:$ service docker reload
Build and install from source (on Fedora)
-
Install crun-vm's runtime dependencies:
$ dnf install bash coreutils crun crun-krun genisoimage grep libselinux-devel libvirt-client libvirt-daemon-driver-qemu libvirt-daemon-log openssh-clients qemu-img qemu-system-x86-core sed shadow-utils util-linux virtiofsd -
Install Rust and Cargo if you do not already have Rust tooling available:
$ dnf install cargo -
Build crun-vm:
$ cargo build -
Copy the
target/debug/crun-vmbinary to wherever you prefer:$ cp target/debug/crun-vm /usr/local/bin/ -
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_PATHdefaults 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
dockerservice 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.