Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cocoon

> DevOps
Open source

Lightweight MicroVM engine built on Cloud Hypervisor. Features include OCI and cloud image support, instant snapshot and clone via reflink, Windows 11 guest sup

182 stars0 likes1 views
WebsiteGitHub

About

Lightweight MicroVM engine built on Cloud Hypervisor. Features include OCI and cloud image support, instant snapshot and clone via reflink, Windows 11 guest sup

Cocoon

Lightweight MicroVM engine with dual hypervisor backends: Cloud Hypervisor (default) and Firecracker.

Documentation: cocoonstack.github.io/cocoon (source in docs/).

Highlights

  • OCI VM images — pull container-registry images with kernel + rootfs layers, content-addressed EROFS blob cache; cloud images from HTTP(S) URLs with automatic qcow2 conversion; local file/stdin import
  • Docker-like CLI — create, run, start, stop, list, inspect, console, exec, rm, clone, status
  • Snapshot & clone — capture a running VM (memory, disks, config) and clone it into new VMs with fresh network identity; clones restore memory copy-on-write by default (page cache shared across sibling clones) and hold shared source leases so parallel clone bursts survive concurrent source removal; restore and atomic hibernate in place; portable export/import between hosts
  • CNI networking — multi-queue virtio-net TAPs wired via TC redirect (no bridge in the data path), multi-NIC, bridge mode, NIC hot-resize
  • Data disks & runtime attach — extra virtio-blk disks at create/clone time; hot-plug vhost-user-fs shares and VFIO PCI devices (CH); external raw disks and NIC resize on CH or Firecracker --pci VMs
  • Windows guests — UEFI + Hyper-V enlightenments via the cocoonstack CH/firmware forks
  • Firecracker backend — --fc for ~125ms boots and <5 MiB per-VM overhead (OCI images only)
  • Daemon-optional architecture — one hypervisor process per VM, every command standalone; cocoon daemon optionally adopts running VMs to converge crashes as they happen; modular lock-safe GC with snapshot LRU eviction
  • Switchable metadata engine — sqlite by default (fresh roots bootstrap themselves; flat performance at high VM counts), legacy json roots keep working as-is; crash-resumable offline conversion both ways (cocoon meta convert)

Quick Start

…

Full walkthroughs: Installation · CLI reference · Images · VM lifecycle · Networking · Snapshots & clone · Device attach · Windows · Firecracker · GC · Daemon · OS images · Known issues

Development

bash
make build    # Build cocoon binary (CGO_ENABLED=0)
make test     # Run tests with race detector and coverage
make lint     # Run golangci-lint (GOOS=linux + darwin)
make fmt      # Format code with gofumpt + goimports
make all      # Full pipeline: deps + fmt + lint + test + build

License

This project is licensed under the MIT License. See LICENSE.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goaiai-sandboxclonecloud-desktop

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理