firecracker README

The project's README from github.com/firecracker-microvm/firecracker. As one markdown file: README.md.

Firecracker Logo Title

Our mission is to enable secure, multi-tenant, minimal-overhead execution of container and function workloads.

Read more about the Firecracker Charter here.

What is Firecracker?

Firecracker is an open source virtualization technology that is purpose-built for creating and managing secure, multi-tenant container and function-based services that provide serverless operational models. Firecracker runs workloads in lightweight virtual machines, called microVMs, which combine the security and isolation properties provided by hardware virtualization technology with the speed and flexibility of containers.

Overview

The main component of Firecracker is a virtual machine monitor (VMM) that uses the Linux Kernel Virtual Machine (KVM) to create and run microVMs. Firecracker has a minimalist design. It excludes unnecessary devices and guest-facing functionality to reduce the memory footprint and attack surface area of each microVM. This improves security, decreases the startup time, and increases hardware utilization. Firecracker has also been integrated in container runtimes, for example Kata Containers and Flintlock.

Firecracker was developed at Amazon Web Services to accelerate the speed and efficiency of services like AWS Lambda and AWS Fargate. Firecracker is open sourced under Apache version 2.0.

To read more about Firecracker, check out firecracker-microvm.io.

Getting Started

To get started with Firecracker, download the latest release binaries or build it from source.

You can build Firecracker on any Unix/Linux system that has Docker running (we use a development container) and bash installed, as follows:

git clone https://github.com/firecracker-microvm/firecracker
cd firecracker
tools/devtool build
toolchain="$(uname -m)-unknown-linux-musl"

The Firecracker binary will be placed at build/cargo_target/${toolchain}/debug/firecracker. For more information on building, testing, and running Firecracker, go to the quickstart guide.

The overall security of Firecracker microVMs, including the ability to meet the criteria for safe multi-tenant computing, depends on a well configured Linux host operating system. A configuration that we believe meets this bar is included in the production host setup document.

Contributing

Firecracker is already running production workloads within AWS, but it's still Day 1 on the journey guided by our mission. There's a lot more to build and we welcome all contributions.

To contribute to Firecracker, check out the development setup section in the getting started guide and then the Firecracker contribution guidelines.

Releases

New Firecracker versions are released via the GitHub repository releases page, typically every two or three months. A history of changes is recorded in our changelog.

The Firecracker release policy is detailed here.

Design

Firecracker's overall architecture is described in the design document.

Features & Capabilities

Firecracker consists of a single micro Virtual Machine Manager process that exposes an API endpoint to the host once started. The API is specified in OpenAPI format. Read more about it in the API docs.

The API endpoint can be used to:

Built-in Capabilities:

Tested platforms

We test all combinations of:

Instance Host OS & Kernel Guest Rootfs Guest Kernel
m5n.metal (Intel Cascade Lake) al2 linux_5.10 ubuntu 24.04 linux_5.10
m6i.metal (Intel Ice Lake) al2023 linux_6.1 linux_6.1
al2023 linux_6.18
m7i.metal-24xl (Intel Sapphire Rapids)
m7i.metal-48xl (Intel Sapphire Rapids)
m8i.metal-48xl (Intel Granite Rapids)*
m8i.metal-96xl (Intel Granite Rapids)*
m6a.metal (AMD Milan)
m7a.metal-48xl (AMD Genoa)
m6g.metal (Graviton 2)
m7g.metal (Graviton 3)
m8g.metal-24xl (Graviton 4)
m8g.metal-48xl (Graviton 4)
m9g.metal-48xl (Graviton 5)

*: We only support AWS EC2 8th Gen Intel (*8i) instances using a 6.1 or 6.18 host kernel. This is due to poor kernel support for Granite Rapids CPUs on 5.10.

Known issues and Limitations

Performance

Firecracker's performance characteristics are listed as part of the specification documentation. All specifications are a part of our commitment to supporting container and function workloads in serverless operational models, and are therefore enforced via continuous integration testing.

Policy for Security Disclosures

The security of Firecracker is our top priority. If you suspect you have uncovered a vulnerability, contact us privately, as outlined in our security policy document; we will immediately prioritize your disclosure.

FAQ & Contact

Frequently asked questions are collected in our FAQ doc.

You can get in touch with the Firecracker community in the following ways:

When communicating within the Firecracker community, please mind our code of conduct.

firecracker (firecracker-microvm/firecracker)

Searching Database…

这是什么?Firecracker 是一项开源虚拟化技术,用于创建和管理安全的多租户 microVM,服务于基于容器和函数的无服务器工作负载。
这是容器运行时还是别的什么?它是一个虚拟机监视器(VMM),利用 Linux KVM 运行轻量级 microVM,把硬件虚拟化的安全性与接近容器的启动速度结合在一起;它已被集成到 Kata Containers、Flintlock 等容器运行时中。
我该怎么让它跑起来?在任何 Unix/Linux 系统上,可以下载最新版本的二进制文件,或者使用 Docker(开发容器)和 bash 从源代码构建;构建产物位于 build/cargotarget/${toolchain}/debug/firecracker。
我需要 KVM 和特定的主机环境吗?需要。它要求主机上有 Linux KVM 子系统;若要安全地多租户使用,还依赖于配置妥当的主机操作系统,具体见生产环境主机设置文档。
有哪些我应该知道的已知限制?在 aarch64 上,pl031 RTC 设备不支持中断,因此依赖 RTC 闹钟的客户机程序(如 hwclock)无法正常工作;此外,它只在特定的 AWS EC2 metal 实例与内核组合上做过测试。
它在 Intel 和 ARM 硬件上都能用吗?可以。它已在 Intel(Cascade Lake、Ice Lake、Sapphire Rapids、Granite Rapids)、AMD(Milan、Genoa)以及 AWS Graviton(ARM)metal 实例上完成测试。
Jailer 如何提升安全性?在生产环境中,Jailer 进程会启动 Firecracker,先施加 cgroup/命名空间隔离屏障,然后在 microVM 运行前降低权限。
我能通过 API 配置哪些内容?API 端点允许你设置 vCPU 数量、内存大小、CPU 模板、网络接口、带速率限制器的文件后端块设备、vsock 套接字、熵设备和 pmem 设备、内存热插拔,甚至可以在运行时热插拔 virtio PCI 设备,还能配置日志和指标。
这些 microVM 有多快、多轻量?microVM 默认配置为 1 个 vCPU 和 128 MiB 内存,默认采用按需缺页分页和 CPU 超售;其设计目标是通过排除不必要的设备来尽量缩短启动时间、减小攻击面。
新版本多久发布一次?Firecracker 新版本大约每两到三个月通过 GitHub 发布,变更记录在更新日志中。
What are similar projects?motor-os, ftl, CubeSandbox, open-compute, smolvm, allox-os, arcbox, gvisor
Size
42.3 MB
Stars
37.5K
Age
8y
Commits · 90 Days