Read a machine’s logs
instabox logs prints a machine’s console log and its last 20 operations (create, start, stop, pause,
and resume, with their errors). Reading the log works in every state and never wakes the machine.
/dev/console, and errors from the VM monitor. The host keeps the last 8 MiB across stops, pauses, and
restarts.
A command’s own output is kept with its background job. To read the full guest journal, run
journalctl over exec.
Over the API
Over the API
GET /v1/machines/{id}/logs?tail=N (scope machines:read) returns console, cursor, state and
operations (oldest first). To follow it, pass cursor as after on the next request to get only
newer output. When the console cannot be read, for example because the machine’s disks are in
storage, the response is still 200, with consoleUnavailable and the operations.Labels
Give a machine up to 32key=value labels (metadata in the API), then filter by them.
--meta flags, a machine must match all of them. The server filters, and lists only your
own orgs’ machines. An agent can tag every machine it creates with --meta session=ID and find them
later with instabox ls --meta session=ID.
The key and value limits are under metadata in Create parameters.