270 Commits

Author SHA1 Message Date
Blue
0c9f76c3a8 Fix race condition in ElevatedTokenCanOpenNonElevatedHandles test case (#40071) 2026-04-01 18:15:07 -07:00
David Bennett
5d2391f96c Fix and improve interactive tests (#40069) 2026-04-01 17:03:51 -07:00
beena352
dee42d80cb Add port mappings to container list output (#14438) 2026-04-01 16:34:13 -07:00
beena352
801b145021 Add repository, tag, ID and created columns to image list output (#40043) 2026-04-01 16:19:22 -07:00
Blue
1cab9b06b8 Switch DmesgOutput to a WSLCHandle (#40063) 2026-04-01 13:51:09 -07:00
Kevin Vega
148545eae7 List and inspect named volumes (#14555) 2026-04-01 12:10:20 -07:00
David Bennett
a6746d1356 CLI: Add Terminate Session command (#40058) 2026-04-01 11:49:24 -07:00
JohnMcPMS
f0b9455bbe Implement SDK inspect and VHD management (#14545)
Implements `WslcInspectContainer` and `WslcCreateSessionVhd`; adds `WslcSetContainerSettingsNamedVolumes` so that the VHDs are useful.
2026-04-01 11:18:58 -07:00
Blue
c98558e9cc Use COM marshalling to exchange handles (#40056)
* Prototype

* Save state

* Save state

* Save state

* Save state

* Save state

* Save state

* Remove zeroing

* Apply PR feedback

* Add test coverage

* Format

* Add test coverage for null handles
2026-04-01 09:28:28 +00:00
David Bennett
51dc5f872e CLI: Table Output updates (#14534) 2026-04-01 07:35:01 +00:00
John Stephens
713fcda944 Add support for build logs (#40054) 2026-03-31 20:38:29 -07:00
Blue
40e57130df Fix race condition in ContainerLogs test case (#40052) 2026-03-31 17:57:51 -07:00
beena352
ff0abc2674 wslc Pretty-print JSON output for inspect and list commands (#40051) 2026-03-31 17:10:53 -07:00
David Bennett
e1d5a81b60 CLI: Create elevated and non-elevated sessions (#40047) 2026-03-31 23:55:37 +00:00
JohnMcPMS
fcf2973853 Implement SDK CanRun (#14539)
Implements `WslcCanRun` using existing primitives.  Updates the component flag names to help better describe their meaning and adds comments to further do so.

Also changes the error returned when we cannot create a `WSLASessionManager` and WSL is installed at a version below the minimum for WSLC support.
2026-03-31 15:51:21 -07:00
AmirMS
103fd28126 [CLI] Add initial support for image saving feature (#14557)
* Initial support for image save

* Added e2e tests

* Added session option

* Clang format

* Clang format

* Addressed comments

* CLang format
2026-03-31 20:10:01 +00:00
Kevin Vega
42e97b63bf Fix a race in container start -a for short-lived containers. (#14558) 2026-03-31 12:12:40 -07:00
Blue
37a5a99d9d Implement WSLAContainer::Kill() (#14560)
* Implement WSLAContainer::Kill()

* Add test coverage

* Format

* Apply PR feedback
2026-03-31 12:06:55 -07:00
Blue
832b0f7b50 Update wslc build to look for Containerfile and Dockerfile (#40045)
* Save state

* Add test coverage

* Rename method

* Require input handle in the service

* Apply PR feedback

* Format

* Apply PR feedback + update tests

* Format
2026-03-31 11:40:11 -07:00
Ben Hillis
ae3563ff60 Validate empty host path in VolumeMount::Parse (#40031)
* Validate empty host path in VolumeMount::Parse

When parsing volume mount specs without a mode suffix (e.g. ':container'),
the host path validation was skipped, producing a VolumeMount with an empty
host path. This would propagate to MountWindowsFolder('') and produce a
confusing error.

Add validation after computing m_hostPath to reject empty host paths with
a clear error message in all cases.

* add test coverage

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-31 18:00:33 +00:00
John Stephens
dc7ec8f442 Add cancellation to image build (#14453) 2026-03-30 18:27:24 -07:00
AmirMS
6ae762d838 Remove options that are not yet implemented (#40044) 2026-03-31 00:03:13 +00:00
David Bennett
476c7666d7 CLI: Implement --session argument and session targeting (#14368) 2026-03-30 23:04:27 +00:00
Ben Hillis
68055596ee Reject port mappings exceeding 63-port limit in relay (#40035)
WaitForMultipleObjects has a 64-handle limit. The accept thread uses
1 handle for the exit event, leaving room for 63 port mappings.

Reject new port mappings with ERROR_TOO_MANY_OPEN_FILES when the limit
is reached, rather than crashing the relay thread. Existing mappings
continue to work.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-30 13:00:35 -07:00
Kevin Vega
cc5f358e05 Allow retrieving state and init process info after container auto remove (#14429)
Allow clients to continue reading stdout/stderr and querying state from containers after they've been deleted, by caching the read-only data in the com wrapper.
2026-03-29 22:21:02 +00:00
Blue
933aedc79e Correctly set FileOffsets in WriteHandle (#14562)
* Correctly set FileOffsets in WriteHandle

* Apply PR suggestions
2026-03-28 11:44:02 -07:00
Blue
e7c520efd8 Use pre-imported container images in the tests to avoid hitting the API limit (#14561)
* Use pre-imported container images in the tests to avoid hitting the API limit

* Fix test case

* Update test/windows/wslc/e2e/WSLCE2EImageBuildTests.cpp

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 18:51:44 -07:00
Blue
7483642048 Various improvements to PullImage() + custom registry support (#14549)
* Save state

* Save state

* Handle issues during pull

* Disable the pull tests

* Update the CLI tests

* Format

* Fix legacy index logic

* Add test coverage for failed PullImage()

* Update test/windows/WSLCTests.cpp

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 18:50:56 -07:00
Blue
d5071295c1 Various improvements to interactions with user-provided handles (#14486)
* Save state

* Add test coverage

* Check the event under the lock

* Apply PR feedback

* Format

* Apply PR feedback
2026-03-27 16:13:29 -07:00
yao-msft
d853104812 Initial wslc settings support (#14548) 2026-03-27 14:46:51 -07:00
AmirMS
92b8634544 [CLI] Added support for entrypoint (#14552)
* Added entrypoint

* Enhance tests
2026-03-27 20:26:58 +00:00
Ben Hillis
8973aeb8b5 cleanup: rename wsla -> wslc (#14502)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-27 11:39:25 -07:00
Ben Hillis
a8205a85ba merge master -> feature/wsl-for-apps (#14537)
* test: enable virtiofs tests and enable WSLG during testing (#14387)

* test: enable virtiofs tests and enable WSLG during testing

* test fix

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* chore(distributions): Almalinux auto-update - 20260311 14:52:02 (#14404)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix CVE-2026-26127: bump .NET runtime from 10.0.0 to 10.0.4 (#14421)

Addresses Dependabot alerts #10 and #11. The Microsoft.NETCore.App.Runtime
packages (win-x64 and win-arm64) at version 10.0.0 are vulnerable to a
denial of service via out-of-bounds read when decoding malformed Base64Url
input (CVSS 7.5 High). Bumped to 10.0.4 which includes the fix.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Notice change from build: 141806547 (#14423)

Co-authored-by: WSL notice <noreply@microsoft.com>

* Ship initrd.img in MSI using build-time generation via powershell script (#14424)

* Ship initrd.img in MSI using build-time generation via tar.exe

Replace the install-time CreateInitrd/RemoveInitrd custom actions with a
build-time step that generates initrd.img using the Windows built-in
tar.exe (libarchive/bsdtar) and ships it directly in the MSI.

The install-time approach had a race condition: wsl.exe could launch
before the CreateInitrd custom action completed, causing
ERROR_FILE_NOT_FOUND for initrd.img.

Changes:
- Add CMake custom command to generate initrd.img via tar.exe --format=newc
- Add initrd.img as a regular file in the MSI tools component
- Remove CreateInitrd/RemoveInitrd custom actions from WiX, DllMain,
  and wslinstall.def
- Remove CreateCpioInitrd helper and its tests (no longer needed)
- Update pipeline build targets to build initramfs instead of init

* pr feedback

* more pr feedback

* switch to using a powershell script instead of tar.exe

* powershell script feedback

* hopefully final pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* virtiofs: update logic so querying virtiofs mount source does not require a call to the service (#14380)

* virtiofs: update logic so querying virtiofs mount source does not require a call to the service

* more pr feedback

* use std::filesystem::read_symlink

* pr feedback and use canonical path in virtiofs symlink

* make sure canonical path is always used

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* virtio networking: add support for ipv6 (#14350)

* VirtioProxy: Add IPv6 address, gateway, and route support

- Add PreferredIpv6Address field and GetBestGatewayV6* methods to NetworkSettings
- Extend GetHostEndpointSettings() to discover IPv6 unicast address and gateway
- Add UpdateIpv6Address() using ModifyGuestEndpointSettingRequest<IPAddress>
- Push IPv6 default route to guest via UpdateDefaultRoute(AF_INET6)
- Remove AF_INET6 early return in ModifyOpenPorts, use INETADDR_PORT()
- Add EndpointRoute::DefaultRoute() static factory
- Pass client_ip_ipv6 in devicehost options (not yet parsed by devicehost)
- Remove gateway_ip from devicehost options (only needed for DHCP)
- Include IPv6 DNS servers in non-tunneling DNS settings
- Add ConfigurationV6 and DnsResolutionAAAA tests

* cleanup and add more ipv6 tests

* added test coverage and minor updates

* clang format

* pr feedback

* format source

* pr feedback

* test fixes

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Track `bind` syscall when port is 0 (#14333)

* Initial work

* .

* pr feedback and add unit test

* minor tweaks an fix use after free in logging statement

* implement PR feedback

* hopefully final pr feedback

* pr feedback in test function

* Address PR feedback: add try/catch to TrackPort and PortZeroBind queue push

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Add iptables to list of apps to install in WSL (#14459)

There were instructions already on how to install tcpdump in WSL, but
iptables are also needed for the log collection to be complete, so this
PR adds instructions on how to also install iptables.

Co-authored-by: Andre Muezerie <andremue@linux.microsoft.com>

* Update Microsoft.WSL.DeviceHost to version 1.1.39-0 (#14460)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Moves all Ubuntu distros to the tar-based format (#14463)

* Move all supported Ubuntu images to the new format

We backported the build pipeline so all current LTSes come out in the new tar-based format

* Remove the appx based distros

All WSL users can run tar-based distros by now, right?
There is no benefit in maintaining both formats.

* Enable DNS tunneling for VirtioProxy networking mode (#14461)

- Allow VirtioProxy to keep EnableDnsTunneling=true in config, but clear
  socket-specific options (BestEffortDnsParsing, DnsTunnelingIpAddress)
- Suppress dedicated DNS tunneling hvsocket for VirtioProxy; tunneling
  is handled through the VirtioNetworking device host instead
- Set DnsTunneling flag on VirtioNetworkingFlags so the device host
  knows to tunnel DNS
- Expand SWIOTLB kernel cmdline to cover VirtioFs and VirtioProxy
- Bump DeviceHost package to 1.1.39-0
- Add VirtioProxy DNS test coverage for tunneling on/off
- Skip GuestPortIsReleasedV6 on Windows 10

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* test: disable LoopbackExplicit due to OS build 29555 regression (#14477)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Refactor: trim unnecessary DLL deps from COMMON_LINK_LIBRARIES (#14426)

* Refactor: trim unnecessary DLL deps from COMMON_LINK_LIBRARIES

- Split MSI/Wintrust install functions from wslutil.cpp into install.cpp
- Remove MI.lib, wsldeps.lib, msi.lib, Wintrust.lib, computecore.lib,
  computenetwork.lib, Iphlpapi.lib from COMMON_LINK_LIBRARIES
- Add per-target MSI_LINK_LIBRARIES, HCS_LINK_LIBRARIES, SERVICE_LINK_LIBRARIES
- Delay-load msi.dll and WINTRUST.dll for wsl.exe and wslg.exe
- Result: wslhost, wslrelay, wslcsdk, testplugin lose msi/wintrust startup imports;
  wsl.exe and wslg.exe defer msi/wintrust loading until actually needed;
  wslservice is the only target that imports computecore/computenetwork/Iphlpapi

* minor fixes to install.cpp that were caught during PR

* move to wsl::windows::common::install namespace

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Fix wsl stuck when misconfigured cifs mount presents (#14466)

* detach terminal before running mount -a

* Potential fix for pull request finding

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

* use _exit on error before execv in child process to avoid unintentional resource release

* Add regression test

* Fix clang format issue

* fix all clang format issue

* Potential fix for pull request finding

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

* resolve ai comments

* move test to unit test

* Fix string literal

* Overwrite fstab to resolve pipeline missing file issue

---------

Co-authored-by: Feng Wang <wangfen@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update localization and notice scripts to target the branch that the pipeline is running on (#14492)

* test: Add arm64 test distro support (#14500)

* test: Add arm64 test distro support

* update unit test baseline

* more test baseline updates

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* test: remove duplicated DNS test coverage (#14522)

* test: remove duplicated DNS test coverage

* format source

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Fix: Fail and warn the user when --uninstall is given parameters (#14524)

Fail and warn the user when --uninstall is given parameters.

* Localization change from build: 142847827 (#14525)

Co-authored-by: WSL localization <noreply@microsoft.com>

* virito net: revert to previous DNS behavior while we debug an issue with DNS over TCP (#14532)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* devicehost: update to latest devicehost nuget with tracing improvements (#14531)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* fix merge issues

---------

Co-authored-by: Ben Hillis <benhill@ntdev.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>
Co-authored-by: Blue <OneBlue@users.noreply.github.com>
Co-authored-by: WSL notice <noreply@microsoft.com>
Co-authored-by: Daman Mulye <daman_mulye@hotmail.com>
Co-authored-by: Andre Muezerie <108841174+andremueiot@users.noreply.github.com>
Co-authored-by: Andre Muezerie <andremue@linux.microsoft.com>
Co-authored-by: Carlos Nihelton <carlos.santanadeoliveira@canonical.com>
Co-authored-by: Feng Wang <wang6922@outlook.com>
Co-authored-by: Feng Wang <wangfen@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-26 17:10:59 -07:00
AmirMS
9a0b267015 Initialize environment and add E2E tests with formatting (#14475)
* Init env

* Added E2E tests

* Clang format

* WIP

* Init tests

* Added UT

* Added more UT

* Added more E2E Tests

* Added more E2E Tests

* Code enhancement

* Added more E2E Tests

* Added more E2E Tests

* Added more E2E Tests

* Clang format

* Resolve copilot comment

* Addressed comments

* Fix test

* Addressed comments
2026-03-26 01:00:17 +00:00
Ben Hillis
72a980d881 test: add support for ARM64 WSLC testing. (#14519)
---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-25 15:23:41 -07:00
JohnMcPMS
7b1b60274e Implement SDK IO callbacks (#14462)
Implements `WslcSetProcessSettingsIOCallback` and the use of those inputs for both initial and subsequent processes.  A new thread is started to run the `MultiHandleWait` and the container/process objects hold a `shared_ptr` reference to it.  The caller must keep one of the objects alive for the callback thread to keep working.
2026-03-25 14:56:09 -07:00
AmirMS
d154bd021d Add more WSLC E2E tests (#14365)
* Initial support for WSLC E2E tests

* More E2E tests

* More E2E tests

* WIP

* CP exit code fix

* Enhance structure

* Added E2E file

* Clang format

* Added E2E test

* Enhance structure

* Clang format

* Update header comment

* Update wslc path

* Resolving copilot comments

* Added E2E test

* Pull latest

* Addressed comments

* Addressed comments

* Clang format

* Addressed comments

* Load image

* Addressed comments

* Pull latest

* Addressed comments

* E2E test for wslc container delete

* Addressed comments

* Resolving copilot comments

* Added E2E test

* Added E2E test

* Added E2E test

* Added E2E test

* Added E2E test

* Added E2E test

* Added E2E test

* Added E2E test

* Added E2E test

* Fix test

* Added E2E tests

* Added E2E tests

* Added E2E tests

* Added E2E tests

* Added E2E tests

* Added E2E tests

* Added E2E tests

* Resolve copilot comment

* Clang format

* Replace S_OK with 0

* Resolve copilot comment

* Addressed comments

* Resolve copilot comment

* Update test after latest changes
2026-03-25 20:07:33 +00:00
AmirMS
b6c0814538 Rename image delete to remove and add aliases (#14521)
* Rename image delete to remove

* Clang format
2026-03-24 23:02:42 -07:00
Flor Chacón
638a3cd571 Add DCAT registration remediation (#14450) 2026-03-24 13:38:02 -07:00
AmirMS
34fefa7555 Add volume alias (#14518)
* Add volume alias

* Fix Tests
2026-03-24 18:29:34 +00:00
Blue
72295b89d3 Rethink image parsing logic (#14496)
* Save state

* Rethink image parsing to correctly handle different reference formats

* Foramt

* Fix merge

* Apply PR feedback

* Format

* Apply PR feedback

* Use a regex based parser

* Format

* Reset the test session after termination

* Fix test case

* Apply PR feedback
2026-03-23 20:57:07 -07:00
Kevin Vega
237b92c9d7 Add VHD mounts as named volumes (#14362)
* Added VHD named volumes

* Clean up vhd volume

* Cleanup

* Formatting

* Add options validation

* Rename

* Format

* using utf8 instead of wide chars

* Validate volumes

* Tidying

* Rename resource

* Undo changes to es-ES

* Undo changes to es-ES

* Fix resources files

* Fix resources file (again)

* Fix idl ordering

* Fix rsources file again

* fix resources again

* Fix formatting

* Moved named volume handling to docker.

* Add named volume validation

* Fix test case

* Fix

* Fix Docker Client's CreateVolume

* Persist volume

* Refactor

* Address copilot comments

* Address copilot suggestions

* Log detach errors

* Address copilot comments

* Use volumes lock

* Update comment

* Address copilot comments

* Fix formatting

* Address copilot comments

* Fix formatting

* Potential fix for pull request finding

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

* Fix duplicate check

* Potential fix for pull request finding

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

* Address PR comments

* Copilot suggstion

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-23 10:47:36 -07:00
David Bennett
da35243025 CLI: Add Interactive test class and E2E tests for interactive scenarios (#14389) 2026-03-23 07:35:55 +00:00
AmirMS
e3918c2987 Initial support for port mapping in CLI (#14225)
* Init logic

* Readonly

* Init binding

* Formatting

* Resolve conflicts

* Added UT

* clang format

* Resolving copilot comments

* Resolving copilot comments

* Resolving comments

* Resolving comments

* Clang format

* Remove port allocation logic

* Clang format

* More UT

* Update container service

* Added E2E tests

* Added E2E tests

* cLang format

* cLang format

* Resolve copilot comment

* Clang format

* Addressed comments

* Resolve copilot comment

* Clang format

* Addressed comments

* Clang format
2026-03-20 21:57:25 +00:00
Ben Hillis
14c60ff097 merge master -> feature/wsl-for-apps (#14465)
* test: enable virtiofs tests and enable WSLG during testing (#14387)

* test: enable virtiofs tests and enable WSLG during testing

* test fix

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* chore(distributions): Almalinux auto-update - 20260311 14:52:02 (#14404)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix CVE-2026-26127: bump .NET runtime from 10.0.0 to 10.0.4 (#14421)

Addresses Dependabot alerts #10 and #11. The Microsoft.NETCore.App.Runtime
packages (win-x64 and win-arm64) at version 10.0.0 are vulnerable to a
denial of service via out-of-bounds read when decoding malformed Base64Url
input (CVSS 7.5 High). Bumped to 10.0.4 which includes the fix.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Notice change from build: 141806547 (#14423)

Co-authored-by: WSL notice <noreply@microsoft.com>

* Ship initrd.img in MSI using build-time generation via powershell script (#14424)

* Ship initrd.img in MSI using build-time generation via tar.exe

Replace the install-time CreateInitrd/RemoveInitrd custom actions with a
build-time step that generates initrd.img using the Windows built-in
tar.exe (libarchive/bsdtar) and ships it directly in the MSI.

The install-time approach had a race condition: wsl.exe could launch
before the CreateInitrd custom action completed, causing
ERROR_FILE_NOT_FOUND for initrd.img.

Changes:
- Add CMake custom command to generate initrd.img via tar.exe --format=newc
- Add initrd.img as a regular file in the MSI tools component
- Remove CreateInitrd/RemoveInitrd custom actions from WiX, DllMain,
  and wslinstall.def
- Remove CreateCpioInitrd helper and its tests (no longer needed)
- Update pipeline build targets to build initramfs instead of init

* pr feedback

* more pr feedback

* switch to using a powershell script instead of tar.exe

* powershell script feedback

* hopefully final pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* virtiofs: update logic so querying virtiofs mount source does not require a call to the service (#14380)

* virtiofs: update logic so querying virtiofs mount source does not require a call to the service

* more pr feedback

* use std::filesystem::read_symlink

* pr feedback and use canonical path in virtiofs symlink

* make sure canonical path is always used

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* virtio networking: add support for ipv6 (#14350)

* VirtioProxy: Add IPv6 address, gateway, and route support

- Add PreferredIpv6Address field and GetBestGatewayV6* methods to NetworkSettings
- Extend GetHostEndpointSettings() to discover IPv6 unicast address and gateway
- Add UpdateIpv6Address() using ModifyGuestEndpointSettingRequest<IPAddress>
- Push IPv6 default route to guest via UpdateDefaultRoute(AF_INET6)
- Remove AF_INET6 early return in ModifyOpenPorts, use INETADDR_PORT()
- Add EndpointRoute::DefaultRoute() static factory
- Pass client_ip_ipv6 in devicehost options (not yet parsed by devicehost)
- Remove gateway_ip from devicehost options (only needed for DHCP)
- Include IPv6 DNS servers in non-tunneling DNS settings
- Add ConfigurationV6 and DnsResolutionAAAA tests

* cleanup and add more ipv6 tests

* added test coverage and minor updates

* clang format

* pr feedback

* format source

* pr feedback

* test fixes

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Track `bind` syscall when port is 0 (#14333)

* Initial work

* .

* pr feedback and add unit test

* minor tweaks an fix use after free in logging statement

* implement PR feedback

* hopefully final pr feedback

* pr feedback in test function

* Address PR feedback: add try/catch to TrackPort and PortZeroBind queue push

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Add iptables to list of apps to install in WSL (#14459)

There were instructions already on how to install tcpdump in WSL, but
iptables are also needed for the log collection to be complete, so this
PR adds instructions on how to also install iptables.

Co-authored-by: Andre Muezerie <andremue@linux.microsoft.com>

* Update Microsoft.WSL.DeviceHost to version 1.1.39-0 (#14460)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Moves all Ubuntu distros to the tar-based format (#14463)

* Move all supported Ubuntu images to the new format

We backported the build pipeline so all current LTSes come out in the new tar-based format

* Remove the appx based distros

All WSL users can run tar-based distros by now, right?
There is no benefit in maintaining both formats.

* Enable DNS tunneling for VirtioProxy networking mode (#14461)

- Allow VirtioProxy to keep EnableDnsTunneling=true in config, but clear
  socket-specific options (BestEffortDnsParsing, DnsTunnelingIpAddress)
- Suppress dedicated DNS tunneling hvsocket for VirtioProxy; tunneling
  is handled through the VirtioNetworking device host instead
- Set DnsTunneling flag on VirtioNetworkingFlags so the device host
  knows to tunnel DNS
- Expand SWIOTLB kernel cmdline to cover VirtioFs and VirtioProxy
- Bump DeviceHost package to 1.1.39-0
- Add VirtioProxy DNS test coverage for tunneling on/off
- Skip GuestPortIsReleasedV6 on Windows 10

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* test: disable LoopbackExplicit due to OS build 29555 regression (#14477)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Refactor: trim unnecessary DLL deps from COMMON_LINK_LIBRARIES (#14426)

* Refactor: trim unnecessary DLL deps from COMMON_LINK_LIBRARIES

- Split MSI/Wintrust install functions from wslutil.cpp into install.cpp
- Remove MI.lib, wsldeps.lib, msi.lib, Wintrust.lib, computecore.lib,
  computenetwork.lib, Iphlpapi.lib from COMMON_LINK_LIBRARIES
- Add per-target MSI_LINK_LIBRARIES, HCS_LINK_LIBRARIES, SERVICE_LINK_LIBRARIES
- Delay-load msi.dll and WINTRUST.dll for wsl.exe and wslg.exe
- Result: wslhost, wslrelay, wslcsdk, testplugin lose msi/wintrust startup imports;
  wsl.exe and wslg.exe defer msi/wintrust loading until actually needed;
  wslservice is the only target that imports computecore/computenetwork/Iphlpapi

* minor fixes to install.cpp that were caught during PR

* move to wsl::windows::common::install namespace

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* wslc: enable IPv6 and DNS tunneling for virtio proxy networking mode

---------

Co-authored-by: Ben Hillis <benhill@ntdev.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>
Co-authored-by: Blue <OneBlue@users.noreply.github.com>
Co-authored-by: WSL notice <noreply@microsoft.com>
Co-authored-by: Daman Mulye <daman_mulye@hotmail.com>
Co-authored-by: Andre Muezerie <108841174+andremueiot@users.noreply.github.com>
Co-authored-by: Andre Muezerie <andremue@linux.microsoft.com>
Co-authored-by: Carlos Nihelton <carlos.santanadeoliveira@canonical.com>
2026-03-20 13:47:27 -07:00
Ben Hillis
e61174df74 Split WSLA/WSLC tests into a separate CI runner (#14472)
* Split WSLA/WSLC tests into a separate CI runner

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-20 12:40:53 -07:00
Blue
845def83ee Correctly handle import errors in LoadImage() and ImportImage(), fix broken ExportContainer test case (#14483) 2026-03-20 10:52:06 -07:00
Blue
0b1c029925 Refactor container port mapping logic (#14469)
* Save state

* Save state

* Save state

* Save state

* Save state

* Fix last issues

* Format

* Save state

* Save state

* Save state

* Clear port status during shutdown

* Add checks for virtionet

* Cleanup before PR

* Keep track of port references

* Format

* Assign iterator

* Assign iterator

* Apply PR feedback

* Apply PR feedback

* Apply PR feedback

* Apply PR feedback

* Format
2026-03-20 10:34:34 -07:00
Ben Hillis
8e3229509c WSLC: Enforce read-only VirtioFS shares at the device host level (#14464)
* Enforce read-only VirtioFS shares at the device host level

Pass the 'ro' option to AddGuestDevice when mounting a read-only
VirtioFS share, ensuring the device host enforces write protection
regardless of guest-side mount operations.

Updated DeviceHost package to 1.1.39-0. Added tests for read-only
mount enforcement via remount and unmount+remount.

* wslc: skip ejecting virtiofs flexiov device while hotplug issue is being fixed

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-20 10:34:00 -07:00
beena352
6e38728113 Add session termination coverage for Export & Save (#14458)
* Add session termination coverage for Export & Save

* clean up session termination test

* Skip delete-on-close during session termination

* Always use OpenAnonymousPipe in BlockingOperation

* Use unique_hfile in BlockingOperation
2026-03-20 09:24:55 -07:00