Forky Pig is my experiment in turning a single machine into a miniature cloud.
It’s a system that can spawn, snapshot, and fork virtual machines in milliseconds, using QEMU, copy-on-write overlays, and a bit of Python orchestration magic.
It’s not production-ready, not optimized, and definitely not perfect — but it’s real, and it works. The point isn’t to chase scale yet; it’s to explore what “forking” compute really means when you treat VMs like living processes instead of static boxes.
Forky Pig can:
- Cold fork: snapshot a paused VM and clone it instantly.
- Spin up isolated compute environments using overlays, so every fork shares a base image but keeps its own writable state.
- Manage and orchestrate VMs via lightweight Python daemons (controller and hostd) that talk over gRPC and QMP.
- Experiment with future compute ideas — like hot forking, GPU passthrough, and distributed hypercomputing.
“Git for VMs, with QEMU as the kernel and Python as the glue.”
Because containers are great — until they aren’t.
Because GPUs are scarce and orchestration is broken.
Because I wanted to see what would happen if you could fork a machine like a process — instantly, cleanly, and predictably.
Forky Pig started as a joke, but it’s becoming a serious playground for the next generation of distributed systems — where compute is treated as something fluid, not fixed.
Each host runs hostd, which controls its local QEMU instances.
The controller issues fork/snapshot commands through gRPC and tracks metadata.
Everything else is just files and processes — no Kubernetes, no magic.
- Create a base VM image (.qcow2)
- Launch a parent VM via the controller
- Call cold_fork()
- Watch it spin up children VMs sharing the same base image
You can literally fork a live environment in seconds.
No rebuilds, no redeploys — just a clean new world spun off from the last one.
| Cold forking | ✅ Works |
| Hot forking | 🚧 Experimenting |
| Snapshot chains | 🧊 Stable |
| GPU support | 🔥 Researching |
| App-directory overlays | 🧩 Debating |
| Multi-host orchestration | 💭 Planned |
- Python 3 (asyncio, gRPC)
- QEMU / QMP
- qcow2 overlays
- Linux KSM (for deduplication)
- Bash & a bit of insanity
Forky Pig isn’t about reinventing the wheel —
it’s about spinning up thousands of wheels instantly
and seeing what they can build together.
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/
Some of theses were required to get the system running. KSM is the paging de-duplication
Use this to actually run the code for now. See the run.sh for how a client could look
.png)

![Claude Code modernizes a legacy COBOL codebase [video]](https://www.youtube.com/img/desktop/supported_browsers/edgium.png)