Add SerialConsole support for OpenVMM guests#4482
Conversation
Kdump and reboot diagnostics call node.features[SerialConsole].check_panic() to inspect the guest serial log. OpenVMM guests already launch with COM1 wired to an OpenVMM-managed log path, but the OpenVMM controller only advertised StartStop, so tests that require SerialConsole failed during feature lookup with 'feature [SerialConsole] isn't supported on platform [openvmm]'. Add an OpenVMM SerialConsole feature that reads the guest console from the parent host, because the COM1 file is host-side state rather than a file inside the guest. The implementation reads the configured file serial log by default, falls back to the launcher stderr log when the runbook uses serial.mode=stderr, and strips ANSI control sequences before the common panic scanner processes the content. Register SerialConsole in OpenVMM supported_features and add selftests for feature registration, file-backed console collection, stderr-backed console collection, and ANSI cleanup.
✅ AI Test Selection — PASSED4 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
There was a problem hiding this comment.
Pull request overview
This PR adds OpenVMM support for the common SerialConsole feature so diagnostics like panic checks can read guest serial logs from the OpenVMM host.
Changes:
- Adds an OpenVMM
SerialConsoleimplementation that reads file-backed or stderr-backed host logs. - Registers
SerialConsolein OpenVMM supported features. - Adds selftests for feature registration and console log collection paths.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lisa/sut_orchestrator/openvmm/serial_console.py |
Implements host-side serial console log retrieval for OpenVMM guests. |
lisa/sut_orchestrator/openvmm/node.py |
Registers OpenVMM SerialConsole support. |
selftests/test_openvmm_node.py |
Adds selftests for OpenVMM serial console behavior. |
|
@copilot apply changes based on the comments in this thread and fix check errors |
Agent-Logs-Url: https://github.com/microsoft/lisa/sessions/85cafcf1-fe1e-45e8-935e-acc2aeb32458 Co-authored-by: vyadavmsft <1424753+vyadavmsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/lisa/sessions/85cafcf1-fe1e-45e8-935e-acc2aeb32458 Co-authored-by: vyadavmsft <1424753+vyadavmsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/lisa/sessions/85cafcf1-fe1e-45e8-935e-acc2aeb32458 Co-authored-by: vyadavmsft <1424753+vyadavmsft@users.noreply.github.com>
Implemented the requested updates from the review thread and fixed the failing checks in commit 3b6b26f.
|
✅ AI Test Selection — PASSED3 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
|
@anirudhrb @pupacha please review, @vyadavmsft please paste results in description, thanks! |
|
@copilot fix check error . |
Agent-Logs-Url: https://github.com/microsoft/lisa/sessions/09297a6a-8cf9-436c-9607-328c73e860e3 Co-authored-by: vyadavmsft <1424753+vyadavmsft@users.noreply.github.com>
✅ AI Test Selection — PASSED4 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Kdump and reboot diagnostics call node.features[SerialConsole].check_panic() to inspect the guest serial log. OpenVMM guests already launch with COM1 wired to an OpenVMM-managed log path, but the OpenVMM controller only advertised StartStop, so tests that require SerialConsole failed during feature lookup with 'feature [SerialConsole] isn't supported on platform [openvmm]'.
Add an OpenVMM SerialConsole feature that reads the guest console from the parent host, because the COM1 file is host-side state rather than a file inside the guest. The implementation reads the configured file serial log by default, falls back to the launcher stderr log when the runbook uses serial.mode=stderr, and strips ANSI control sequences before the common panic scanner processes the content.
Register SerialConsole in OpenVMM supported_features and add selftests for feature registration, file-backed console collection, stderr-backed console collection, and ANSI cleanup.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results
2026-05-11 18:56:39.624[140297817466688][INFO] lisa.RootRunner ________________________________________
2026-05-11 18:56:39.624[140297817466688][INFO] lisa.RootRunner OpenVmmPlatformSuite.verify_openvmm_guest_boot: PASSED
2026-05-11 18:56:39.624[140297817466688][INFO] lisa.RootRunner OpenVmmPlatformSuite.verify_openvmm_restart_via_platform: PASSED
2026-05-11 18:56:39.625[140297817466688][INFO] lisa.RootRunner CPU.verify_cpu_count: PASSED
2026-05-11 18:56:39.625[140297817466688][INFO] lisa.RootRunner KdumpCrash.verify_kdumpcrash_on_random_cpu: PASSED