Repository navigation
Bind Hyper-V socket server V2 to the selected partition VM ID - #28204
Open
Justin Chung (jshigetomi) wants to merge 2 commits into
Open
Justin Chung (jshigetomi) wants to merge 2 commits into
Justin Chung (jshigetomi) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Justin Chung (jshigetomi)
marked this pull request as ready for review
October 14, 2026 21:43
Justin Chung (jshigetomi)
requested review from
a team,
Travis Plunk (TravisEz13) and
Dongbo Wang (daxian-dbw)
as code owners
October 14, 2026 21:43
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change preserves V1 behavior, aligns V2 binding, and tests both partition selections without identified blocking issues.
0 open findings
What changed in this PR
Aligns Hyper-V socket server V2 with V1 by binding to the partition VM ID selected by the connection mode.
Changes:
- Shares partition selection logic between both server constructors.
- Adds unit coverage for parent and loopback VM IDs.
| File | Description |
|---|---|
| test/xUnit/csharp/test_RemoteHyperV.cs | Tests partition selection for both connection modes. |
| src/System.Management.Automation/engine/remoting/common/RemoteSessionHyperVSocket.cs | Extracts the selection helper and replaces V2’s wildcard binding. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
12 tasks
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.
PR Summary
This pull request refactors how the Hyper-V session server determines which VM partition ID to bind to, centralizing the logic into a helper method for consistency and maintainability. It also adds a unit test to ensure the correct partition ID is used based on the connection mode.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header