Installation Guide
This guide covers the installation of firecracker-shim in various environments.
Prerequisites
Before installing, ensure your environment meets the following requirements:
Hardware / VM
- Architecture: x86_64 (AMD64)
- Virtualization: KVM support is required.
- Bare Metal: Enable VT-x/AMD-V in BIOS.
- Cloud (AWS): Use
.metalinstances (e.g.,c5.metal) OR instances with nested virtualization enabled. - Local (Linux): Verify with
kvm-okor checkls -la /dev/kvm.
Software
- OS: Linux (Kernel 4.14+, recommended 5.10+)
- Container Runtime:
containerd1.7+ - Kubernetes: 1.24+ (if using with K8s)
Installation Methods
Method 1: Kubernetes DaemonSet (Recommended)
The easiest way to install on a Kubernetes cluster. This deploys a privileged pod to every node that installs the necessary binaries and configuration.
-
Deploy the Installer:
-
Verify Installation: Check the logs of the installer pods:
You should see "Installation successful!".
-
Install RuntimeClass: Apply the RuntimeClass definition to allow pods to request this runtime.
Save asapiVersion: node.k8s.io/v1 kind: RuntimeClass metadata: name: firecracker handler: firecracker overhead: podFixed: memory: "64Mi" cpu: "100m" scheduling: nodeSelector: fc-cri.io/enabled: "true"runtime-class.yamland apply:
Method 2: Manual Installation (Linux Host)
For development or single-node setups without Kubernetes.
-
Download Release: Get the latest release from GitHub Releases.
-
Install Binaries:
-
Install Assets (Kernel & Rootfs): You need a compatible Linux kernel and a base rootfs for the VM.
Development/Test Assets:
sudo mkdir -p /var/lib/fc-cri/rootfs # Download test assets (example URLs - replace with your build or trusted source) # wget -O /var/lib/fc-cri/vmlinux https://s3.amazonaws.com/spec.ccfc.min/img/quickstart_guide/x86_64/kernels/vmlinux-5.10.186 # wget -O /var/lib/fc-cri/rootfs/base.ext4 https://...Alternatively, build them using
make kernelandmake rootfsin the repo. -
Install Config:
-
Configure containerd: Add the runtime plugin to
Restart containerd:/etc/containerd/config.toml:
Verifying Installation
1. Check Component Health
Use the fcctl tool to verify the runtime components.
Expected output:
[OK] Runtime is healthy
Components:
[OK] runtime_dir ok
[OK] kvm ok
[OK] firecracker ok
[OK] kernel ok
[OK] rootfs ok
2. Run a Test Pod
Create a pod using the firecracker runtime class.
apiVersion: v1
kind: Pod
metadata:
name: test-fc
spec:
runtimeClassName: firecracker
containers:
- name: nginx
image: nginx:alpine
If the pod reaches Running state, congratulations! You are running a container inside a Firecracker microVM.
3. Inspect the VM
On the worker node where the pod is running:
Uninstalling
DaemonSet Uninstall
kubectl delete -f https://github.com/PipeOpsHQ/firecracker-shim/releases/latest/download/firecracker-shim-installer.yaml
Note: This removes the installer, but binaries may persist on nodes depending on cleanup policy. To fully clean nodes, you may need to run a cleanup script.