Skip to content

multiple: surface early boot logs in debug mode#2289

Merged
sespiros merged 3 commits intomainfrom
sse/qemu-serial-to-journal
Apr 2, 2026
Merged

multiple: surface early boot logs in debug mode#2289
sespiros merged 3 commits intomainfrom
sse/qemu-serial-to-journal

Conversation

@sespiros
Copy link
Copy Markdown
Collaborator

To achieve this:

  • enable a debug build flag in OVMF-SNP similar to the one that already exists in OVMF-TDX.
  • reconfigure the debug set to use debug firmware builds
  • reconfigure kata's debug mode (which is also enabled when the debug set is used) to use the legacy serial.

That way when the debug set is used, information from the early boot will be included in the journal.

Add debug and lib parameters to the OVMF-SNP package. When
debug = true, the build uses the DEBUG configuration and enables
serial port output via -D DEBUG_ON_SERIAL_PORT=TRUE. This is
useful for capturing OVMF firmware logs during development and
testing.

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
@sespiros sespiros added the no changelog PRs not listed in the release notes label Mar 31, 2026
Override OVMF-SNP and OVMF-TDX with debug=true in the debug set.
This builds OVMF with DEBUG_ON_SERIAL_PORT=TRUE, producing firmware
debug output on the serial port. Combined with use_legacy_serial=true,
OVMF output will be captured by kata's console watcher and logged to
the journal.

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
Enable legacy serial (ttyS0) when debug mode is active so that
kata's console watcher can also capture early OVMF firmware logs.

kata's use_legacy_serial option configures qemu to use legacy serial
(ttyS0) instead of virtio (hvc0/hvc1) but also configures the guest
kernel to use the ttyS0 through the kernel cmdline. Since the kernel
command line changes, the SNP launch measurement also changes and
so the cmdline in runtime/package.nix needs to also be updated
accordingly.

Signed-off-by: Spyros Seimenis <sse@edgeless.systems>
@sespiros sespiros force-pushed the sse/qemu-serial-to-journal branch from 1c0690e to 4902644 Compare March 31, 2026 11:06
Copy link
Copy Markdown
Member

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

lgtm

Comment thread nodeinstaller/internal/kataconfig/config.go
@sespiros sespiros merged commit a5e5139 into main Apr 2, 2026
18 checks passed
@sespiros sespiros deleted the sse/qemu-serial-to-journal branch April 2, 2026 12:40
Comment thread overlays/sets/debug.nix
Comment on lines +17 to +18
inherit (contrastPkgsFinal) OVMF-SNP;
inherit (contrastPkgsFinal) OVMF-TDX;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this actually needed? shouldn't it propagate automatically via the fixpoint?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants