Skip to main content

Using the CLI and REST API

FluxVM is primarily a CLI + REST control plane (port 7788). Day-2 orchestration UI lives in Zyvor Fabric (:9095). This page maps common jobs to both surfaces.

CLI cheat sheet​

JobCommand
Createfluxctl create --spec examples/qemu.json
Listfluxctl list
Exec (Linux agent)fluxctl exec <id> -- cmd
QGA (Windows)fluxctl qga ping|powershell|firewall-open <id> …
Deletefluxctl delete <id>
Restart / rename / labelfluxctl restart|rename-vm|label <vm> …
Bulk by labelfluxctl list -l env=dev, fluxctl stop -l env=dev (delete -l needs --yes)
Wait for statefluxctl wait <vm> --for running --timeout 120
Clonefluxctl clone-vm <stopped-vm> <new-name>
Disksfluxctl disk list|attach|resize|detach <vm> …
Serial consolefluxctl serial <vm> (Ctrl-] quits)
Backupfluxctl backup <vm> [--compress] [--all-disks] [--dest f.qcow2]
Snapshotsfluxctl snapshot|snapshot-list|snapshot-delete <vm> …
VM templatesfluxctl vm-template save|list|show|delete|create …
Events / quotafluxctl events -f, fluxctl quota
Remote hostfluxctl --server http://host:7788 list, or fluxctl context add|use …
Output format-o json|table|wide on every command
Build imagefluxctl build-image --spec examples/build-image.json
Poolfluxctl pool create|claim|list …
Serve APIfluxctl serve

Always pass --config /etc/fluxvm.toml when not using defaults.

REST basics​

export API=http://127.0.0.1:7788
export AUTH=(-H "Authorization: Bearer $TOKEN") # if auth.enabled

curl -sf "$API/readyz" | jq .
curl -sf "${AUTH[@]}" "$API/v1/vms" | jq .
curl -sf "${AUTH[@]}" -H "Content-Type: application/json" \
-d @examples/qemu.json "$API/v1/vms"

Auth-exempt: /healthz, /readyz, /v1/openapi.json. Everything else needs a bearer token when [auth] require = true.

When to use Fabric instead​

NeedUse
Browser console, fleet UX, DRS, backups UIFabric /app/*
Maglev service CRUD with multi-node leasesFabric Edge Dataplane → Services
Per-VM eBPF policy from a consoleFabric VM → Dataplane tab
Single-host lab / CI scriptsFluxVM CLI/REST directly

Fabric user guides: fabric docs/user.