Skip to content

Instantly share code, notes, and snippets.

@gabibeyer
Last active September 6, 2020 21:10
Show Gist options
  • Save gabibeyer/ae3f8ee5e7ebc4e1db9d9c26119ca861 to your computer and use it in GitHub Desktop.
Save gabibeyer/ae3f8ee5e7ebc4e1db9d9c26119ca861 to your computer and use it in GitHub Desktop.
podman with kata-runtime
#!/bin/bash
# running kata-runtime with podman on Fedora 28
# I used ccloudvm for my dev system (this is not required)
ccloudvm create --name podman --mem 4096 --cpus 2 fedora28
ccloudvm connect podman
# update system and install podman
sudo yum update
sudo yum install podman
# install kata-runtime from docs: https://github.com/kata-containers/documentation/blob/master/install/fedora-installation-guide.md
source /etc/os-release
ARCH=$(arch)
sudo dnf -y install dnf-plugins-core
sudo -E dnf config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/Fedora_${VERSION_ID}/home:katacontainers:releases:${ARCH}:master.repo"
sudo -E dnf -y install kata-runtime
# disable selinux
sudo vi /etc/selinux/config
SELINUX=disabled
sudo reboot
# run podman with kata-runtime passed in
sudo -E podman run -it --runtime=/usr/bin/kata-runtime alpine sh
# check kernel version from within podman container to see kata-runtime used
cat /proc/version
# Linux version 4.19.24-21.1.container (katabuilduser@katabuildhost) (gcc version 8.0.1 20180324 (Red Hat 8.0.1-0.20) (GCC)) #1 SMP Thu Jan 1 00:00:00 UTC 1970
# or from fedora host, with podman container running, see qemu version running (kata runs qemu-lite-system)
ps -ae | grep qemu
# 999 ? 00:00:14 qemu-lite-syste
# 2433 ? 00:00:01 qemu-lite-syste
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment