Hosts
A host runs agent machines. Hosts are cluster nodes with the worker role (either worker-only
or converged with controlplane).
Configure a Linux worker
Section titled “Configure a Linux worker”[node]name = "w1"roles = ["worker"] # or ["controlplane", "worker"]install_disk = "/dev/disk/by-id/nvme-…"
[node.worker]max_cpu = "90%" # percentage or CPU countmax_memory = "85%" # percentage or size, e.g. "48GiB"vm_disk = "/dev/disk/by-id/nvme-…" # dedicated disk for machine disks and saved statetaints = ["gpu:dedicated"] # optional| Key | Meaning |
|---|---|
max_cpu, max_memory |
Total cap for all machines on the host (also enforced on workloads.slice). Unset defaults to everything left after Postgres and 2 GiB for the OS. |
vm_disk |
Dedicated disk for VM state (formatted if empty). Without it, machines share a disk image taking half the install disk. Required on multi-node converged nodes. |
taints |
Only machines with matching tolerations schedule here. |
Nodes refuse worker configs if /dev/kvm is missing or if max_memory plus Postgres leaves less
than 2 GiB for the OS. Updates to [node.worker] apply live—hostagent restarts while existing
machines keep running.
Add a worker-only node
Section titled “Add a worker-only node”- Write
nodes/w1.tomlas above, setting[node.iroh] relay_urlto one of your control-plane nodes’ relays so the worker can always reach the control plane even without a direct UDP path. - Boot it from the installer and install it:
Terminal window anastroctl cluster apply -n w1 --maintenance <ticket> - Paste the printed node entry into your client file, then apply the cluster so control-plane
nodes trust the new worker’s endpoint:
Terminal window anastroctl cluster apply - Confirm it registered with
anastroctl cluster host list.
Worker-only nodes don’t run Postgres or apid and accept only operator keys on their node API—pass
--as-operator when querying them (e.g. anastroctl node status -n w1 --as-operator).
Dedicated worker capabilities
Section titled “Dedicated worker capabilities”Machines can request named worker capabilities (--capability gpu:cuda, usb:lab), and
the scheduler only places them on hosts advertising every requested capability. Projects can set
machine defaults that individual machines can override.
Linux GPU and USB controllers
Section titled “Linux GPU and USB controllers”PCI passthrough requires a dedicated Linux worker (not a converged node). Enable IOMMU in
firmware and Linux, bind every device in the target IOMMU group to vfio-pci before hostagent
starts, and map capabilities to their sysfs PCI paths:
[node.worker.devices]"gpu:cuda" = "/sys/bus/pci/devices/0000:01:00.0""usb:lab" = "/sys/bus/pci/devices/0000:02:00.0"Use your actual host PCI addresses. Notes:
- GPU and USB capabilities must be declared under
[node.worker.devices](not just listed innode.worker.capabilities). - USB passthrough assigns an entire PCI USB controller—individual
/dev/bus/usbpaths are refused. - Assigned devices stay reserved exclusively, even while a failed machine waits to retry.
- GPU machines need a Nix guest image containing matching drivers.
- Device-backed machines cannot live-move or save VM memory across host restarts.
Scheduling and placement
Section titled “Scheduling and placement”Among hosts that match a machine’s capabilities, tolerations, and resource limits, the scheduler prefers:
- Dedicated workers over converged nodes.
- Hosts that already have the machine’s environment cached.
- The host with the most free memory.
Whenever at least one dedicated worker exists, converged nodes automatically carry the
controlplane:trusted-only taint; machines only schedule there with
--toleration controlplane:trusted-only.
Cordon, drain, and rebalance
Section titled “Cordon, drain, and rebalance”anastroctl cluster host list # hosts, status, and resource usageanastroctl cluster host cordon w1 # stop placing new machines on w1anastroctl cluster host uncordon w1anastroctl cluster host drain w1 # cordon and live-move all machines off w1anastroctl cluster host rebalance # spread running machines evenly with live movesBy default, drain live-moves machines off the host a few at a time without interrupting them. If a
machine cannot live-move, the drain waits rather than stopping it unless you pass a flag:
| Flag | Behavior |
|---|---|
--graceful |
Checkpoint, stop, and cold-boot machines on another host instead of live-moving |
--allow-stop |
Move non-migratable machines gracefully; stop machines that don’t fit anywhere (they resume on next use) |
--no-wait |
Trigger moves and return immediately |
--timeout <seconds> |
Max wait time (default 1800) |
cluster apply --reboot, cluster upgrade, and node reset drain workers automatically before
rebooting and uncordon them once healthy, using [machines.drain]:
[machines.drain]parallel = 2 # concurrent live moves per hostmax_pause = "1s" # max freeze time during a live movetimeout = "30m" # fail rollout if machines remain after thison_no_capacity = "wait" # or "stop" to stop machines that can't fitrebalance = true # rebalance hosts after a rolloutOn a single-host cluster, running machines pause and save to vm_disk across reboots instead of
moving. A machine with no workspace cannot move and blocks drains.
Remove a worker
Section titled “Remove a worker”Drain the host, then remove its enrollment as a cluster admin (or use Fleet in the UI):
anastroctl cluster host drain w1anastroctl cluster host remove w1Removal fails safely if the host still has running machines, active moves, unexpired filesystem leases, or unuploaded workspace checkpoints. Once the runner stops and leases clear:
- Pass
--detach-stoppedif stopped DWFS machines remain on the host and their latest checkpoints are already Portable—they will resume on other hosts next time they’re used. - Any machine whose files live only on the host’s local disk must be migrated or explicitly deleted first.
Removal revokes the host’s filesystem grants and agent enrollment so old signed configs can’t
re-register it (re-admit later with anastroctl cluster host admit w1). Removing a converged node’s
worker enrollment leaves its control-plane, Postgres, and etcd membership intact.
What survives a live move
Section titled “What survives a live move”| Resource | Across a live move |
|---|---|
| Running processes, memory, open files | Preserved (pauses briefly, within max_pause) |
| Active commands and terminals | Preserved seamlessly |
| Machine IP and inbound traffic | Preserved |
Workspace (including excluded paths like node_modules/, target/) |
Preserved |
| Unlinked (deleted-while-open) workspace files | Lost—open readers get errors after the move |
| Outbound TCP connections | Reset (retry-capable clients like git and package managers recover automatically) |
Live moves require hosts in the same migration group (matching CPU architecture, model, and features) and never move to a host running an older Cloud Hypervisor.