Add support for journal output#268
Open
cgwalters wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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.
294a29a to
560e561
Compare
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>
560e561 to
684d6b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for
--output=journalfor 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.serviceunit is injected via SMBIOS credential and runsjournalctl -fwriting 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)