Skip to content

Metal

Metal is the host daemon for Atlas virtual machines. The metald process manages one Linux host.

Metal stores desired VM state, observes host state, and reconciles the difference. It owns runtime, storage, network, and cleanup work.

From desired state to a running VM

Architecture diagram
Loading diagram...

The API stores desired state before it returns 202 Accepted. A reconciler applies host changes after the response.

Why systemd owns VM processes

systemd runs each VM as a metal-vm@ unit. A metald restart does not stop a running guest.

Metal rebuilds its view from durable records, systemd, and ZFS after a restart. It does not rely on old process memory.

Start here

  1. Read Metal architecture to learn the state and ownership model.
  2. Read VM functionality to follow VM lifecycle states.
  3. Use integration testing to prepare a development host.
  4. Use Metal development before you submit a change.

Choose a subsystem

SubsystemResponsibilityGuide
VM managerDesired state, lifecycle, locks, and cleanupVM functionality
Firecracker runtimeProcess launch, jail, warm start, and saved stateFirecracker specification
StorageImages, ZFS disks, snapshots, and transfer stagingStorage
NetworkNamespaces, routes, traffic limits, and WG MeshNetworking
ReconcilerBounded passes that move state forwardReconciler specification
Host serviceController sync, image policy, and capacityHost specification
APIAtlas routes and node coordination routesHTTP API
MigrationDisk copy, cutover, finish, and rollbackMigration internals

Development requirements

Unit tests need Go. Host tests need Linux, root access, KVM, ZFS, systemd, iptables, and Atlas WG Mesh.

Run Go commands from metal/. The repository root is not a Go module.

Use the repository Go review guide for Go changes.

AGPL-3.0