This change implements the VirtioProxy networking mode for WSLA.
This required moving the VirtioProxy and GnsChannel classes into the common library (with NatNetworking).
DNS tunneling is currently not supported with this networking mode, so an error is returned.
With this change I have updated the default networking move of 'wsl.exe --wsla' to also use
VirtioProxy networking mode.
* wslsettings: allow OOBE window to close with escape key (#13686)
* wslsettings: allow OOBE windows to close with escape key
* fix memory leak
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Localization change from build: 133610492 (#13704)
Co-authored-by: WSL localization <noreply@microsoft.com>
* wslsettings: fix OOBE text truncation at 200% text scaling (#13693)
* wslsettings: fix OOBE text truncation at 200% text scaling
Add text scaling factor to window resize calculation and make hero image height responsive to text scaling. Increase minimum window size for better accessibility. Fix MAS 1.4.4 compliance for OOBE dialog.
* pr feedback
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* wslsettings: add underlines to links in about page (#13703)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* .clang-format: add InsertBraces: true and minor fix to FormatSource.ps1 (#13712)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Localization change from build: 134015316 (#13731)
Co-authored-by: WSL localization <noreply@microsoft.com>
* wslsettings: ensure selected setting is auto-expanded and selected (#13689)
* wslsettings: ensure selected setting is auto-selected
Implement keyboard focus management for SettingsExpander controls across settings pages. This resolves an accessibility issue reported internally.
* add asserts
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* build: fix minor compiler errors when building with VS2026 (#13744)
* build: fix minor compiler errors when building with VS2026
* s
* use VS2022 for clang format and cross compiling
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* chore(distributions): Almalinux auto-update - 20251119 12:04:35 (#13743)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Mask systemd-networkd-wait-online.service during boot (#13611)
* deps: update a number of NuGet packages to the latest available versions (#13728)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Notice change from build: 134267142 (#13751)
Co-authored-by: WSL notice <noreply@microsoft.com>
* Add *.slnx to .gitignore (#13754)
* Fix service crash when collecting a linux crash dump when maxCrashDumpCount is set to 0 (#13755)
* Fix service crash when collecting a linux crash dump when maxCrashDumpCount is set to 0
* Move the check inside the function
* cleanup: VirtioNetworking refactoring (#13760)
* cleanup: update VirtioNetworking class to not rely on the WslCoreConfig struct
* cleanup: simplify VirtioNetworking construction
* remove old constructor and other cleanup
* more minor cleanup
* string cleanup in HandleVirtioModifyOpenPorts
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* cleanup: switch from Microsoft::WRL::ComPtr to wil::com_ptr (#13767)
* cleanup: switch from Microsoft::WRL::ComPtr to wil::com_ptr
* reformat
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* chore(distributions): Almalinux auto-update - 20251124 17:13:02 (#13780)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Notice change from build: 134527933 (#13782)
Co-authored-by: WSL notice <noreply@microsoft.com>
* cleanup: VirtioNetworking refactoring to be more portable (#13783)
* cleanup: VirtioNetworking refactoring to be more portable
* more refactoring
* make m_guestDeviceManager private
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Blue <OneBlue@users.noreply.github.com>
Co-authored-by: WSL localization <noreply@microsoft.com>
Co-authored-by: AlmaLinux Autobot <107999298+almalinuxautobot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Move TerminationCallback to the new API
* Remove support for UserSession level VirtualMachines and rework reference management
* Remove session reference from the VM
* wsla: Prototype new process waitpid() model
* Save state
* Save state
* Save state
* Save state
* Save state
* Wire everything
* Format
* Save state
* Save state
* Redesign process launcher
* Port tests
* Port tests
* Move shell to new API
* Format
* Port more tests
* Add copyright header
* Prepare for PR
* Fix tests
* PR feedback
* Fix termination issue + add more negative tests
* Fix termination issue + add more negative tests
* Format
* wsla: Add service API definition
* Explicitely mark API's to be deleted in the future
* Add TODOs and session storage path
* Update src/windows/wslaservice/inc/wslaservice.idl
Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>
* Update comments
* PR feedback
* Use an object for containers
* Update API definition
* Add stub methods
---------
Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com>
* Add WSLASession creation and tracking in WSLAUserSession
* Wire up WSLASession to contain and create WSLAVirtualMachine
Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Cleanup for review
* Update ServiceMain.cpp comment
* Remove duplicated definitions from wslservice.idl
* poc: Prototype interactive shell improvments
* Format
* Merge
* Save state
* Correctly configure terminal
* Format
* PR feedback
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Save state
* Cleanup for review
* Update ServiceMain.cpp comment
* Remove duplicated definitions from wslservice.idl
* Introduce a new wsl.conf config value to allow distributions to opt-in to cgroupv1 mounts
* Add test coverage
* Fix tmpfs on wsl1
---------
Co-authored-by: Ben Hillis <benhillis@gmail.com>
* fix: correct sparse VHD command to include `true`
* Revert all localization strings to f8c26f7c3 except en-US/Resources.resw
* fix: run validate-localization.py with --fix option
* Introduce a new kernel command line argument to collect hvsocket event logs during boot
* Cleanup diff
* unset env
* Add test coverage
* Fix format
* Remove prefix
* Merge User/oneblue/prototype lsw to a feature/wsl-for-apps (#13278)
* Save state
* Save state
* Save state
* Get the VM booting
* VM booting
* Disk mounting
* CreateLinuxProcess
* Move to a proper API
* Implement env
* Progress on fd
* Redesign fork model
* Add process wait & signal
* Include nuget package
* Format
* Format
* Format
* Cleanup
* Format
* Format
* Format
* Fix nuspec
* Implement VM termination
* Add lsw dll
* Implement termination callbacks
* Save state
* Various fixes in API header
* Save state
* Test coverage
* Don't block all signals by default
* Writeable overlay
* Add struct keyword
* rename WslCreateVirualMachine -> WslCreateVirtualMachine
* rename Environmnent -> Environment
* rename HandleToUlong -> HandleToULong
* ensure correct amount of memory is used to create the LSW VM
* Adjust LSWVirtualMachine::AttachDisk so it does not require caller to have elevated permission
* Add missing struct keyword
* PR feedback
* PR review
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Implement WSL for apps TCP port forwarding (#13299)
* Merge User/oneblue/prototype lsw to a feature/wsl-for-apps (#13278)
* Save state
* Save state
* Save state
* Get the VM booting
* VM booting
* Disk mounting
* CreateLinuxProcess
* Move to a proper API
* Implement env
* Progress on fd
* Redesign fork model
* Add process wait & signal
* Include nuget package
* Format
* Format
* Format
* Cleanup
* Format
* Format
* Format
* Fix nuspec
* Implement VM termination
* Add lsw dll
* Implement termination callbacks
* Save state
* Various fixes in API header
* Save state
* Test coverage
* Don't block all signals by default
* Writeable overlay
* Add struct keyword
* rename WslCreateVirualMachine -> WslCreateVirtualMachine
* rename Environmnent -> Environment
* rename HandleToUlong -> HandleToULong
* ensure correct amount of memory is used to create the LSW VM
* Adjust LSWVirtualMachine::AttachDisk so it does not require caller to have elevated permission
* Add missing struct keyword
* PR feedback
* PR review
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Save state
* Progress
* Save state
* Move tests to socat
* Increase test coverage
* More test coverage
* Cleanup before PR
* Cleanup before PR
* Refresh branch
* Update comment
* Only run LSW tests on wsl2
* Fix missing '.0' in flight-stage.yml
* Revert "Fix missing '.0' in flight-stage.yml"
This reverts commit 9b3e9ae38f5086b201f2100bf4196a7afe14d9eb.
* PR suggestions
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Various fixes and improvements to the WSLA VM logic (#13338)
* Various fixes in the WSLA VM logic
* Update tests
* Fix ARM build
* LF
* Disable Firewall in WSLA VM config (#13345)
* Disable Firewall in WSLA VM config
* Add a version check
* Update setup-vm-for-tests.ps1 to include WSLA dll (#13362)
* Implement WSLA API's to query installed components, and install them when needed (#13363)
* Save state
* Save state
* Add tests
* Finalize tests
* Remove test logic
* Implement WSLA API to unmount & detach disks (#13364)
* Implement WSLA API to unmount & detach disks
* Add WSL2_TEST_ONLY();
* Fix wslg path
* Extend WslWaitForLinuxProcess test coverage (#13366)
* Add pipeline logic to publish nuget packages in the nightly pipeline (#13337)
* Add pipeline logic to publish nuget packages in the nightly pipeline
* Yaml
* Remove condition
* Fix version number
* Fix path
* Fix path
* Add support for using Linux files as processes' file descriptors (#13382)
* Save state
* Save state
* Add support for using Linux files as processes' file descriptors
* Cosmetics
* Missing return
* Signal the VM termination event to unblock any pending call when the service stops (#13389)
* Implement WSLA API to mount and unmount Windows folders via plan9 (#13393)
* Implement WSLA API to mount and unmount Windows folders via plan9
* Better handle when the folder is manually unmounted from the guest
* Add a test case to cover non plan9 mounts
* Update test
* wsla: do not leak fd's to user processes (#13406)
* Remove leftover logline in WSLA init (#13407)
* Implement WSLA GPU support (#13400)
* Implement WSLA GPU support
* Spelling
* Fix remaining typos
* More typos
* Merge
* Remove extra logline
* wsla: Refactor API to define `wsl` prefix on all types (#13410)
* Implement WSLA GPU support
* Spelling
* Fix remaining typos
* More typos
* Merge
* Remove extra logline
* Save state
* Reduce enum name
* Format
* Merge
* Fix merge
* Prepare for PR
* Update nuspec
* Pipeline update
* Implement WSL package version check (#13457)
* wsla: Mount the target on / when the chroot flag is set (#13455)
* wsla: Mount the target on / when the chroot flag is set
* Reuse existing helper
* wsa: Signa wsaclient.dll when building for release (#13466)
* wsa: Signal wsaclient.dll when building for release
* Typo
* Debug
* Debug
* Explicitely set targets to be built
* Build bundle
* Build tests before msipackage
* Build tests before msipackage
* Simplify
* Simplify
* wsla: Use a mount timeout when mounting a disk (#13471)
* Add an option to put a nuget suffix in the release pipeline parameters (#13474)
* Add an option to put a nuget suffix in the release pipeline parameters
* Yaml
* Yaml
* Yaml
* wsla: Implement writeable overlayfs support for GPU mounts
* Cleanup
* Typo
* Conflicts
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Implement WSLA API to mount and unmount Windows folders via plan9
* Better handle when the folder is manually unmounted from the guest
* Add a test case to cover non plan9 mounts
* Update test
* Merge User/oneblue/prototype lsw to a feature/wsl-for-apps (#13278)
* Save state
* Save state
* Save state
* Get the VM booting
* VM booting
* Disk mounting
* CreateLinuxProcess
* Move to a proper API
* Implement env
* Progress on fd
* Redesign fork model
* Add process wait & signal
* Include nuget package
* Format
* Format
* Format
* Cleanup
* Format
* Format
* Format
* Fix nuspec
* Implement VM termination
* Add lsw dll
* Implement termination callbacks
* Save state
* Various fixes in API header
* Save state
* Test coverage
* Don't block all signals by default
* Writeable overlay
* Add struct keyword
* rename WslCreateVirualMachine -> WslCreateVirtualMachine
* rename Environmnent -> Environment
* rename HandleToUlong -> HandleToULong
* ensure correct amount of memory is used to create the LSW VM
* Adjust LSWVirtualMachine::AttachDisk so it does not require caller to have elevated permission
* Add missing struct keyword
* PR feedback
* PR review
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Save state
* Progress
* Save state
* Move tests to socat
* Increase test coverage
* More test coverage
* Cleanup before PR
* Cleanup before PR
* Refresh branch
* Update comment
* Only run LSW tests on wsl2
* Fix missing '.0' in flight-stage.yml
* Revert "Fix missing '.0' in flight-stage.yml"
This reverts commit 9b3e9ae38f5086b201f2100bf4196a7afe14d9eb.
* PR suggestions
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Save state
* Save state
* Save state
* Get the VM booting
* VM booting
* Disk mounting
* CreateLinuxProcess
* Move to a proper API
* Implement env
* Progress on fd
* Redesign fork model
* Add process wait & signal
* Include nuget package
* Format
* Format
* Format
* Cleanup
* Format
* Format
* Format
* Fix nuspec
* Implement VM termination
* Add lsw dll
* Implement termination callbacks
* Save state
* Various fixes in API header
* Save state
* Test coverage
* Don't block all signals by default
* Writeable overlay
* Add struct keyword
* rename WslCreateVirualMachine -> WslCreateVirtualMachine
* rename Environmnent -> Environment
* rename HandleToUlong -> HandleToULong
* ensure correct amount of memory is used to create the LSW VM
* Adjust LSWVirtualMachine::AttachDisk so it does not require caller to have elevated permission
* Add missing struct keyword
* PR feedback
* PR review
---------
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Configure defender process exceptions when running tests
* Use explicit %ls
* Save state
* Save state
* Add exceptions before the package is installed
* Remove extra call
* Initial plan
* Fix WSL terminal fragment profiles to support Terminal's startingDirectory
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* clang format
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
* Switch WSLg to use wslinfo --vm-id instead of relying on environment variable
* DO NOT MERGE: bad WSLg nuget
* dead code removal
* always send response to LxInitMessageQueryVmId message
* add back invalid WslInfoMode error
* remove unneeded wsl2 check
* use temporary workaround until WSLg update is ready
* unit test update
* Update string compare
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>
* link: report them to the Microsoft Security Response Center (MSRC)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* link: Microsoft Security Response Center
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: , or
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: adapters
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: at
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the github issue number in the subject, and include a link to your github issue comment in the message body.
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: disk
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: effect
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: for the file
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: for the mount to be available
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: grandchild
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: last pid
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: nonexistent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: on which the...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: path
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: pseudo
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: script
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: service, the
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: session
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: strip
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: that a
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: that the
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: the first one we find in the test
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: to which
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: waitpid
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: whether
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: while the relay was being set up,
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: with an
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: without specifying
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
---------
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Ben Hillis <benhillis@gmail.com>