gitmyhub

machinen.dev

TypeScript ★ 139 updated 6d ago

Pause, resume, fork Linux VMs across hosts

Machinen is a tool that lets you freeze a running Linux virtual machine (VM), move it to a different computer, and resume it exactly where it left off — down to the in-memory state of running programs. It is like putting a laptop to sleep and waking it up on a different machine, with all open programs, data in memory, and network connections intact.

The core use case is workload migration: you might be developing on your laptop, hit the limits of its resources, and want to hand off a long-running process to a more powerful server without restarting anything. You freeze the VM on the laptop (called a snapshot), copy the snapshot file to the server, and restore it there. The program picks up running from the exact moment you froze it.

Beyond simple migration, the tool supports forking — creating a copy of a running VM without stopping the original. Both the original and the copy then run independently from the same memory state. This is useful for things like parallelizing a computation by branching a single warmed-up process into multiple workers, or cloning a test environment that took a long time to set up.

The tool is distributed as a Node.js package, so you install it with npm. It runs on ARM64-based systems — Apple Silicon Macs and ARM Linux servers. No system dependencies are required; the necessary virtual machine binary is downloaded automatically as part of installation. Node.js is the primary target, but any program that can run inside a Linux VM works.

The source code is not yet published at the time of this README. The license is Functional Source License, which converts to MIT two years after each release.