Skip to content

google/crosvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11,216 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

crosvm

crosvm logo

The ChromeOS Virtual Machine Monitor

License Documentation Matrix


crosvm is a secure, lightweight, and performant Virtual Machine Monitor (VMM) written in Rust. Originally developed for ChromeOS to run Linux (Crostini) and Android guests (ARCVM). It is now used across multiple products and platforms such as TerminalApp on Android, Cuttlefish and Windows.

crosvm focuses on security through strong isolation and a modern, memory-safe implementation. It leverages hardware-assisted virtualization to provide a robust execution environment for untrusted code.

🌟 Core Philosophy

  • Security First: Built with Rust's memory safety guarantees. Each virtual device can be run in its own sandboxed process with restricted system access.
  • Isolation: Uses Linux namespaces, seccomp filters, and Minijail to create a multi-layered security boundary.
  • Performance: Optimized for modern workloads with features like io_uring, vhost, and an internal async runtime (cros_async).
  • Portability: Supports multiple CPU architectures and hypervisor backends.

πŸ› οΈ Technical Specifications

Supported Architectures

  • x86_64
  • aarch64
  • riscv64

Supported Hypervisors

  • Linux/Android: KVM, Gunyah (Qualcomm), GenieZone (MediaTek), Halla (Exynos).
  • Windows: WHPX (Windows Hypervisor Platform), HAXM (Intel).

Virtio Device Support

crosvm implements a wide range of paravirtualized devices via the virtio standard:

  • Network: virtio-net with optional vhost and slirp backends.
  • Storage: virtio-block supporting raw, qcow2, zstd, and Android sparse formats.
  • Graphics: virtio-gpu with 2D and 3D acceleration (via virglrenderer, gfxstream, or vulkano).
  • Display/Input: Integrated virtio gpu cross domain support for wayland passthrough
  • Audio: virtio-snd with backends for CRAS (ChromeOS), AAudio (Android), and more.
  • File System: virtio-fs and virtio-9p.
  • Other: Console, RNG, Balloon, Vsock, TPM, Pmem, Video Decoder/Encoder, etc.

πŸ”’ Security Architecture

crosvm is designed with a "process-per-device" model:

  1. Main Process: Handles VM initialization and core orchestration.
  2. Device Processes: Each virtio device can be forked into its own process.
  3. Sandboxing: Each device process is jailed using Minijail:
    • Namespaces: VFS (pivot_root), PID, User, and Network isolation.
    • Seccomp: Strict BPF filters restrict syscalls to only those required by the specific device.
    • Capabilities: All unnecessary Linux capabilities are dropped.

πŸ“– Documentation

πŸš€ Getting Started

The recommended way to build and develop crosvm is using the provided development container.

Prerequisites

  • Linux: A modern kernel (5.x+) with KVM access.
  • Podman or Docker: Installed and configured.

Building

Use the dev container to build a release version of crosvm:

./tools/dev_container ./tools/build_release

Basic Usage

Follow this example usage to run a simple Linux guest.

🀝 Community & Support


crosvm is an open-source project licensed under the BSD-3-Clause License.

About

The Chrome OS Virtual Machine Monitor - Mirror of https://chromium.googlesource.com/crosvm/crosvm/

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 140