Skip to main content

microVM manager built on Firecracker (Linux) and Apple Virtualization.framework (macOS)

Project description

Shuck

An open-source microVM manager built on Firecracker (Linux) and Apple Virtualization.framework (macOS).

  • Boot lightweight VMs in milliseconds
  • Execute commands, transfer files, open interactive shells
  • Stream serial console logs
  • Port forwarding with nftables NAT (Linux)
  • REST API + CLI
  • Cloud-init style userdata scripts

Status

Pre-1.0. The core feature set works and has test coverage, but:

  • The HTTP API, CLI flags, config schema, and on-disk state layout may change without a deprecation period.
  • The Linux/Firecracker backend is more mature than the macOS/Apple VZ backend.
  • It has not been run at scale or under production workloads.
  • Security features (token auth, rate limiting, encrypted secrets) exist but have had limited review. Don't expose the daemon to an untrusted network.

Useful for experimentation, local development, and CI. Not recommended for production.

Quick Start

Install

macOS (Homebrew):

brew install rvben/tap/shuck

Linux & macOS (installer script):

curl -sSfL https://raw.githubusercontent.com/rvben/shuck/main/install.sh | sh

Cross-platform (PyPI):

pip install shuck

Pinning a version: curl -sSfL https://raw.githubusercontent.com/rvben/shuck/main/install.sh | SHUCK_VERSION=v0.1.2 sh or pip install shuck==0.1.2.

First boot

# Fetch the default kernel + rootfs for this host
shuck images pull

# Start the daemon
shuck daemon &

# Boot a VM
shuck run --name hello --cpus 2 --memory 512

# Interact
shuck exec hello -- uname -a
shuck shell hello
shuck cp local.txt hello:/tmp/local.txt
shuck logs hello -f

# Clean up
shuck destroy hello

On Linux, shuck run needs firecracker on PATH. If it's missing, shuck prompts to download a pinned release into the data directory. For non-interactive use (CI, scripts), set SHUCK_AUTO_INSTALL_FIRECRACKER=1 to skip the prompt.

shuck images pull fetches the latest signed image set from the images-* GitHub Releases. If no image release is published yet for this arch, the command will fail — use the BYO path below in the meantime.

BYO kernel / rootfs

If you want to use your own images, pass --kernel and the rootfs path:

shuck run /path/to/rootfs.ext4 --kernel /path/to/vmlinux

Configuration

Copy config.example.toml to one of the discovery paths:

  1. ~/.config/shuck/config.toml (user)
  2. /etc/shuck/config.toml (system)

Or pass --config /path/to/config.toml explicitly. See config.example.toml for all available fields.

Platform Support

Platform Backend Networking Status
Linux x86_64 Firecracker TAP + nftables NAT, port forwarding Usable
macOS ARM64 Apple Virtualization.framework Shared NAT (VZ-managed) Experimental

Alternatives

shuck is one of several ways to run microVMs. Rough positioning:

Tool Backend Focus Notes
shuck Firecracker (Linux) + Apple VZ (macOS) Single-host VM manager with a REST API and CLI SQLite-backed state, port forwarding, guest agent over vsock.
Ignite Firecracker Docker-image-style workflow on Firecracker Archived by Weaveworks; Linux only.
firecracker-containerd Firecracker containerd runtime backed by microVMs Kubernetes-friendly; Linux only.
krunvm libkrun OCI-image microVMs on macOS No daemon; ephemeral per-command VMs.
Lima QEMU (+ VZ on macOS) Full Linux VMs as a dev environment Heavier than Firecracker; broader guest support.

Pick shuck if you want Firecracker on Linux with a matching Apple VZ path on macOS, driven by a single CLI + daemon.

Architecture

CLI (shuck) ──> REST API (shuck-api) ──> Core (shuck-core)
                                           ├── VMM (shuck-vmm)      Firecracker / Apple VZ
                                           ├── State (shuck-state)  SQLite persistence
                                           ├── Net (shuck-net)      TAP devices, IP allocation
                                           └── Storage (shuck-storage) Rootfs cloning
                                       Guest Agent (shuck-agent) ←── Proto (shuck-agent-proto)

Host-guest communication uses vsock (port 52). Messages are length-prefixed JSON with base64-encoded binary payloads.

Security

The daemon defaults to loopback-only. Don't bind it on a public interface without a bearer token and a terminating reverse proxy.

Troubleshooting

shuck run can't find firecracker (Linux) On a TTY, shuck prompts to download a pinned release. For scripted/CI use, set SHUCK_AUTO_INSTALL_FIRECRACKER=1 to skip the prompt, or install Firecracker yourself from the releases page.

shuck run reports kvm_init: permission denied (Linux) Add your user to the kvm group: sudo usermod -aG kvm $USER and re-login.

shuck run fails on macOS with a virtualization entitlement error The binary needs the com.apple.security.virtualization entitlement. pip, brew, and the installer script all ship a codesigned binary. If you built from source, run make install — it ad-hoc signs via shuck.entitlements.

macOS: VM boots but exits immediately Apple VZ needs an initramfs to mount the rootfs. If you're using custom images, make sure --initrd points at a matching initramfs (see guest/build-initramfs.sh).

shuck daemon binds but the CLI can't connect The CLI defaults to http://127.0.0.1:7777. If the daemon listens elsewhere, pass --api-url http://host:port (and --api-token if auth is enabled).

Rootfs edits don't take effect on macOS Use make update-rootfs to inject changes via debugfs (works in LXC and macOS). Loop-mounting doesn't work on macOS.

Development

Requires Rust 1.90+ and cargo-nextest.

make build          # Debug build
make build-release  # Release build (LTO, stripped)
make build-agent    # Static musl agent for guest VMs
make test           # Full test suite
make test-unit      # Unit tests only
make lint           # fmt-check + clippy
make check          # Type check
make install        # Install (auto-detects macOS, signs binary)

Running a Development VM

make run-daemon                     # Start daemon
make build-agent-aarch64            # Build ARM64 agent (macOS guests)
make update-rootfs                  # Inject agent into rootfs image

Systemd

A systemd unit file is provided at contrib/shuck.service.

Contributing

Issues and pull requests welcome. See CONTRIBUTING.md for the dev workflow and commit conventions.

License

See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shuck-0.1.4.tar.gz (183.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

shuck-0.1.4-py3-none-manylinux_2_28_x86_64.whl (7.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

shuck-0.1.4-py3-none-manylinux_2_28_aarch64.whl (7.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

shuck-0.1.4-py3-none-macosx_11_0_arm64.whl (7.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

shuck-0.1.4-py3-none-macosx_10_12_x86_64.whl (7.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file shuck-0.1.4.tar.gz.

File metadata

  • Download URL: shuck-0.1.4.tar.gz
  • Upload date:
  • Size: 183.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for shuck-0.1.4.tar.gz
Algorithm Hash digest
SHA256 44a2a1bfd48593fafa29d2a577d57de13a171349aed681b1eeb9771359def5eb
MD5 205993cb0d1892ad2047c9977da616ee
BLAKE2b-256 58a794574106a497c253cd35f6a26ae83ae413ac7bab4a9106e0bfd19b214306

See more details on using hashes here.

File details

Details for the file shuck-0.1.4-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for shuck-0.1.4-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a4efe66034d879eb0a5c4a52014da24cc87ce96863340396222b0ddf06788e6
MD5 71a926e0cf9428846692b8c46375482f
BLAKE2b-256 d4855cded0f2acc2fe45eca19d46ef59350e0f28b3ccbc712cf24eba9617da2e

See more details on using hashes here.

File details

Details for the file shuck-0.1.4-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for shuck-0.1.4-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 515bd4a841b454cb67ee071ee404c850eff35eb5e9f69b5167d2cd37d84486b0
MD5 e2b97a5557841377d603b8ff5a436b89
BLAKE2b-256 b1ef386cbb0a1f370266d74daa20e2789f08568f662ef0c0e1d78d87fa0084b4

See more details on using hashes here.

File details

Details for the file shuck-0.1.4-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: shuck-0.1.4-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 7.2 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for shuck-0.1.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6d829ce0758aad2e3d419ba5e06c458fecb13c6344ecf10de46c0505bdd2d69
MD5 8a88ee7caf0bbeaf0e261e83a52b57fd
BLAKE2b-256 905f5b52aeef68f343d1d2fec64464711fbf674e9abd33be67de8224e1180a77

See more details on using hashes here.

File details

Details for the file shuck-0.1.4-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for shuck-0.1.4-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 00e1d26933b2f55c2c42a33355b38699e37995690438861fa35382a219e36ece
MD5 31cd17b87e12eaf5bcee7f4a7c4b81f9
BLAKE2b-256 6a22fac736daf0d0f221fa793125bb859d5178ee831cdcfc53bf0e94892878d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page