Skip to content

[AI Generated] BugFix: check OpenVMM virtualization support - #4537

Merged
LiliDeng merged 2 commits into
mainfrom
bugfix/openvmm-virtualization-guard_150626_144158
Jun 22, 2026
Merged

[AI Generated] BugFix: check OpenVMM virtualization support#4537
LiliDeng merged 2 commits into
mainfrom
bugfix/openvmm-virtualization-guard_150626_144158

Conversation

@vyadavmsft

Copy link
Copy Markdown
Collaborator

Summary

Checks OpenVMM host hardware virtualization support before deciding whether /dev/kvm or /dev/mshv backends are available, so hosts without virtualization enabled report the correct skip reason.

Validation Results

Validation Result
Focused guard-ordering harness PASSED
OpenVMM selftests PASSED
Black, Flake8, Pylint, MyPy PASSED

Copilot AI review requested due to automatic review settings June 15, 2026 21:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the OpenVMM upstream vmm_tests preflight checks by detecting whether hardware virtualization is enabled before concluding that /dev/kvm and /dev/mshv backends are unavailable, so that hosts without virtualization enabled return a more accurate skip reason.

Changes:

  • Add an Lscpu.is_virtualization_enabled() guard in _ensure_vmm_tests_supported() to detect missing VT-x/AMD-V (or equivalent) earlier.
  • Update and extend selftests to mock Lscpu and to assert the virtualization guard is evaluated before probing device paths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
selftests/test_openvmm_tests_suite.py Extends unit coverage by mocking Lscpu and adding a guard-ordering test.
lisa/microsoft/testsuites/openvmm/openvmm_tests.py Adds virtualization-enabled detection to improve skip reason accuracy when /dev/kvm and /dev/mshv are absent.

Comment thread lisa/microsoft/testsuites/openvmm/openvmm_tests.py
@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 3
Total 3
Test case details
Test Case Status Time (s) Message
verify_openvmm_stop_start_in_platform (lisa_0_2) ⏭️ SKIPPED 5.072 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_restart_via_platform (lisa_0_1) ⏭️ SKIPPED 5.377 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_guest_boot (lisa_0_0) ⏭️ SKIPPED 5.271 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.

@vyadavmsft

Copy link
Copy Markdown
Collaborator Author

@copilot resolve conflict

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve conflict

Resolved. The only conflict was in the selftests/test_openvmm_tests_suite.py import section — HEAD had Ubuntu while origin/main had CBLMariner. The resolution keeps CBLMariner (still used in test_before_case_initializes_host_before_os_check) and retains Lscpu from this branch's changes. All 9 selftests pass after the merge (commit dd5250e2).

@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 3
Total 3
Test case details
Test Case Status Time (s) Message
verify_openvmm_guest_boot (lisa_0_0) ⏭️ SKIPPED 5.224 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_restart_via_platform (lisa_0_1) ⏭️ SKIPPED 5.510 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_stop_start_in_platform (lisa_0_2) ⏭️ SKIPPED 4.874 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.

@LiliDeng
LiliDeng merged commit 058b52a into main Jun 22, 2026
61 checks passed
@LiliDeng
LiliDeng deleted the bugfix/openvmm-virtualization-guard_150626_144158 branch June 22, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants