Harden OpenVMM Azure guest orchestration#4420
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the OpenVMM guest orchestrator flow when used as an Azure “guest-enabled” environment, adding cloud-init provisioning support, TAP networking/SSH forwarding, richer diagnostics, and smoke coverage to validate guest lifecycle operations.
Changes:
- Add cloud-init ISO generation and provisioning plumbing for OpenVMM guests, with improved failure-context capture.
- Add TAP networking support (dnsmasq DHCP, guest address resolution, host-side SSH port forwarding) and teardown/cleanup paths.
- Update runner/Azure plumbing to better handle guest-enabled environments, plus OpenVMM smoke suite + Azure runbook, and extend selftests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| selftests/test_openvmm_node.py | Updates selftests for stop-timeout behavior and logging expectations. |
| lisa/tools/openvmm.py | Improves detached launch robustness (TTY wrapper) and PID failure diagnostics. |
| lisa/sut_orchestrator/openvmm/schema.py | Extends OpenVMM guest/network schema for cloud-init + TAP/forwarding settings. |
| lisa/sut_orchestrator/openvmm/node.py | Implements TAP networking, cloud-init ISO creation, forwarding, diagnostics, artifact cleanup. |
| lisa/sut_orchestrator/azure/platform_.py | Avoids feature access for guest nodes unless the feature is supported. |
| lisa/runners/lisa_runner.py | Adds guest-environment initialization and environment-status matching for guest-enabled runs. |
| lisa/node.py | Ensures host nodes clean up/close guest nodes; relaxes connection test when shell is missing. |
| lisa/microsoft/testsuites/openvmm/openvmm.py | Adds OpenVMM Azure smoke coverage for boot/restart/stop-start scenarios. |
| lisa/microsoft/runbook/openvmm/openvmm-azure-smoke.yml | New Azure smoke runbook for OpenVMM guest validation with TAP+forwarding. |
✅ AI Test Selection — PASSED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
6dc110d to
08cd8b1
Compare
✅ AI Test Selection — PASSED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
08cd8b1 to
9d5c64b
Compare
✅ AI Test Selection — PASSED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
✅ AI Test Selection — PASSED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
6f94f54 to
c2a279c
Compare
⏭️ AI Test Selection — SKIPPED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest Selected test cases |
✅ AI Test Selection — PASSED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
c2a279c to
1f2096c
Compare
✅ AI Test Selection — PASSED5 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
1f2096c to
12687a4
Compare
✅ 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
left a comment
There was a problem hiding this comment.
I haven't been able to go through the whole code yet. Here are some comments from the first pass. I'll do another pass tomorrow.
12687a4 to
4ad8f7c
Compare
✅ 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
|
4ad8f7c to
fd3f118
Compare
✅ 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
|
fd3f118 to
51d33c6
Compare
✅ 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
|
51d33c6 to
362a68d
Compare
✅ AI Test Selection — PASSED2 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Add an Azure smoke runbook and OpenVMM smoke suite that exercise guest boot, restart, and stop/start on a prepared host. Describe the LisaRunner guest-enabled flow explicitly: - schedule environment initialization when the outer environment reaches Deployed - initialize guest nodes after the outer environment connects - allow guest-targeted tests that require Deployed to run once the outer host is Connected - keep retry on the runner redeploy path instead of eagerly deleting the environment Also wire the Azure/OpenVMM guest handling, schema updates, diagnostics, and selftest coverage needed for this flow. (cherry picked from commit ac4c15c)
Make guest teardown best-effort so parent node cleanup and close continue even when a guest cleanup path fails. Tighten OpenVMM host-side handling by using host-native paths for copied artifacts, validating whoami before TAP creation, guarding working directory deletion, scoping dnsmasq state to the OpenVMM interface, and restoring the original ip_forward state when SSH forwarding is torn down. Also update the launcher wrapper to return the real OpenVMM PID so later liveness checks and forced cleanup target the VM process rather than the wrapper shell. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
362a68d to
90912f1
Compare
✅ AI Test Selection — PASSED2 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Description
pycdlibat module import timeFor Lisa-runner:
schedule guest initialization after host deploy
initialize guest nodes after host connect
allow guest runs to match Deployed against outer Connected
avoid eager delete before retry in guest flow
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results
2026-04-15 23:32:50.931[140036611700544][INFO] lisa.RootRunner ________________________________________
2026-04-15 23:32:50.932[140036611700544][INFO] lisa.RootRunner OpenVmmPlatform.verify_openvmm_guest_boot: PASSED
2026-04-15 23:32:50.932[140036611700544][INFO] lisa.RootRunner OpenVmmPlatform.verify_openvmm_restart_via_platform: PASSED