Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Remove Wildcard GUID in HyperVSocketServer V2 Constructor (#165) - #28213

Closed
Aditya Patwardhan (adityapatwardhan) wants to merge 1 commit into
masterfrom
hyperVsocket
Closed

Aditya Patwardhan (adityapatwardhan) wants to merge 1 commit into
masterfrom
hyperVsocket

Conversation

@adityapatwardhan

Copy link
Copy Markdown
Member

PR Summary

This pull request refactors the way the Hyper-V socket server determines which VM partition ID to use when listening for connections, improving maintainability and consistency. It introduces a helper method to centralize this logic and updates both the server constructors and tests to use it.

Refactoring and Helper Method Introduction:

  • Added a new internal static method GetListenerVmId(bool loopbackMode) to RemoteSessionHyperVSocketServer to encapsulate the logic for choosing the correct VM partition ID (loopback or parent) for the listening socket.

Constructor Consistency and Usage:

  • Updated both constructors of RemoteSessionHyperVSocketServer to use the new GetListenerVmId helper, ensuring consistent partition selection logic across server instantiations. [1] [2]

Testing Improvements:

  • Added a new test ServerListenerUsesExpectedPartitionVmId to verify that GetListenerVmId returns the correct VM ID for both loopback and parent partition modes.

PR Context

PR Checklist

Copilot AI balanced review requested due to automatic review settings October 14, 2026 22:59
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Oct 14, 2026

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.

🔵 Needs a closer look

The V2 binding change needs Windows/Hyper-V connectivity validation beyond the helper’s GUID-selection tests.

0 open findings

What changed in this PR

This PR replaces the V2 Hyper-V session server’s wildcard listener binding with the partition-selection logic already used by V1.

Changes:

  • Centralizes partition selection in GetListenerVmId.
  • Uses the helper in both server constructors.
  • Adds tests for parent and loopback GUID selection.
File Description
test/​xUnit/​csharp/​test_RemoteHyperV.cs Tests both partition-selection modes.
src/​System.Management.Automation/​engine/​remoting/​common/​RemoteSessionHyperVSocket.cs Shares partition-selection logic and removes V2 wildcard binding.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@iSazonov

Copy link
Copy Markdown
Collaborator

Dup #28204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants