trailofbits / trailofbits/coop

Persistent volumes across VM restarts

Open
#4 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
243
Forks
13
Avg merge
1d 20h
Merged PRs (30d)
30

Description

Currently all VM state is lost on destroy. For longer sessions, cold caches (pip, npm, cargo, Docker layers) on every new VM could add friction.

Before implementing, validate that this is a real pain point and that it can be done securely:

Open questions:

  • How much time do cold caches actually cost in practice? Profiles already pre-install packages into the golden image, and VMs typically live hours/days.
  • Can a persistent volume become a vector for state pollution between sessions? A compromised VM could plant artifacts that affect the next session.
  • How do we handle volume corruption (unclean shutdown, full disk)?
  • Should volumes be per-project, per-image, or global?

Implementation path if justified:

  • Firecracker: second block device (/dev/vdb), stored outside the instance directory so destroy preserves it
  • Lima: limactl disk create with raw format for VZ compatibility
  • Guest: bind-mount subdirs to /var/lib/docker, ~/.cache/pip, ~/.npm, etc.
  • destroy preserves volumes by default, --volumes flag to explicitly delete

This should only be built if real users report cache warmup as a significant pain point, and the security model is well-defined.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by validating whether cold cache warmup is a significant user pain point, then investigate the Firecracker and Lima volume options described in the issue. Define the security model, isolation scope, corruption handling, and destroy behavior; the work is justified only if user evidence supports it and these questions have clear answers.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, rust
Domain
cli, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.