You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduces a new IVirtualMachineBackend that will be used by both WSL/WSLC to manage VMs that back their sessions. It also introduces a new OpenVmmVirtualMachineBackend class that provides a concrete implementation of the interface that can boot a minimal Linux VM. The long-term goal is to complete the OpenVmmVirtualMachineBackend implementation and provide a corresponding HcsVirtualMachineBackend implementation that both WSL and WSLC can use. Currently, the classes responsible for managing VMs for these two areas (WslCoreVm for WSL and WSLCVirtualMachine) have their product specific logic coupled with managing VMs. Eventually these classes will be refactored to split these two areas and provide better separation and single responsibility.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The backend’s advertised capabilities currently conflict with what the implementation actually supports (notably firmware boot and several unimplemented operations), which can mislead capability-driven callers.
Get a fresh assessment by requesting another Copilot review.
This PR introduces a new IVirtualMachineBackend abstraction in the Windows service layer, plus an initial OpenVmmVirtualMachineBackend implementation intended to become a shared VM-management layer for both WSL and WSLC.
Changes:
Added IVirtualMachineBackend API surface and factory helpers for selecting/querying a backend.
Implemented an initial OpenVMM-backed VM backend with request validation, process lifecycle, and basic disk attach/detach.
Added Windows tests and build/package wiring to bring in OpenVMM binaries and required boot artifacts.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
It introduces contract/build reliability issues (capabilities advertising unimplemented operations and tests/build steps depending on unguarded external kernel artifacts) that can cause runtime failures or broken builds.
Get a fresh assessment by requesting another Copilot review.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
It introduces build/runtime inconsistencies (OpenVMM binaries no longer placed in the base path expected by the new backend/tests) and advertises a capability (UpdateNetworkAdapter) that has no corresponding interface method.
Get a fresh assessment by requesting another Copilot review.
Replaced file deletion with recursive directory removal for improved error handling.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This expectation is incorrect on ARM64: ValidateCreateRequest() unconditionally rejects every create request there, but this unskipped test requires LinuxDirectBoot to be advertised. A capability-driven caller can therefore select OpenVMM on ARM64 even though creation is guaranteed to fail. Make the queried capabilities platform-aware and update this expectation accordingly.
Add integration coverage for runtime disk attach and detach
The new runtime disk path is untested. Existing disk tests only exercise ValidateCreateRequest() for boot disks, so regressions in the C ABI attach call, ID/LUN allocation, rollback, and DetachDisk() bookkeeping would not be detected. Add an integration test that boots a VM, attaches a test VHD, validates the returned attachment, and detaches it (including an explicit-placement or duplicate-LUN case).
This branch has not been deployed
No deployments
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
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.
This PR introduces a new
IVirtualMachineBackendthat will be used by both WSL/WSLC to manage VMs that back their sessions. It also introduces a newOpenVmmVirtualMachineBackendclass that provides a concrete implementation of the interface that can boot a minimal Linux VM. The long-term goal is to complete theOpenVmmVirtualMachineBackendimplementation and provide a correspondingHcsVirtualMachineBackendimplementation that both WSL and WSLC can use. Currently, the classes responsible for managing VMs for these two areas (WslCoreVmfor WSL andWSLCVirtualMachine) have their product specific logic coupled with managing VMs. Eventually these classes will be refactored to split these two areas and provide better separation and single responsibility.