Commit Graph

670 Commits

Author SHA1 Message Date
Ben Hillis 8546224401 WSLA: Invoke WSLAContainer callbacks without the callback lock held 2025-12-15 12:36:40 -08:00
Blue 68a6c4869d
Implement WSLAContainer::Exec() (#13862)
* Implement WSLAContainer::Exec()

* Apply suggestion
2025-12-12 17:31:02 -08:00
Blue 936f9911e9
Integrate the new runtime VHD (#13881)
* Save state

* Update interactive tty test

* Revert nuget.config change

* Apply suggestions from code review

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 17:30:45 -08:00
Ben Hillis d9adbf2ba4
merge master -> feature/wsl-for-apps 2025-12-12 16:10:17 -08:00
Ben Hillis cc0009881a
virtiofs: implement best-effort removal of flexiov devices (#13887)
* virtiofs: implement best-effort removal of flexiov devices

* pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-12 23:17:31 +00:00
Ben Hillis 4f0a65ab95 Merge remote-tracking branch 'origin/master' into HEAD 2025-12-12 14:29:32 -08:00
Ben Hillis f1e20b21c9
Clean up localhost relay implementation to not rely on procfs parsing. (#13836)
* Clean up localhost relay implementation to not rely on procfs parsing.

* pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-12 14:18:07 -08:00
Ben Hillis 7f8422654e
test: fix and issue with the test-setup.ps1 script that was preventing it from being run from some version of powershell (#13834)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-12 14:16:47 -08:00
Ben Hillis 9c01583fea
WSLA: Add virtiofs support for mounted Windows paths (#13880)
* WSLA: Add virtiofs support for mounted Windows paths

* pr feedback and clarification on removing virtiofs shares

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-12 12:07:32 -08:00
Blue 00b76b1d4b
Notice change from build: 135617549 (#13879)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-12-12 10:46:46 -08:00
Ben Hillis 8c166d7383
cleanup: remove stale version of wsl.wprp (#13861)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-11 15:37:57 -08:00
Ben Hillis 19f06f9f51
virtiofs: fix an issue where if the VM is launched by an elevated user, non-elevated shells will have elevated virtiofs access. (#13877)
* virtiofs: fix an issue where if the VM is launched by an elevated user, non-elevated shells will have elevated virtiofs access.

* rename keelAlive -> keepAlive

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-11 15:21:27 -08:00
Blue c7e80fbd25
Pass --time to nerdctl stop to avoid timeouts when stopping stuck con… (#13873)
* Pass --time to nerdctl stop to avoid timeouts when stopping stuck containers

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 21:53:49 -05:00
Ben Hillis 5acd600464
CI: update issue for wslsettings being rebuilt and signature being overwritten (#13855)
* CI: resolve wslsettings being rebuilt and signature being overwritten

* fix for non-release builds

* fix yaml format

* remove print for local builds

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-10 16:20:45 -08:00
Ben Hillis 25572cc168
test: add simple virtio proxy networking tests and move mirrored tests to their own class (#13838)
* test: add simple virtio proxy networking tests

* move mirrored tests to their own class

* fix failing mirrored variation

* use different port for HostUdpBindDoesNotPreventGuestTcpBind

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-10 09:41:55 -08:00
Ben Hillis 14875a2d09
Merge pull request #13859 from microsoft/user/benhill/update_feature_branch
Merge remote-tracking branch 'origin/master' into feature/wsl-for-apps
2025-12-10 09:41:32 -08:00
Blue 9ad6b70858
Fix WI_ASSERT() crashing the 'ListSessionsReturnsSessionWithDisplayName' test case (#13863) 2025-12-10 09:41:01 -08:00
Fabio Ros f3bdac25ba
Fix typo in Dutch localization (#13853) 2025-12-10 09:39:39 -08:00
Pooja Trivedi 63eb4f812c
Implement Stop Container (#13857)
* Implement Stop Container

* Add TODO for testing Stop() on a container in 'Created' state

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

* Fix timeout, state, etc.

* Change to using a recursive_mutex for now

Based on discussions, preferring easier code readability,
maintenance, debugging until we do perf testing. Also consistency
with existing codebase for similar scenarios

* Fix merge issues and change to recursive_mutex after merge

---------

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 11:36:27 -05:00
Blue 99d4c488c9
Use nerdctl events to track container state changes (#13844)
* Save state

* Save state

* Disable port tests

* Update tests

* Prepare for review

* Add headers

* Apply PR feedback

* Apply PR feedback

* Apply PR feedback
2025-12-09 16:57:23 -08:00
beena352 3148403fbe
Merge pull request #13860 from beena352/user/beenachauhan/wsla-test
Add tests for WSLA session lookup and listing
2025-12-09 14:21:45 -08:00
beena352 27da12d869
Merge branch 'feature/wsl-for-apps' into user/beenachauhan/wsla-test 2025-12-09 11:34:20 -08:00
Beena352 4107c271e2 Add tests for WSLA session lookup and listing 2025-12-09 11:29:13 -08:00
Ben Hillis 60c73fdbf2 Merge remote-tracking branch 'origin/master' into HEAD 2025-12-09 09:45:27 -08:00
beena352 71ab595b8d
Merge pull request #13856 from beena352/user/beenachauhan/correct_cmake.txt
Simplify CMake condition for WSL_POST_BUILD_COMMAND
2025-12-08 19:14:26 -08:00
Beena352 2fc8aaab66 Simplify CMake condition for WSL_POST_BUILD_COMMAND
Reverts to the original DEFINED-only check for consistency with existing build logic. This is a small follow-up based on reviewer feedback from the previous PR.
2025-12-08 15:52:44 -08:00
beena352 c7f915e0fd
Merge pull request #13817 from beena352/user/beenachauhan/wsladiag-v2
WSLA: Add wsladiag tool and improve session enumeration (ListSessions + display name fix)
2025-12-08 08:17:22 -08:00
beena352 f54b4ef039
Merge branch 'feature/wsl-for-apps' into user/beenachauhan/wsladiag-v2 2025-12-05 23:46:21 -08:00
Beena352 0bdbc3fe55 WSLA session updates and CMake code fix 2025-12-05 23:37:45 -08:00
Ben Hillis 403215aad5
WSLA: restore console mode when wsl.exe --wsla exits (#13839)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-05 16:31:09 -08:00
Blue 4c20e2c4e9
Implement container state management (#13821)
* Implement CreateContainer method

* Build fixes

* Implement CreateContainer method

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

* Fix nerdctl host networking parameter

* Prototype CreateContainer()

* Format

* Format

* Start writing tests

* Fix various issues

* Add new files

* Test cleanup

* Test cleanup

* Prepare for PR

* Fix ARM build

* Add copyright header

* Update cmakelists.txt

* Use ifdefs

* Format

* ifdef ARM64

* Install the test .vhd in the MSI

* Update the stdin test

* Format

* Refactor the session creation logic to match the new WSLA API

* Prepare for review

* Apply PR feedback

* Use early return

* Save state

* Implement container state management

* Format

* Implement open

* Implement Delete() and proper sync logic

* Format

* Handle nerdctl inspect failures

* Format

* Fix logic error in poll

* Format

---------

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-05 15:33:44 -08:00
Ben Hillis 49864b525e
CI: Switch away from -dev versions of MS-RDX-MRO.windows-store-publish tasks (#13841)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-05 15:20:15 -08:00
Ben Hillis 7741740f87
Add back WSL2_VM_ID environment varialbe to the system distro. (#13835)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-05 15:06:38 -08:00
Beena352 12f12c41c2 Update WSLASession header 2025-12-05 11:39:12 -08:00
Beena352 692faed78e Merge upstream WSLA changes and restore session ID support 2025-12-05 10:26:40 -08:00
beena352 b46de5880d
Merge branch 'feature/wsl-for-apps' into user/beenachauhan/wsladiag-v2 2025-12-05 02:45:07 -08:00
Ben Hillis caf38dcad2
wslsettings: ensure text in the oobe window properly wraps (#13823)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-04 20:29:11 -08:00
Pooja Trivedi 2e8479a552
Add a utility Wait() method with timeout to WSLAProcessLauncher (#13831)
Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
2025-12-04 21:18:29 -05:00
Blue 844acd07d5
Refactor the session creation logic to match the new API (#13814)
* Implement CreateContainer method

* Build fixes

* Implement CreateContainer method

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

* Fix nerdctl host networking parameter

* Prototype CreateContainer()

* Format

* Format

* Start writing tests

* Fix various issues

* Add new files

* Test cleanup

* Test cleanup

* Prepare for PR

* Fix ARM build

* Add copyright header

* Update cmakelists.txt

* Use ifdefs

* Format

* ifdef ARM64

* Install the test .vhd in the MSI

* Update the stdin test

* Format

* Refactor the session creation logic to match the new WSLA API

* Prepare for review

* Apply PR feedback

* Use early return

---------

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 03:17:15 +00:00
Ben Hillis 1390e644fb
cleanup: add handling for product-specific virtio networking class IDs. (#13822) 2025-12-03 18:55:25 -08:00
Beena352 4d0492ae58 Fix formatting and whitespace issues in WSLA and wsladiag sources 2025-12-03 18:54:48 -08:00
Blue 1266d8b56a
Enable the CreateContainer stdin test (#13818)
* Enable the CreateContainer stdin test

* Prepare for review
2025-12-03 16:01:00 -08:00
Ben Hillis 1ef0c45e3f
WSLA: Add WSLA-specific class registration for virtio networking (#13819)
Update wsldevicehost nuget package with new version that contains the new class ID

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-03 15:59:37 -08:00
Ben Hillis c64eb180d8
Remove lxutil.dll dependency and update Microsoft.WSL.DeviceHost to version 1.0.0-20251201.1 (#13633)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-02 20:05:14 -08:00
Beena352 650e460d4a Apply review feedback: remove empty-name block and use THROW_HR_IF 2025-12-02 17:43:25 -08:00
Beena352 02dc0e21c8 Add wsladiag tool and WSLA improvements 2025-12-02 17:24:58 -08:00
Blue 2a41fe20e3
Initial implementation for CreateContainer() (#13791)
* Implement CreateContainer method

* Build fixes

* Implement CreateContainer method

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

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

* Fix nerdctl host networking parameter

* Prototype CreateContainer()

* Format

* Format

* Start writing tests

* Fix various issues

* Add new files

* Test cleanup

* Test cleanup

* Prepare for PR

* Fix ARM build

* Add copyright header

* Update cmakelists.txt

* Use ifdefs

* Format

* ifdef ARM64

* Install the test .vhd in the MSI

* Update the stdin test

* Format

* Update src/windows/wslaservice/exe/WSLAContainer.cpp

Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>

* Update src/windows/wslaservice/inc/wslaservice.idl

Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>

* Update test/windows/WSLATests.cpp

Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>

* Update src/windows/common/WSLAContainerLauncher.cpp

Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>

* Apply PR feedback

* Format

---------

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 14:40:16 -08:00
Ben Hillis 2844e4a862
test: minor updates to improve virtiofs pass rate (#13815)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-02 12:46:26 -08:00
Mitchell Levy 8f744fc188
Update Microsoft.WSL.Kernel to 6.6.114.1 (#13812)
See https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-6.6.114.1
2025-12-02 10:50:16 -08:00
Ben Hillis 4637f3758f
virtio networking: fix two minor issues (#13810)
* virtio networking: fix two minor issues

* Update src/windows/common/VirtioNetworking.cpp

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-01 21:18:09 -08:00