Skip to content

Port initial OpenVMM integration work - #42246

Merged
Daman Mulye (damanm24) merged 11 commits into
feature/openvmmfrom
user/damanmulye/openvmm-basic
Nov 20, 2026
Merged

Daman Mulye (damanm24) merged 11 commits into
feature/openvmmfrom
user/damanmulye/openvmm-basic

Conversation

@damanm24

Copy link
Copy Markdown
Contributor

This ports the initial OpenVMM integration work to  feature/openvmm . Backend selection remains disabled while the remaining changes are brought over.

Adds backend plumbing, NAT support, and validation for the supported OpenVMM configuration.

Missing features that will be added in a follow-up PR:

  • kernel debugging support
  • interop changes
  • testing/CI changes

Copilot AI balanced review requested due to automatic review settings November 12, 2026 04:28

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.

🟡 Changes recommended

Active issues include job ownership that can terminate another VM’s shared device-host process, resource-lifecycle and networking regressions, and outdated assertions that cause an existing test to fail.

6 open issues
What changed in this PR

Ports the initial OpenVMM integration into WSL’s virtual-machine backend abstraction. Backend selection remains disabled while kernel debugging, interop integration, and testing/CI work are deferred.

Changes:

  • Adds OpenVMM networking, guest-connection plumbing, resource management, and configuration validation.
  • Extends host–guest disk operations to support both SCSI and virtio-blk.
  • Updates backend tests, dependencies, localized errors, and boot documentation.
File Description
test/​windows/​OpenVmmVirtualMachineBackendTests.cpp Adds configuration, capability, and shutdown checks.
test/​windows/​HcsVirtualMachineBackendTests.cpp Updates capability expectations.
src/​windows/​service/​exe/​WslCoreVm.h Makes disk operations transport-aware.
src/​windows/​service/​exe/​WslCoreVm.cpp Passes disk transport information to Linux.
src/​windows/​service/​exe/​LxssUserSession.cpp Uses disk attachments for resize and trim.
src/​windows/​common/​wslutil.cpp Updates the OpenVMM error-context label.
src/​windows/​common/​WslInstall.h Defines the Hypervisor Platform feature name.
src/​windows/​common/​WslInstall.cpp Adds Hypervisor Platform installation checks.
src/​windows/​common/​WslCoreConfig.h Declares the experimental OpenVMM setting.
src/​windows/​common/​WslCoreConfig.cpp Validates supported OpenVMM configurations.
src/​windows/​common/​vsock.hpp Declares AF_UNIX bridge helpers.
src/​windows/​common/​vsock.cpp Implements bridge connections and handshakes.
src/​windows/​common/​VirtualMachineBackend.cpp Adds a backend-selection helper.
src/​windows/​common/​OpenVmmVirtualMachineBackend.h Extends backend resources and lifecycle interfaces.
src/​windows/​common/​OpenVmmVirtualMachineBackend.cpp Expands networking, storage, sharing, and shutdown support.
src/​windows/​common/​OpenVmmNatNetworking.h Declares the OpenVMM NAT engine.
src/​windows/​common/​OpenVmmNatNetworking.cpp Implements guest networking and port forwarding.
src/​windows/​common/​IVirtualMachineBackend.h Extends shared backend contracts and resource types.
src/​windows/​common/​HcsVirtualMachineBackend.h Declares updated connection interfaces.
src/​windows/​common/​HcsVirtualMachineBackend.cpp Adapts HCS to the extended backend contracts.
src/​windows/​common/​GuestConnector.h Defines a serializable guest-connection abstraction.
src/​windows/​common/​GuestConnector.cpp Implements HCS and OpenVMM connection dispatch.
src/​windows/​common/​ExecutionContext.h Renames the OpenVMM context identifier.
src/​windows/​common/​DeviceHostProxy.h Changes device-host job ownership.
src/​windows/​common/​DeviceHostProxy.cpp Changes job assignment and COM shutdown handling.
src/​windows/​common/​CMakeLists.txt Registers new connection and networking sources.
src/​shared/​inc/​lxinitshared.h Extends disk and folder-mount messages.
src/​linux/​init/​WSLCInit.cpp Uses the renamed SCSI lookup helper.
src/​linux/​init/​main.cpp Adds virtio-blk discovery and transport-aware disk operations.
packages.config Updates the OpenVMM dependency.
localization/​strings/​en-US/​Resources.resw Adds OpenVMM configuration errors.
doc/​docs/​technical-documentation/​boot-process.md Documents configuration requirements and limitations.

Review effort: Balanced

Comment thread src/windows/common/DeviceHostProxy.cpp Resolved
Comment thread src/windows/common/DeviceHostProxy.cpp Resolved
Comment thread src/windows/common/vsock.cpp Resolved
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18: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.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 21:24

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.

Comment thread src/windows/common/WslCoreConfig.cpp Resolved
Copilot AI balanced review requested due to automatic review settings November 12, 2026 23:59

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

Human assessment is needed to evaluate a critical token-identity compatibility risk that can cause valid same-context OpenVMM disk operations to be rejected.

1 open issue
4 resolved since last review

Review effort: Balanced

@damanm24
Daman Mulye (damanm24) marked this pull request as ready for review November 13, 2026 00:06
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 81238fed-f0a2-4cdb-8620-2284ff1b38fd
Copilot AI balanced review requested due to automatic review settings November 13, 2026 16:25

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.

🟡 Changes recommended

A duplicate guest declaration in OpenVmmVirtualMachineBackendTests.cpp prevents compilation of the file and the wsltests target.

1 open issue
1 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6124d212-462d-4b14-bad5-7736bd9de175
Copilot AI balanced review requested due to automatic review settings November 16, 2026 20:20

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

A COM callback lifetime cycle can retain device-host processes and proxy resources after shutdown, while LocalAppData-based socket paths can prevent VM creation for valid Windows profiles.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Comment thread src/linux/init/main.cpp Resolved
Comment thread src/linux/init/main.cpp Resolved
Comment thread src/linux/init/main.cpp Resolved
Comment thread src/windows/common/vsock.cpp Resolved
Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:39

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

COM teardown changes can leave device-host processes and compute-system handles alive after VM shutdown, while socket-path handling can prevent supported user accounts from creating OpenVMM VMs.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 22:18

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

Shutdown no longer breaks remote COM callback references, potentially leaving the proxy and device-host process alive, while longer LocalAppData socket paths can exceed the length limit and prevent VM creation.

No open issues 🎉

Review effort: Balanced

@OneBlue Blue (OneBlue) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Change LGTM, one minor question on the networking settings, but can be resolved in a future change

HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED),
shared::Localization::MessageOpenVmmNetworkingConflict(),
NetworkingMode != NetworkingMode::Nat && NetworkingMode != NetworkingMode::None);
if (NetworkingMode == NetworkingMode::Nat)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm a bit confused by this, doesn't openvmm only support consommé networking ? (NAT in this context is HNS-based NAT, which I don't think openvmm can support

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will address in a follow-up. I chose NAT here to distinguish between Consomme for HCS is a separate path compared to Consomme for OpenVMM. Since, Consomme is OpenVMM's NAT implementation, I thought it made the most sense to call it NAT networking.

@damanm24
Daman Mulye (damanm24) merged commit f136577 into feature/openvmm Nov 20, 2026
17 checks passed
@damanm24
Daman Mulye (damanm24) deleted the user/damanmulye/openvmm-basic branch November 20, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants