Commit Graph

1316 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
dfaeaf6e90 Remove using statements from VersionTasks.h, ContainerTasks.h, ImageTasks.h; use fully-qualified namespaces
Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/2adaf429-0dc1-4fc5-a234-80308f5b82c5

Co-authored-by: AmelBawa-msft <104940545+AmelBawa-msft@users.noreply.github.com>
2026-04-29 22:59:51 +00:00
copilot-swe-agent[bot]
08348df582 Localization: remove leading spaces from version table strings, handle indentation in code
Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/f6e3ba18-69e4-4ac6-a47c-893511bde8e8

Co-authored-by: AmelBawa-msft <104940545+AmelBawa-msft@users.noreply.github.com>
2026-04-29 22:56:19 +00:00
copilot-swe-agent[bot]
76731f879e Fix VersionTasks: use TableOutput, localize strings, remove unused include, scope using in namespace
Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/f6e3ba18-69e4-4ac6-a47c-893511bde8e8

Co-authored-by: AmelBawa-msft <104940545+AmelBawa-msft@users.noreply.github.com>
2026-04-29 22:51:43 +00:00
AmirMS
93e583a3a0 Update test/windows/wslc/e2e/WSLCE2EVersionTests.cpp 2026-04-29 15:39:20 -07:00
AmirMS
9ccbef106d Merge branch 'feature/wsl-for-apps' into user/amelbawa/version-format 2026-04-29 15:38:24 -07:00
Blue
7778055874 Skip the LoadImage() test on server SKU's (#40350)
* Skip the LoadImage() test on server SKU's

* 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-04-29 12:07:12 -07:00
Kevin Vega
0163e62d43 Use auto reset event for container stop (#40338) 2026-04-29 10:32:57 -07:00
Blue
77321ba6bf Add a temporary fix to prevent VS project load failures due to 'AnyCpu' targets (#40348)
* Add a temporary fix to prevent VS project load failures due to 'AnyCpu' targets

* Default to false
2026-04-29 01:25:16 +00:00
Ben Hillis
c2d66c8f81 Remove unreachable else branch in TTY stdin relay (#40330)
* Remove unreachable else branch in TTY stdin relay

write() on success returns a value in [0, count]. The condition
(bytesWritten <= pendingStdin.size()) is therefore always true,
making the else branch dead code. Simplify to unconditional erase.

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

* Add WI_ASSERT as defensive check for write() result

Add a WI_ASSERT to verify bytesWritten <= pendingStdin.size() as a
defensive measure, per PR feedback.

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-28 16:17:05 -07:00
Ben Hillis
219320b149 Restore CAB file creation and signing steps in build pipeline (#40337)
* Restore CAB file creation and signing steps in build pipeline

The CAB generation and ESRP code signing steps were accidentally removed
in commit 3c9c3e16 (Create NuGet for WSLC SDK). This restores both steps
in build-job.yml (the shared build template that replaced the old
build-stage.yml per-platform loop):

- PowerShell task to create .cab from .msi via makecab.exe (with error handling)
- ESRP code signing task for .cab files (release builds only)

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

* Remove redundant runtime condition on CAB signing step

The compile-time isRelease guard already prevents the step from being
included in non-release builds. The other ESRP signing tasks in this
template rely on the template-level if alone, so align CAB signing to
match.

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-28 13:07:41 -07:00
Ben Hillis
bb56feb78e Set WSLC VM owner to WSLC-<DisplayName> for debuggability (#40346)
Use the session display name in the HCS VM owner field so that
hcsdiag list output shows which session owns each VM. This aids
debugging and allows tests to reliably identify their VM.

Falls back to 'WSLC' if DisplayName is null.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-28 12:55:59 -07:00
Flor Chacón
2ebe7e472a Move definition of TFM for NuGet (#40339) 2026-04-28 11:07:43 -07:00
Ben Hillis
5abfcdd142 Fix UtilExec: remove premature Result check that breaks output capture (#40327)
Result was initialized to -1 and checked (Result < 0) inside the fgets
loop before ever being set to a success value. This caused the first
iteration to immediately goto ErrorExit, making all output capture
dead code. The Result variable is properly set after the loop completes
via pclose(), so the in-loop check was erroneous.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-27 14:27:32 -07:00
Ben Hillis
de4485519c Fix data race on crash flags in HcsVirtualMachine::OnCrash (#40328)
m_crashLogCaptured and m_vmSavedStateCaptured were plain bool members
accessed from concurrent HCS event callbacks (HcsEventSystemCrashInitiated
and HcsEventSystemCrashReport) without synchronization.

Change both to std::atomic<bool> and use exchange() to ensure only one
thread performs WriteCrashLog or EnforceVmSavedStateFileLimit for the
same crash event.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-27 14:27:27 -07:00
Ben Hillis
8a70358157 Remove duplicate object inclusion for wslc executable (#40331)
wslclib is an OBJECT library. Both \$<TARGET_OBJECTS:wslclib> in
add_executable() and target_link_libraries(wslc wslclib) include
the same object files. In CMake 3.12+, linking an OBJECT library
brings both objects and transitive dependencies, making the
generator expression redundant and potentially causing duplicate
symbol issues.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-27 14:25:51 -07:00
Flor Chacón
c429cf9bf9 Add .NET DLL for SDK projection to NuGet package (#40182) 2026-04-27 13:58:42 -07:00
Ben Hillis
8450001220 merge master -> feature/wsl-for-apps (#40317)
* merge master -> feature/wsl-for-apps

* Update WSLC init and VM to use transaction-based message protocol

The merge from master introduced a transaction-based message protocol in
SocketChannel.h, but the WSLC code paths were not updated. This caused
crashes when creating WSLC sessions because the Linux-side init expected
non-transaction messages while the Windows side sent transaction messages.

Changes:
- WSLCInit.cpp: Update all 13 HandleMessageImpl handlers to accept
  Transaction& and reply via Transaction.Send/SendResultMessage instead
  of Channel.SendMessage. Update ProcessMessages loop to use
  Channel.ReceiveTransaction().
- WSLCVirtualMachine.cpp: Convert remaining non-transaction SendMessage
  calls (WSLC_WATCH_PROCESSES, WSLC_TTY_RELAY, WSLC_EXEC) to use
  StartTransaction. Fix ConnectSocket Fd=-1 path to receive the second
  reply within the same transaction instead of a non-transaction receive.
2026-04-27 12:06:55 -07:00
AmirMS
8a6c218827 CLI: Enhance image and container inspection behavior (#40315)
* Update image and container inspect behavior

* Clang format
2026-04-27 11:31:54 -07:00
Ben Hillis
e5bded3f07 Fix missing return after accept4 failure in InteropServer::Accept (#40323)
When accept4 fails, the function logged an error but continued to call
setsockopt on an invalid file descriptor (-1) and returned the invalid
fd to the caller. Add the missing early return to prevent operating on
an invalid file descriptor.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-27 11:11:47 -07:00
Ben Hillis
c026c72412 Fix malformed WSL_E_PLUGIN_REQUIRES_UPDATE HRESULT constant (#40325)
* Fix malformed WSL_E_PLUGIN_REQUIRES_UPDATE HRESULT constant

MAKE_HRESULT expects a 16-bit code parameter, but the full 32-bit
HRESULT value 0x8004032A was being passed as the code, producing a
garbage HRESULT at runtime. Since this is a standalone plugin header
without access to WSL_E_BASE, define the HRESULT as a direct literal
matching MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x032A).

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

* Update src/windows/inc/WslPluginApi.h

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-27 09:50:30 -07:00
Blue
19a757fe5e Fixed leaked container in NamedVolumesVhdSessionRecovery causing test failures in OpenContainer (#40316)
* Fixed leaked container in NamedVolumesVhdSessionRecovery causing test failures in OpenContainer

* Update comment
2026-04-25 13:46:04 -07:00
David Bennett
c4b819d0d1 CLI: Unit test to ensure no argument name or alias collisions exist (#40312) 2026-04-24 21:58:06 +00:00
yao-msft
7baac47ff1 Localize settings output (#40297) 2026-04-24 14:26:29 -07:00
Ben Hillis
443032f748 wslc: update devicehost dll to a version that properly supports device removal (#40305)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2.8.4
2026-04-24 14:06:06 -07:00
beena352
c8521c4be4 Add gateway driverOpt support in CreateNetwork and invalid input tests (#40278) 2026-04-23 20:21:38 -07:00
Kevin Vega
6dc94e27ab Set guest voume driver as default (#40277) 2026-04-24 03:19:52 +00:00
Blue
e096a5af0f Reuse virtiofs shares when possible (#40298)
* Reuse virtiofs shares when possible

* Use weakly_canonical and only delete in plan9 mode
2.8.3
2026-04-24 02:13:46 +00:00
Blue
3f47048189 Add support for anonymous port binds and --publish-all (#40288)
* Implement WSLCContainerFlagsPublishAll flag with CLI and tests

When the PublishAll flag is set, WSLCContainerImpl::Create() inspects the
container image to discover its ExposedPorts, creates TCP port mappings for
each exposed port that doesn't already have an explicit mapping, and uses
the resolved image ID for the container creation request to ensure the
same image is used.

CLI changes:
- Add --publish-all / -P flag to 'container create' and 'container run'
- Wire through ContainerOptions -> WSLCContainerFlagsPublishAll
- Add localization string for the new argument

Tests:
- PublishAllExposedPorts: builds an image with EXPOSE 8080 and 9090,
  verifies both ports get auto-mapped and the HTTP server is reachable
- PublishAllImageNotFound: verifies IMAGE_NOT_FOUND is returned when
  the flag is set with a nonexistent image

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

* Save state

* Prepare for PR

* Clean diff

* Cleanup diff

* Cleanup diff

* Apply PR feedback

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 18:38:57 -07:00
AmirMS
c01daaeb40 CLI: Add DNS support in CLI (#40290)
* Init DNS support

* Fix build

* Clang format

* Add DNS CLI test cases to CommandLineTestCases.h

Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/b2ba2343-14c4-4af2-8a56-838b63b48f31

Co-authored-by: AmelBawa-msft <104940545+AmelBawa-msft@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-23 22:17:47 +00:00
yao-msft
dcc50e23ec Update settings defaults and warn on unknown keys (#40268) 2026-04-23 14:27:38 -07:00
AmirMS
7f1792d548 CLI: Initialize domainname option (#40281)
* Init domainname option

* CLang format
2026-04-23 12:21:20 -07:00
JohnMcPMS
ebf2652f68 SDK API review changes (#40265) 2026-04-23 08:23:02 -07:00
AmirMS
de90b82150 CLI: add support for hostname option (#40279)
* Init hostname

* CE
2026-04-22 23:35:39 -07:00
JohnMcPMS
042d76c44d SDK Install function implementation (#40266)
Implements `WslcInstallWithDependencies` using existing functions to determine which components are required and to install the Virtual Machine component.  Adds implementation of WU API installation flow.

For testing purposes, the WU API implementation takes in an object factory and is broken into the largely independent steps of searching, downloading, and installing the WSL package.  The actual use leverages a convenience method that implements the overall flow.
2026-04-22 17:37:13 -07:00
Blue
928ba164a6 Solve various issues when refreshing the virtionet connection (#40267)
* Save state

* Fix the threading model

* Prepare for PR

* Use GIT instead

* Format

* Initialize fields
2026-04-22 17:05:06 -07:00
AmirMS
72ae9a3070 CLI: Initial support for inspect command (#40211)
* Remove options that are not yet implemented

* Init inspect

* Clang format

* Try inspect

* Added tests

* Clang format

* Loc

* Revert format loc

* Resolve copilot comment
2026-04-22 22:31:27 +00:00
Kevin Vega
b70ae14303 Add "guest" volume driver (#40255) 2026-04-22 21:56:25 +00:00
beena352
e53fef3258 wslc: add network inspect (#40250) 2026-04-22 10:32:31 -07:00
AmirMS
15097413b7 CLI: Initial support for volume commands (#40139)
* Init volume command

* WIP

* Create

* CLang format

* Volume command

* Added E2E tests

* Clang format

* Resolve copilot comment

* Revert test in run/create

* Rename delete to remove

* Resolve copilot comment

* Resolve copilot comment

* Fix e2e tests

* Adding tests

* Adding tests

* Adding tests

* Fix tests

* Clang format

* Integrated volume

* Added integration tests

* Clang format

* Remove unused code

* Added e2E tests

* Addressed comments

* Addressed comments
2026-04-21 21:26:21 -07:00
Ben Hillis
88c07e7534 Merge latest master into feature/wsl-for-apps (#40254)
* 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>

* Localization change from build: 142949177 (#14542)

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

* Revert "test: enable virtiofs tests and enable WSLG during testing (#14387)" (#14538)

* Revert "test: enable virtiofs tests and enable WSLG during testing (#14387)"

* enable wslg for SystemdNoClearTmpUnit test

---------

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

* Localization change from build: 143033415 (#14553)

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

* Update cgmanifest to match CMakeLists.txt (#14550)

* Update cgmanifest to match CMakeLists.txt

* Update CMakeLists.txt

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

---------

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

* Notice change from build: 143064110 (#14556)

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

* Update Microsoft.WSL.DeviceHost to version 1.1.48-0 (#40036)

* Update Microsoft.WSL.DeviceHost to version 1.1.48-0 (#14575)

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

* Re-enable WSLG during testing.

This reverts commit bf759a092b.

* add back config change (will work with new default, but makes test explicit)

---------

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

* Bump Kali to 2026.1 (#14574)

Release notes: https://www.kali.org/blog/kali-linux-2026-1-release/

* socketshared: add maximum message size to avoid very large allocations (#40050)

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

* Fix: bind interrupted by seccomp signal race (#14554)

* Use wait_for_completion_killable instead of the default wait_for_completion_interruptible

* retry if kernel does not support the new flag

* archlinux: Release 2026.04.01.162669 (#40059)

This is an automated release [1].

[1] https://gitlab.archlinux.org/archlinux/archlinux-wsl/-/blob/main/.gitlab-ci.yml

* triage: pass action inputs via env vars instead of inline expansion (#40060)

Move inputs.comment, inputs.issue, and inputs.token into the env
block, consistent with how inputs.previous_body is already handled.
This avoids issues with special characters in input values being
misinterpreted during shell evaluation.

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

* Set Distro Env HOSTTYPE to aarch64 for ARM64 build (#40048)

* Set Distro Env HOSTTYPE to aarch64 for ARM64 build


---------

Co-authored-by: Xin Wang (from Dev Box) <xiwang4@microsoft.com>

* devicehost: stop re-signing and fix MSI installer failing to replace wsldevicehost.dll (#40075)

* devicehost: stop re-signing and fix MSI installer failing to replace
wsldevicehost.dll

* pr feedback

* use MSIRMSHUTDOWN = 1 instead of custom action

---------

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

* docs: overhaul Copilot instructions with coding conventions and prompt files (#40113)

* docs: overhaul Copilot instructions with coding conventions and prompt files

Major update to .github/copilot-instructions.md:
- Add coding conventions (naming, error handling, RAII, strings, headers,
  synchronization, localization, telemetry, formatting, IDL/COM, config)
- Add test authoring summary pointing to detailed test.md prompt
- Add namespace-to-directory map for top-level namespaces
- Add key source files list (defs.h, WslTelemetry.h, wslc.idl, etc.)
- Replace clang-format references with .\FormatSource.ps1
- Consolidate duplicate timing info into single reference table

New files:
- .github/copilot/review.md: Review prompt focused on high-risk areas
  (ABI breaks, missing localization, resource safety)
- .github/copilot/test.md: Test generation prompt with TAEF patterns
- .github/copilot/commit.md: Commit message guidelines
- .editorconfig: Editor settings for non-C++ files

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

* docs: address PR review feedback

- Scope precomp.h guidance to Windows components (Linux doesn't use it)
- Fix review.md reference to .github/copilot-instructions.md
- Restore clang-format as Linux formatting option alongside FormatSource.ps1
- Note FormatSource.ps1 requires cmake . first
- Fix en-us -> en-US casing

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Suppress MSI-initiated reboots during Store updates (#40079)

When the WSL MSIX package is updated via the Microsoft Store, the
WslInstaller service automatically upgrades the MSI package by calling
MsiInstallProduct. This call was made with INSTALLUILEVEL_NONE (silent
install) but without setting the REBOOT=ReallySuppress property.

Per Windows Installer documentation, when a silent install encounters
files in use and REBOOT is not suppressed, the system reboots
automatically without any user prompt. This could cause unexpected
machine restarts after a Store update when WSL binaries (e.g.
wslservice.exe) were in use during the upgrade.

Every deployment script in the repo already passes /norestart to
msiexec (deploy-to-host.ps1, deploy-to-vm.ps1, install-latest-wsl.ps1,
test-setup.ps1), but the programmatic MsiInstallProduct path used by
the WslInstaller service lacked the equivalent property.

This change:
- Always appends REBOOT=ReallySuppress to MsiInstallProduct arguments
  in UpgradeViaMsi, preventing Windows Installer from ever initiating
  a system restart during install/upgrade.
- Switches UninstallViaMsi from MsiConfigureProduct to
  MsiConfigureProductEx so we can pass REBOOT=ReallySuppress during
  uninstall as well.
- Propagates ERROR_SUCCESS_REBOOT_REQUIRED (3010) to callers instead
  of swallowing it. User-facing paths (wsl --update, wsl --uninstall)
  print a reboot-needed message to stderr. The background WslInstaller
  service silently treats 3010 as success since it has no console.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix UnicodeEncodeError in create-release.py on cp1252 consoles (#40127)

* Fix UnicodeEncodeError in create-release.py on cp1252 consoles

Reconfigure stdout/stderr with errors='backslashreplace' so commit
messages containing characters outside the console code-page (e.g.
U+2225) are escaped instead of crashing the script.  Also redirect the
'failed to extract PR number' warning to stderr for consistency.

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

* Fix return type annotation for get_github_pr_message()

Update the return annotation from str to tuple[str | None, str | None]
to match the actual return values (pr_body, pr_number).

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* build: add Source Link to embed GitHub source mappings in PDBs (#40055)

* build: add Source Link to embed GitHub source mappings in PDBs

* Gate Source Link on pipeline builds only

Only generate sourcelink.json and pass /SOURCELINK to the linker when
PIPELINE_BUILD_ID is defined (i.e. during CI pipeline builds). This
avoids unnecessary Source Link artifacts in local developer builds.

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add /attachdebugger option to automatically launch WinDbgX for test debugging (#40116)

* Add /attachdebugger option to automatically launch WinDbgX for test debugging

When /attachdebugger is passed to test.bat, run-tests.ps1 now:
- Starts te.exe with /waitfordebugger in the background
- Polls for the TE.ProcessHost.exe child process via WMI
- Launches WinDbgX attached directly to the test host PID
- With /inproc, attaches to TE.exe itself instead

This replaces the manual workflow of running /waitfordebugger, reading
the PID from the output, and launching WinDbgX separately.

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

* run-tests: use /inproc with /attachdebugger, simplify exit

Per review feedback from @OneBlue:
- Add /inproc when /attachdebugger is set so WinDbgX attaches
  directly to TE.exe instead of polling for TE.ProcessHost.exe
- Simplify exit to pass through TE.exe exit code directly

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

* docs: update /attachdebugger to reflect /inproc behavior

The script now always adds /inproc, so update the README to match:
WinDbgX attaches directly to TE.exe, no ProcessHost polling.

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Replace pre-commit hook with CMake-generated clang-format check (#40136)

* Replace pre-commit hook with CMake-generated clang-format check

Replace the old pre-commit hook that shelled out to PowerShell and
never blocked commits (-NoFail) with a CMake-generated hook that
calls clang-format directly on staged C/C++ files.

- Add tools/hooks/pre-commit.in as a CMake template
- CMake resolves the clang-format path at configure time via
  LLVM_INSTALL_DIR, matching the existing FormatSource.ps1.in pattern
- Hook blocks commits on formatting errors, skips gracefully if
  clang-format is not available (cmake not yet run)
- ~5x faster than the old PowerShell approach (~0.5s vs ~2.6s)

* Make pre-commit hook behavior configurable via WSL_PRE_COMMIT_MODE

Add WSL_PRE_COMMIT_MODE CMake cache variable with three modes:
- warn (default): report formatting issues without blocking commit
- error: block commit when formatting issues are found
- fix: auto-format files and re-stage them

Also addresses PR feedback:
- Generate hook into build tree, copy to source tree for out-of-source builds
- Use repo-local tools/clang-format.exe instead of LLVM_INSTALL_DIR path
- Use @ONLY in configure_file to avoid shell variable substitution issues
- Document modes in dev-loop.md and UserConfig.cmake.sample

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Split x64/arm64 builds into parallel pipeline stages (#14497)

* Split x64/arm64 builds into parallel pipeline stages

Restructure the CI/CD pipeline to build x64 and arm64 in parallel
instead of sequentially, reducing end-to-end build time.

Pipeline shapes:
- PR: build_x64 ∥ build_arm64 → test (uses installer.msix directly)
- Nightly: build_x64 ∥ build_arm64 → package → test (dev-cert bundle)
- Release: build_x64 ∥ build_arm64 → package → test (ESRP-signed bundle)

Key changes:
- Extract shared build-job.yml template parameterized by platform
- Add package-stage.yml that creates msixbundle from both platform
  artifacts, ESRP-signs for release, dev-cert signs for nightly
- PR tests run immediately after x64 build using installer.msix
  (no package stage, no bundle needed)
- Release/nightly tests wait for the package stage and test the real
  signed bundle that gets published
- CloudTest configs are parameterized: release tests pull the bundle
  from the [package] artifact, PR tests use installer.msix from [drop]
- arm64 + formatting checks always run in parallel with x64 but don't
  block the PR test gate
- CodeQL runs in the arm64 stage (off the critical path)
- flight-stage and nuget-stage updated for new stage names

* formatting

* Remove redundant runtime conditions on release-only tasks

These tasks are already wrapped in compile-time conditionals which
prevent them from being added to the pipeline definition for
non-release builds. The runtime condition checks can never evaluate
to false at that point, so they are pure noise.

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

* Address review feedback from OneBlue

- Remove wslcsdk NuGet staging (wslc is not in master)
- Always include [package] provider in TestMap.xml.in instead of
  conditionally injecting via PACKAGE_PROVIDER_BLOCK cmake variable.
  PR builds simply use [drop] as TEST_PACKAGE_PROVIDER; the [package]
  provider exists but is unused.
- Add BUNDLE_ONLY cmake option so the package pipeline stage reuses
  cmake's existing bundle target instead of forking makeappx logic.
  This locks the SDK version via cmake (CMAKE_SYSTEM_VERSION) and
  keeps bundle creation logic in one place (msixinstaller/CMakeLists.txt).
  The pipeline now copies msix files to expected paths, runs a fast
  cmake configure with -DBUNDLE_ONLY=TRUE, and builds the bundle target.
- Remove dead NuGet binary restore step in package stage.

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

* Address PR review feedback

- Fix PACKAGE_VERSION regex: escape dots so only A.B.C.D is accepted
- Consolidate CMake defaults (build type, config types, output dir)
  before BUNDLE_ONLY block to avoid duplication
- Nightly tests now use the full bundle from the package stage instead
  of installer.msix (new INCLUDE_PACKAGE_STAGE cmake variable)
- Package stage reuses version output from build stage instead of
  recomputing it

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Mask console-getty.service to prevent multi-distro failures (#13595) (#14490)

* Mask console-getty.service to prevent multi-distro failures (#13595)

When multiple WSL distros run concurrently, /dev/tty devices are shared
at the VM level. The second distro's console-getty.service fails because
the tty is already held by the first, causing systemd to report failed
units and triggering user@UID.service failures.

Mask console-getty.service during WSL systemd unit generation, similar
to the existing masking of networkd-wait-online. This service provides
no value in WSL since users don't connect to the underlying tty.

Fixes #13595

* format source

* pr feedback

---------

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

* Fix random "ERROR_FILE_NOT_FOUND" when unmounting with absolute path (#40092)

Fix ERROR_FILE_NOT_FOUND when unmounting a vhd with absolute path after the vm timeouts.

* Refactor tests: use TAEF metadata for WSL version filtering (#40140)

Cherry-pick WSL1/WSL2 test changes from 9c4dba91 (feature/wsl-for-apps).

Replace runtime WSL1_TEST_ONLY()/WSL2_TEST_ONLY() skip macros with
WSL1_TEST_METHOD()/WSL2_TEST_METHOD() TAEF metadata macros. This moves
version filtering to the test runner level via /select: queries, so
inapplicable tests are excluded entirely instead of appearing as skipped.

Updated files:
- test/windows/Common.h: New macros + removed old skip macros
- test/windows/*.cpp: Converted all test methods
- tools/test/run-tests.ps1: Auto-add /select: when no user filter
- cloudtest/TestGroup.xml.in: Add version filter to TAEF args
- test/README.md: Document new macros

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix mount test build: use WSL2_TEST_METHOD macro for AbsolutePathVhdUnmountAfterVMTimeout (#40162)

Replace raw TEST_METHOD + WSL2_TEST_ONLY() with WSL2_TEST_METHOD macro,
consistent with the refactor in #40140.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix various build issues if the repo path contains a space (#40160)

* Add git entries for libarchive and boost in cgmanifest.json (#40155)

The OSPO notice@0 task cannot resolve licenses for components
registered with type 'other' (source tarballs). Add parallel
type 'git' entries pointing at the GitHub repos with the exact
commit SHAs for the release tags (v3.7.7 and boost-1.90.0).

The existing 'other' entries are kept for accurate provenance
tracking of the actual tarball downloads used by CMake
FetchContent. The 'git' entries enable the notice generator to
look up licenses from ClearlyDefined.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fixes to route mirroring (#40099)

* route fixes from protonvpn testing

* add unit test, fix log

* ai code review

* format with vs 2022

* review

* remove optional has_value checks

* harden contracts for to, via having or not having values

* update IsOnlink check

* fix constructor parameters

* fix build

---------

Co-authored-by: Catalin-Emil Fetoiu <cfetoiu@microsoft.com>

* re enable (#40156)

Co-authored-by: Catalin-Emil Fetoiu <cfetoiu@microsoft.com>

* fix wrong variable checking (#40185)

Co-authored-by: Xin Wang (from Dev Box) <xiwang4@microsoft.com>

* Add warning to collect-wsl-logs.ps1 to be displayed when tool is missing (#14447)

* Added warning message to collect-wsl-logs.ps1

* Add warning to collect-wsl-logs.ps1 to be displayed when tool is missing

On executing the log collection script, it will first confirm the
required tools tcpdump and iptables are installed. For each tool
missing a warning is displayed, reminding the user that the tool
should be installed prior to executing the script to get a more
complete log collection.

* Eliminated reduntant parameter and added handling for situation where WSL might be unavailable

* Remove try/catch from function's implementation

---------

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

* Bump Microsoft.NETCore.App.Runtime to 10.0.6 (CVE-2026-32178) (#40207)

Update Microsoft.NETCore.App.Runtime.win-x64 and
Microsoft.NETCore.App.Runtime.win-arm64 from 10.0.4 to 10.0.6 to
resolve CVE-2026-32178 (.NET Spoofing Vulnerability).

Fixes Dependabot alerts #12 and #13.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix VHD ownership after cross-volume move to prevent E_ACCESSDENIED (#40159)

* Fix VHD ownership after cross-volume move to prevent E_ACCESSDENIED

When MoveDistribution moves a VHD across volumes, MoveFileEx copies the
file and the new file's owner may not be the user's SID. This causes
HcsGrantVmAccess to fail with E_ACCESSDENIED when later launching the
distro, because the impersonated user lacks WRITE_DAC on the file
(only implicitly granted to the owner).

Fix by explicitly setting the VHD owner to the user's SID after the
move, matching what CreateVhd already does at creation time. Uses
handle-based SetSecurityInfo with FILE_FLAG_OPEN_REPARSE_POINT to
avoid TOCTOU races and symlink following.

Also fixes a pre-existing build break in MountTests.cpp from the test
refactor (WSL2_TEST_ONLY -> WSL2_TEST_METHOD).

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

* Preserve original VHD owner instead of using GetUserSid()

Instead of unconditionally setting the VHD owner to the caller's SID
after a cross-volume move, read the original owner before the move and
restore it afterward. This avoids changing ownership to someone who
didn't originally own the file.

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: use {} format specifier instead of %s in Linux LOG_ERROR path (#40227)

The Linux #else branch of SocketChannel.h uses LOG_ERROR which expects
fmt-style {} placeholders, but the channel name was using printf-style %s.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update MoveVhdOwnership test to WSL2 only (#40223)

* Initial plan

* Update MoveVhdOwnership test to WSL2 only

Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/65d80936-791c-411b-8da2-d8c1bc06e651

Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>

* fix: use ssize_t for readlinkat return value in p9file.cpp (#40226)

readlinkat() returns ssize_t, not int. On 64-bit systems this could
silently truncate the return value for very long symlink targets.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* cleanup: extract SkipSignal helper to deduplicate signal skip lists (#40228)

* cleanup: extract SkipSignal helper to deduplicate signal skip lists

UtilSaveSignalHandlers and UtilSetSignalHandlers had identical switch
statements for skipping non-settable signals. Extract a shared helper
to keep the skip list in one place.

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

* address review: document SkipSignal signals and update function headers

Add comments explaining why each signal is skipped (POSIX non-settable,
NPTL internal signals 32-34, SIGHUP handled separately). Update
UtilSaveSignalHandlers and UtilSetSignalHandlers descriptions to
reference SkipSignal() instead of just mentioning SIGHUP.

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

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: use correct GetAddrInfoTestEntry handler for get_addr_info test (#40225)

The get_addr_info test entry was incorrectly mapped to GetSetIdTestEntry
instead of GetAddrInfoTestEntry, causing the wrong test handler to run.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Upload binaries when publishing symbols (#40208)

* Experiment with symbols

* Don't delete dlls

* Cleanup diff

* Fix clang-format violation in UnitTests.cpp

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

* Include VirtioProxy in IsDnsTunnelingSupported assert

The feature branch adds NetworkingMode::VirtioProxy which supports DNS
tunneling, but master's assert in IsDnsTunnelingSupported() only expected
Nat or Mirrored. This would fire in debug builds when VirtioProxy is
selected (e.g. after NAT fallback).

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

* Add wslcsdk.dll and TestData to test artifacts in build-job.yml

Master's pipeline refactor missed copying wslcsdk.dll (runtime dependency
of wsltests.dll) and the Microsoft.WSL.TestData package to the test
artifact staging area. This caused all test stages to fail with
ERROR_MOD_NOT_FOUND when loading wsltests.dll.

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

* Use dynamic package path for WSLC tests

The WSLC test group template was hardcoding the msixbundle path,
which doesn't exist in PR builds where the package stage is skipped.
Use the same TEST_PACKAGE_PROVIDER/TEST_PACKAGE_PATH/TEST_PACKAGE_FILE
variables as the WSL1/WSL2 test template, so WSLC tests use
installer.msix in PR builds and the bundle in release/nightly builds.

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

* Stage wslcsdk.lib and wslcsdk.dll for Containers nuget package

The package stage needs wslcsdk.lib and wslcsdk.dll to pack
Microsoft.WSL.Containers.nuspec, but the split pipeline doesn't
build wslcsdk in the package stage. Stage these files as build
artifacts from both x64 and arm64 build jobs, then copy them to
the expected bin paths in the package stage before nuget pack.

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

---------

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>
Co-authored-by: g0tmi1k <535942+g0tmi1k@users.noreply.github.com>
Co-authored-by: Arch Linux Technical User <65091038+archlinux-github@users.noreply.github.com>
Co-authored-by: wangxin12 <sbwap@vip.qq.com>
Co-authored-by: Xin Wang (from Dev Box) <xiwang4@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: FetoiuCatalin <fetoiucatalin@gmail.com>
Co-authored-by: Catalin-Emil Fetoiu <cfetoiu@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
2026-04-21 11:59:52 -07:00
Darshak Bhatti
d4c0870d7c Start containerd before dockerd (#40237)
Instead of letting dockerd manage its own embedded containerd, this starts containerd as a separate process first and points dockerd at its socket (--containerd /run/containerd/containerd.sock). My testing shows ~1s improvement with this.

* cp

* clang

* clang

* clang3

* event name

---------

Co-authored-by: Darshak Bhatti <dabhatti@micorsoft.com>
2026-04-21 10:57:59 -07:00
Kevin Vega
e88a69697e Add DeleteVolumes flag to container deletion API (#40232) 2026-04-21 08:57:13 -07:00
Blue
2f4d1ec88f Use WSLC_E_CONTAINER_NOT_FOUND when a container is not found (#40251)
* Use WSLC_E_CONTAINER_NOT_FOUND when a container is not found

* Format
2026-04-20 14:58:25 -07:00
yao-msft
68156e723a Initial prune image cli command (#40239) 2026-04-20 14:45:10 -07:00
David Bennett
0cec88d9b7 CLI: TableOutput unit tests (#40095) 2026-04-20 13:42:12 -07:00
Ben Hillis
900f37ee34 Fix bugs found during code review of feature/wsl-for-apps (#40248)
- Fix wrong variable in waitpid check (init.cpp): Used 'Result' (poll return
  value) instead of 'Pid' (waitpid return value), causing incorrect SIGCHLD
  handling that could miss child exits or fail to detect init termination.

- Fix missing semicolon after LOG_ERROR (WSLCInit.cpp): Missing statement
  terminator would cause compilation failure on Linux builds.

- Fix misleading test comment (WSLCTests.cpp): Comment referenced port 1234
  but the test actually validates port 1236 cleanup after bind failure.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 13:28:20 -07:00
David Bennett
485289d5d3 Change help flag (#40236) 2026-04-20 10:07:23 -07:00
beena352
11020d97ef wslc: add network create, delete, and list (#40179) 2026-04-19 16:52:53 -07:00
AmirMS
f8b4eba934 CLI: Make image save output optional (#40194)
* Image save optional output

* Clang format

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

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

* Fix terminal detection in CI for WSLCE2E_Image_Save_ToTerminal_Fail test

- Open CONOUT$ as child stdout in RunWslcAndRedirectToFile when no output
  path is given, so IsConsoleHandle() returns true in the child process
  regardless of how CI redirects the test runner's stdout
- Fix SavedArchivePath.wstring() -> SavedArchivePath in WSLCE2E_Image_Save_ToStdout_Load
- Quote output path in effectiveCommandLine for diagnostic clarity

Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/f94556e1-9acd-40f1-89bd-349e238e92f3

Co-authored-by: AmelBawa-msft <104940545+AmelBawa-msft@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-19 21:37:47 +00:00
copilot-swe-agent[bot]
36d00ce83b Fix VersionCommand_HasNoArguments test to reflect --format argument added in PR
Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/309f2df8-2ce9-4f99-8b04-2d5c7fbeb50c

Co-authored-by: AmelBawa-msft <104940545+AmelBawa-msft@users.noreply.github.com>
2026-04-19 17:53:53 +00:00