Skip to content

Add support for journal output#268

Open
cgwalters wants to merge 1 commit into
bootc-dev:mainfrom
cgwalters:journal-streaming
Open

Add support for journal output#268
cgwalters wants to merge 1 commit into
bootc-dev:mainfrom
cgwalters:journal-streaming

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

Add support for --output=journal for ephemeral which switches logging from the pod to a stream of the journal text.

We also support --journal-output-file PATH (both ephemeral and libvirt) which captures JSON journal output to a host file. This is intended for test frameworks in particular.

On the guest side a bcvk-journal-stream.service unit is injected via SMBIOS credential and runs journalctl -f writing to a virtio-serial port. For ephemeral VMs the host reads that port via an async tokio task. For libvirt, QEMU writes directly to the host file via a <channel type='file'> domain XML element — no sidecar needed.

Assisted-by: OpenCode (Claude Sonnet 4.6)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces functionality to stream the systemd journal from guest VMs to the host, supporting both ephemeral and libvirt runs. It adds new CLI options (--output and --journal-output-file), implements guest-side systemd units for streaming via virtio-serial, and manages host-side data capture. Feedback focuses on a documentation-implementation mismatch regarding output formats when multiple sinks are used, and recommends improving error handling and concurrency in the journal data copying task.

Comment thread crates/kit/src/run_ephemeral.rs Outdated
Comment thread crates/kit/src/run_ephemeral.rs Outdated
@cgwalters cgwalters force-pushed the journal-streaming branch from 294a29a to 560e561 Compare May 15, 2026 12:38
Add support for `--output=journal` for ephemeral which switches
logging from the pod to a stream of the journal text.

We also support `--journal-output-file PATH` (both
ephemeral and libvirt) which captures JSON journal output to a host file.
This is intended for test frameworks in particular.

On the guest side a `bcvk-journal-stream.service` unit is injected via
SMBIOS credential and runs `journalctl -f` writing to a virtio-serial
port. For ephemeral VMs the host reads that port via an async tokio
task. For libvirt, QEMU writes directly to the host file via a
`<channel type='file'>` domain XML element — no sidecar needed.

Assisted-by: OpenCode (Claude Sonnet 4.6)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the journal-streaming branch from 560e561 to 684d6b2 Compare May 15, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant