Firecracker: Getting started
This post is about how to get started using Firecracker.
Introduction
WIP.
Create/Build Kernel
Get the Linux source code at v6.19 using the recommended guest Kernel configuration (see: https://github.com/firecracker-microvm/firecracker/tree/main/resources/guest_configs).
git clone https://github.com/torvalds/linux.git
cd linux
git checkout -b v6.19 v6.19
wget 'https://raw.githubusercontent.com/firecracker-microvm/firecracker/refs/heads/main/resources/guest_configs/microvm-kernel-ci-x86_64-6.1.config' -O .config
make olddefconfig
make vmlinuxIf the above fails at any point, please try either yes ““ | make oldconfig or make silentoldconfig before make vmlinux.
Create Linux rootfs image
Download pre-built Linux Kernel and rootfs
If you prefer a pre-built solution then execute the below:
# Download a linux kernel binary
wget https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.7/x86_64/vmlinux-5.10.204
# Download a rootfs
wget https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.7/x86_64/ubuntu-22.04.ext4
# Download the ssh key for the rootfs
wget https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.7/x86_64/ubuntu-22.04.id_rsa
# Set user read permission on the ssh key
chmod 400 ./ubuntu-22.04.id_rsaInternet within guest
Extra reading material.
https://github.com/firecracker-microvm/firecracker/blob/main/docs/network-setup.md#in-the-guest.
https://github.com/firecracker-microvm/firecracker/blob/main/docs/network-setup.md#on-the-host.
https://github.com/firecracker-microvm/firecracker/issues/1585.
Demo
https://github.com/firecracker-microvm/firecracker-demo/blob/main/start-firecracker.sh


