Conversation
LiliDeng
requested review from
SrikanthMyakam (SRIKKANTH),
Anirudh Rayabharam (anirudhrb) and
Johnson (johnsongeorge-w)
as code owners
September 17, 2026 08:13
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved switch-selection/NAT behavior and unescaped VHD paths can prevent documented flows from working.
Pull request overview
Adds a reusable Hyper-V host VHD/VHDX runbook with conditional partition expansion and supporting documentation.
Changes:
- Expands guest partitions only when LISA resizes the VHD.
- Adds configurable Hyper-V host VHD runbook settings.
- Documents Hyper-V prerequisites, usage, and troubleshooting.
File summaries
| File | Summary |
|---|---|
lisa/sut_orchestrator/hyperv/platform_.py |
Conditionally expands guest partitions after VHD resizing. |
lisa/microsoft/runbook/hyperv/host_vhd.yml |
Adds the host VHD runbook; switch selection/NAT handling and VHD path quoting require changes. |
docs/run_test/run.rst |
Adds Hyper-V documentation navigation. |
docs/run_test/hyperv.rst |
Documents setup and usage; switch override behavior requires correction. |
Review details
Suppressed comments (3)
docs/run_test/hyperv.rst:89
- The documented
switch_nameoverride can select an internal switch, but the Hyper-V platform decides whether to use NAT fromdefault_switch.type, not from the selected switch. When an external switch exists and this variable selects an internal switch, LISA passes the guest's internal IP directly to the controller, so the smoke test cannot connect; cleanup has the same default-switch assumption. Please make the platform track the selected switch type (including cleanup), or restrict this runbook/documentation to the default switch behavior.
``switch_name``
Optional Hyper-V virtual switch. If omitted, LISA uses the host default switch.
lisa/microsoft/runbook/hyperv/host_vhd.yml:73
guest_vhd_pathis documented as an arbitrary path on the Windows host, but_resize_vhd_if_neededinterpolates it intoGet-VHD -PathandResize-VHD -Pathwithout quoting or escaping. A valid path such asC:\VM Images\guest.vhdxwill therefore fail duringGet-VHDeven whenosdisk_size_in_gbis 0, because that query runs unconditionally. Quote/escape the path when constructing the PowerShell cmdlets.
vhd_path: $(guest_vhd_path)
lisa/microsoft/runbook/hyperv/host_vhd.yml:75
- This runbook allows selecting an external switch, but the Hyper-V deployment path decides whether to add NAT by inspecting the host's
default_switch, not the selectedswitch_name. On a host whose default switch is internal, selecting an external switch still rewrites the guest address to the host address and uses a NAT port, so the documented external-switch flow cannot connect to the guest. Base the NAT branch on the selected switch (or otherwise carry its type) before relying on this option.
switch_name: $(switch_name)
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
Author
AI Test Case SelectionSelected 1 test case(s): smoke_test Marketplace image: Result: Succeeded |
Johnson (johnsongeorge-w)
approved these changes
Sep 18, 2026
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.
Summary
Validation
Provisioning.smoke_test.AI-generated change.