| Global options |
flash |
--dir PATH
-h, --help
-V, --version |
Selects the VM registry. Linux: /run/flashvm for root, $XDG_RUNTIME_DIR/flashvm for other users. macOS: $FLASHVM_API_DIR, else the per-user registry. Windows: named pipes \\.\pipe\flashvm-<id>. Help and version output are available globally. |
| Create, restore, and scale |
run |
--bundle PATH (required)
--vcpus N (required)
--mem-mib N (required)
--id NAME
--mem-region-mib N
--cpu-millis N (optional cap)
--disk-mib N (optional cap)
--disk-bps N (optional cap)
--disk-iops N (optional cap)
--boot-grace-ms N
--kernel-cmdline STRING
--nic tap=NAME[,mbps=N][,pps=N][,ingress-mbps=N][,ip=CIDR,gateway=ADDR] (repeatable; rates optional)
--share host_dir=DIR,tag=TAG,at=PATH
--entry PATH
--entry-arg N
--engine NAME (macOS: hvf default, or vz — Rosetta + virtio-fs, NIC caps only)
--cpu-template NAME
--vmm PATH
--detach
--pool
--disable-dirty-tracking (default off — diagnostic/tuning escape hatch, see note below)
--http-port PORT (guest HTTP channel, for guest http)
--messaging-topics a,b|* (guest messaging, for guest send/recv)
--egress all|none|public|deny:...|allow:... or --egress-file FILE (what the VM may reach; see connections) |
Boots a FlashVM from a kernel and root filesystem bundle. A cap you pass is enforced; a cap you omit is not applied — nothing is defaulted; --detach returns after acceptance, while --pool prepares a warm spare for a later claim. --disable-dirty-tracking skips dirty-page write-protection on this VM's memory — cheaper for write-heavy workloads (measured up to ~2x fewer page faults), but this VM can never be the source of a diff snapshot afterward. Only set it with a measured reason, never as a general speed guess; leave it off for anything live migration or snapshot/restore depends on. --http-port and --messaging-topics turn on the guest bridge at creation (* = every topic); without them guest http answers 503 and messages are not delivered. |
restore |
--from PATH or --from-url URL
--total BYTES (required with --from-url)
--bundle PATH (required)
--vcpus N (required; must match the capture)
--mem-mib N (required; must match the capture)
--id NAME
--cpu-millis N (optional cap)
--disk-mib N (optional cap)
--disk-bps N (optional cap)
--disk-iops N (optional cap)
--nic SPEC (repeatable)
--share SPEC
--cpu-template NAME
--vmm PATH
--allow-bundle-mismatch
--detach
--disable-dirty-tracking (default off)
--diff-base PATH-or-URL (optional — see note below) |
Rebuilds the captured VM from a local snapshot or a signed remote snapshot. The bundle and device configuration are supplied at restore time; CPU and memory topology must match the capture. --disable-dirty-tracking here is a stronger commitment than on run: it makes the restored VM permanently unable to serve a future diff snapshot, not just this session's. --diff-base binds this VM to a base snapshot so its NEXT flash snapshot captures only dirtied pages instead of a full image — measured on a real workload, a diff was 2% the size of a full capture and restored to fully correct state. Typically the same path/URL given to --from/--from-url. |
clone |
Same parameters as restore |
Creates a new FlashVM from a snapshot without changing the source VM. Give each clone its own ID and network identity. |
fork |
parent
--count N (1–64, default 1)
--id NAME (only with --count 1)
--nic pool=ID|tap=NAME,... (repeatable; one per child)
--messaging-topics a,b|* |
Branches a RUNNING VM into N children that continue from its state this instant; the parent keeps running. A parent started with run --forkable forks with its RAM frozen in place, and later forks are diffs. Messaging grants are not inherited. |
claim |
id
--entry PATH
--entry-arg N (default 0)
--from PATH
--bundle PATH (required with --from)
--identity STRING (required with --from)
--tenant STRING (required with --from)
--disk-mib N (optional cap)
--cpu-millis N (optional cap)
--claim-id N |
Assigns a workload and its resource reservation to a warm spare created with flash run --pool, then wakes it for immediate use. --from hands the spare a snapshot to become instead of a program to run — restore-via-claim, arm64 hosts only — so the spare's own pre-claim state is discarded, not carried over; mutually exclusive with --entry/--entry-arg. |
| Operate and observe |
ls |
None |
Lists the FlashVMs registered on the machine and reports the current state of each endpoint. |
logs |
id
--stream run|console
--since N
--since-console N
--limit N |
Reads a VM's workload log, guest console, or merged output. Cursor parameters support incremental collection without replaying earlier lines. |
inspect |
id
--nic INDEX |
Shows a VM's state, boot data, resource configuration, devices, share, and source. --nic adds detailed counters for one interface. |
metrics |
id
--window SECONDS |
Returns the VM's CPU, memory, disk, and network measurements in one call. --window sets the freshness limit for guest-reported fields. |
connections |
id
--nic N (default 0)
--since SEQ
--follow
--for S
--json |
The VM's outbound connections and DNS questions, allowed or refused, with the reason and bytes sent — what --egress decided. |
watch |
id
--stream lifecycle|logs|metrics|guest (default lifecycle)
--for SECONDS |
Streams lifecycle events, logs, metrics, or guest messages until interrupted or until the requested duration elapses. |
pause |
id
--max-ms N |
Freezes a guest for a bounded interval. The VM resumes automatically when the interval expires. |
resume |
id |
Returns a paused guest to the running state. |
stop |
id |
Stops the VM and closes its per-VM control socket. |
set |
id
--cpu-millis N
--boot-grace-ms N
--mem-mib N
--disk-mib N
--disk-bps N
--disk-iops N
--nic INDEX
--mbps N
--pps N
--ingress-mbps N |
Updates live CPU, disk, or per-NIC limits; only the flags you pass change. NIC rate parameters require --nic; a rate of 0 removes that cap. Guest RAM is fixed at creation, so use balloon to reclaim pages, or mem to resize a reserved region live, while a VM is running. |
balloon |
id
--target-pages N |
Asks the guest to return memory pages to the host. Without a target, it reads the latest balloon request and result. |
mem |
id
--target-mib N |
Sets the live target for a virtio-mem region created with --mem-region-mib. Without a target, it reads the region's size, block granularity, requested size, and what's actually plugged in. |
snapshot |
id
--path PATH (required) |
Captures a VM's execution state to a snapshot file and waits for the operation to complete. |
snapshots ls |
id |
Lists the snapshots created by a VM. |
snapshots show |
id
snapshot |
Shows one snapshot's identity, size, and base information. |
snapshots rm |
id
snapshot |
Deletes the selected snapshot. |
| Devices and workload access |
nic add |
id
--tap NAME |
Requests a NIC topology change. NICs are attached when a VM is created; use run, restore, or clone --nic to define them, and set --nic to change live rate limits. |
nic rm |
id
index |
Requests removal of a NIC by index. The VM's NIC topology remains fixed for its lifetime. |
share show |
id |
Shows the VM's virtio-9p host-directory share. |
share add |
id
--host-dir PATH
--tag NAME
--guest-path PATH |
Requests a host-directory share. The share is a creation-time device; configure it with run, restore, or clone --share. |
share rm |
id |
Requests removal of the virtio-9p share. Share topology remains fixed for the VM's lifetime. |
source show |
id |
Shows the bundle, local snapshot, or remote snapshot source used to create the VM. |
source resign |
id
--url URL (required)
--total BYTES (required) |
Replaces an expiring remote snapshot URL after confirming that the new URL identifies the same snapshot bytes. |
guest http |
id
path
--method METHOD (default GET)
--body STRING
--body-file PATH
--out PATH |
Sends an HTTP-style method, path, and body to the workload over the guest control channel. --body-file and --out carry binary bodies byte for byte (base64 on the wire when not UTF-8). |
guest send |
id
topic
payload or --payload-file PATH
--from N (default 0) |
Publishes a topic and payload to the workload with an optional sender identity. --payload-file sends binary payloads byte for byte. |
guest recv |
id
--for SECONDS |
Streams messages published by the guest until interrupted or until the requested duration elapses. |
exec |
id
-- CMD ARGS... (required)
--timeout S (default 300)
--cwd DIR
--env K=V (repeatable)
--stdin FILE|-
--json |
Runs a command inside the VM. stdout and stderr stream back and flash exits with the command's code (124 timed out, 137 killed); --json prints one object instead. Ctrl-C kills the exec. |
execs |
id
exec (optional)
--kill
--rm |
Lists a VM's execs, or shows one. --kill kills its process tree and keeps the record; --rm removes the record (killing first if needed). |
cp |
src dst (one is ID:/path) |
Copies a file or a directory tree into or out of the VM, keeping permissions. Up to 1 GiB per file. |
del |
ID:/path
-r, --recursive |
Deletes a file, link or empty directory in the VM; -r deletes a tree. / and any path resolving to it is refused. |
bundle inspect |
path |
Reads what a bundle directory declares about itself (kernel, rootfs, capabilities) before flash run touches it. |
Warm pools (flashpoold) |
pool create / ls / show / set / add / rm |
--vcpus N, --mem-mib N (required on create) optional caps: --cpu-millis, --disk-mib, --disk-bps, --disk-iops, NIC rates
--count N, --wait-idle SECONDS
set --drain / --undrain / --resume-refill |
Creates and manages warm pools of parked spares served by flashpoold over one socket (Linux, macOS) or pipe (Windows). Members are ordinary flash run --pool VMs; claim one with flash claim. |
| Lifecycle and maintenance |
version |
id |
Reports the selected VM's VMM version and supported artifact formats. Use flash --version for the CLI version. |
rm |
id |
Stops and removes a VM; the control socket disappearing confirms that the process is gone. |
reap |
None |
Removes stale registry sockets whose VM process is no longer reachable while leaving inaccessible endpoints untouched. |
self-update |
--dry-run
--status
--show-trust
--install-timer
--interval SPAN (default 15min)
--force |
Checks or installs the signed FlashVMM release, displays the compiled-in trust anchor, or enables scheduled updates. Artifacts are signature- and checksum-verified before replacement, and running VMs continue uninterrupted. |
gpu info / pool / grant / version |
--socket PATH (default $FLASHGPUD_SOCKET, else beside the registry) |
GPU pools through flashgpud: the host's GPU backend, models loaded on the host GPU and shared by VMs over their NIC (flash run --gpu-pool), and per-VM grants. |
demo |
run [N] | rehearse | preflight | reset |
FlashVMM one feature at a time, in 23 scenarios: each explained in plain words, its exact command shown, run when you press Enter. VMs, networking and network walls, shared folders, live changes, pools, snapshots, clones, forks, hidden API keys, the GPU pool and MCP. run N starts at scenario N, rehearse runs it unattended, reset cleans up. |