Commit Graph

102 Commits

Author SHA1 Message Date
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
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
yao-msft
7baac47ff1 Localize settings output (#40297) 2026-04-24 14:26:29 -07: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
7f1792d548 CLI: Initialize domainname option (#40281)
* Init domainname option

* CLang format
2026-04-23 12:21:20 -07:00
AmirMS
de90b82150 CLI: add support for hostname option (#40279)
* Init hostname

* CE
2026-04-22 23:35:39 -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
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
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
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
John Stephens
527e981791 Add --pull and --target flags to image build (#40216) 2026-04-17 13:30:48 -07:00
Kevin Vega
e7acc41e7d Add wslc login, wslc logout, and wslc push commands for registry authentication (#40173) 2026-04-16 17:25:55 -07:00
David Bennett
9043d86dd9 CLI: Relative volume path support, improved error detection and messaging, more volume tests (#40193) 2026-04-16 13:29:53 -07:00
Kevin Vega
fb132be887 Update volume APIs to match docker arguments (#40181) 2026-04-15 15:19:32 -07:00
Blue
f60ec519d5 Add support for --no-cache in BuildImage() & wslc.exe (#40174)
* Add support for --no-cache in BuildImage() & wslc

* 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-14 13:26:26 -07:00
Blue
a05c9f875a Don't return catch-all error messages for non-WSL specific error codes (#40163)
* Don't return catch-all error messages for non-WSL specific error codes

* Apply suggestions from code review

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

* Update test error message expectations to match actual behavior

- ImportDistro: Remove 'Failed to create disk' wrapper since the error
  occurs before CreateVhd, producing only the raw system error message
- ModernDistroInstall: Update to raw Win32 message for ERROR_ALREADY_EXISTS
  since the mapping was removed from GetErrorString and InstallDistro
  path doesn't use THROW_HR_WITH_USER_ERROR

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

* Update test messages

* Format

* Update localization/strings/en-US/Resources.resw

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

* Apply new string name

* Use the right error message for wsl1

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-13 17:56:24 -07:00
beena352
a614779b36 Fix port conflict error message and cleanup on failure (#40102) 2026-04-13 16:21:31 -07:00
Ben Hillis
cd05f5c76d wslc: prevent session name squatting for default WSLc sessions (#40144)
* Prevent session name squatting for default WSLc sessions

- Server now determines default session name and settings from caller's
  token, preventing malicious users from squatting reserved session names
- CreateSession rejects explicit use of reserved names (wslc-cli,
  wslc-cli-admin) with case-insensitive E_ACCESSDENIED check
- Null StoragePath remains valid for ephemeral sessions; empty string
  is rejected as E_INVALIDARG
- Add dedicated EnterSession API with null/empty parameter validation
- Early return optimization: skip YAML parse if default session exists
- Inline BuildFeatureFlags into SessionSettings constructor
- Extract UserSettings into shared wslcsettings library used by both
  wslc.exe and wslservice.exe
- Move EnumVariantMap.h to common
- Fix std::terminate crash in CustomDmesgOutput test when CreateSession
  fails by adding a scope_exit guard to join the reader thread
- Add session name squatting E2E test with case-insensitive coverage

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

* Address PR feedback: per-user session names, custom error codes, impersonation

- Append username to default session names so different users don't
  collide (e.g. wslc-cli-alice, wslc-cli-admin-bob) [OneBlue]
- Impersonate caller when loading settings.yaml server-side [OneBlue]
- Factor name resolution into ResolveDefaultSessionName helper [OneBlue]
- Add WSLC_E_SESSION_RESERVED and WSLC_E_INVALID_SESSION_NAME error
  codes for better diagnosability [dkbennett]
- Use prefix-based reserved name check (blocks all wslc-cli-* names)
- Fix pre-existing HostFileShareMode namespace qualification bug
- Remove unused variable in GetDefaultStoragePath test helper [Copilot]
- Update all E2E tests for username-qualified session names

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-13 23:08:44 +00:00
Blue
d84db74f09 Improve errors returned from WSLCContainer (#40147)
* Improve container state errors

* Add wslc.exe test coverage

* Fix localization file

* Apply PR suggestions

* Format
2026-04-10 14:56:54 -07:00
Ben Hillis
7de1def53e Fix incorrect --detach description in container run help text (#40149)
The help text for 'wslc container run' incorrectly stated that
containers start in the background by default and --detach runs in
the foreground. The actual behavior (confirmed by ContainerService.cpp)
is the opposite: containers start attached (foreground) by default,
and --detach runs them in the background.

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-10 10:51:45 -07:00
Blue
e950342547 Add support for mounting files and non-existing folders as volumes (#40137)
* Save state

* Prepare for PR

* Apply PR feedback

* Add test coverage for restored containers

* Merge
2026-04-09 16:00:52 -07:00
AmirMS
f503b0666e CLI: Add initial support for image tag command (#14416)
* Initial support for image tag command

* Init test

* Init e2e test

* Adde E2E tests

* Added more tests

* Added more tests

* Resolve copilot comment

* Clang format

* Clang format

* Fix build

* Update parser

* Update loc

* Fix test

* Added more tests

* Clang format

* Loc

* Addressed comments
2026-04-09 22:53:04 +00:00
Pooja Trivedi
715ce52834 [WSLC] Add 'wslc version' subcommand (#14547)
* [WSLC] Add 'wslc version' subcommand

Adds a 'version' subcommand to the WSLC CLI as an alternative to the
existing '--version' flag, following the subcommand pattern used by
other WSLC commands. Includes unit tests for command structure and
command-line parsing.

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-Authored-By: Claude Sonnet 4.6

* [WSLC] Fix E2E help/invalid-command tests after version subcommand addition

Update expected help output in WSLCE2EGlobalTests to include the newly
added 'version' subcommand, fixing WSLCE2E_HelpCommand and
WSLCE2E_InvalidCommand_DisplaysErrorMessage test failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* [WSLC] Add E2E version command test and strengthen unit test

- Add WSLCE2E_VersionCommand E2E test in WSLCE2EGlobalTests verifying
  stdout, empty stderr, and exit code for 'wslc version'
- Add assertion to VersionCommand_HasNoArguments unit test to verify
  only the auto-added --help argument is present

Authored-By: Pooja Trivedi <trivedipooja@microsoft.com>
Co-Authored-By: Claude Sonnet 4.6

* Mark 'context' as UNREFERENCED_PARAMETER in
VersionCommand::ExecuteInternal to avoid build issues

* Address PR feedback on wslc version command

- Use Localization::WSLCCLI_VersionDesc/LongDesc instead of hard-coded strings; add entries to en-US Resources.resw
- Centralize version printing in VersionCommand::PrintVersion(); reuse from RootCommand --version flag
- Drop 'v' prefix from version output per OneBlue's feedback
- Add 'version' entry to E2E GetAvailableCommands() to fix WSLCE2E_HelpCommand and WSLCE2E_InvalidCommand_DisplaysErrorMessage

Co-Authored-By: Pooja Trivedi

* Fix build: add missing using namespace wsl::shared

Localization::WSLCCLI_VersionDesc() and WSLCCLI_VersionLongDesc() live in
wsl::shared::Localization. Without this using directive the compiler cannot
resolve the unqualified Localization:: references in VersionCommand.cpp.

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

---------

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 22:58:59 -04:00
Blue
9d39805c4d Implement wslc session enter (#40088)
* Save state

* Save state

* Save state

* Cleanup

* Prepare for PR

* Cleanup

* Validate flags

* Apply PR suggestions

* Add comment

* Remove include

* Cleanup diff

* Format

* Format

* Restore session flags
2026-04-06 11:51:09 -07:00
Pooja Trivedi
2d8c8cf295 [WSLC] Add --workdir / -w option to 'wslc exec' (#40041)
* [WSLC] Add --workdir / -w option to 'wslc exec'

Adds a --workdir (-w) argument to the exec command that sets the working
directory inside the container for the executed process. Wires the value
through ContainerOptions into WSLAProcessLauncher::SetWorkingDirectory.

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-Authored-By: Claude Sonnet 4.6

* Update test/windows/wslc/CommandLineTestCases.h

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

* Update test/windows/wslc/CommandLineTestCases.h

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

* Fix clang formatting issues

* Update test/windows/wslc/WSLCCLIExecutionUnitTests.cpp

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

* Add E2E tests for wslc container exec, including --workdir option

- Port existing exec E2E tests from feature branch
- Add WSLCE2E_Container_Exec_WorkDir and WSLCE2E_Container_Exec_WorkDir_ShortAlias tests
- Update help message in GetAvailableOptions to include -w,--workdir

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix clang formatting in WSLCE2EContainerExecTests.cpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Validate --workdir is non-empty; add unit and parse test cases

- Reject empty or whitespace-only --workdir in Argument::Validate
- Add ExecCommand_ParseWorkDirEmptyValue_ThrowsArgumentException unit test
- Add empty-workdir failing case to CommandLineTestCases.h

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix clang formatting in CommandLineTestCases.h

Co-Authored-By: Claude Sonnet 4.6

* Trim exec E2E tests to --workdir coverage only

Remove tests that duplicate existing coverage in WSLCE2EContainerCreateTests.cpp.
Keep only the help message test (validates --workdir appears in output) and the
two workdir-specific E2E tests.

Co-Authored-By: Claude Sonnet 4.6

* Missed change from merge conflict resolution

* Fix --workdir whitespace validation to use std::iswspace for full Unicode coverage

Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/b21d1a57-bb3f-4a12-84cf-8e414a453890

Co-authored-by: ptrivedi <1638019+ptrivedi@users.noreply.github.com>

* Use lambda with wint_t cast in iswspace call to avoid potential UB

Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/b21d1a57-bb3f-4a12-84cf-8e414a453890

Co-authored-by: ptrivedi <1638019+ptrivedi@users.noreply.github.com>

* Missed change from merge conflict resolution

* Address Copilot PR feedback

- Revert Version ArgType alias from NO_ALIAS back to L"v" to preserve existing -v short option
- Restore WSLCE2EContainerExecTests.cpp lost in merge conflict resolution

Co-Authored-By: Pooja Trivedi

* Update src/windows/wslc/services/ContainerService.cpp

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

* Fix ParserTest_StateMachine_PositionalForward: replace -v with -h in flag parse tests

The -v short alias was removed from --verbose (changed to NO_ALIAS) to
resolve a triple alias conflict with --version and --volume. The parser
test cases in the Run argument set still used -v expecting it to resolve
to --verbose, but since neither Version nor Volume are in the Run set,
-v became unresolvable and caused unexpected parse failures.

Replace -v with -h (help flag) in the flag parse test cases to preserve
the same combined-flag parsing coverage with a valid short alias.

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

* Fix E2E exec help test: add --user option after base branch merge

After merging feature/wsl-for-apps, the --user argument is now active
in ContainerExecCommand (from PR #40101). Update the expected exec help
output to include -u,--user.

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

---------

Co-authored-by: Pooja Trivedi <trivedipooja@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ptrivedi <1638019+ptrivedi@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 14:04:38 -04:00
Blue
619fe1f820 Localization change from build: 143644543 (#40098)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-04-03 13:52:35 -07:00
Ben Hillis
e712372add Localize all user-facing wslc.exe CLI strings (#40089)
* Localize all user-facing wslc.exe CLI strings

Add localization entries for all hardcoded user-facing strings in the
WSLC CLI tool:

- 38 command description strings (Short + Long for all commands)
- 30 argument description strings in ArgumentDefinitions.h
- Settings reset confirmation string
- All entries added to en-US/Resources.resw with {Locked=...} comments
  for CLI flags, product names, and technical terms

E2E tests updated to use Localization:: calls and dynamic column
formatting instead of hardcoded string copies, so they won't go
stale when descriptions change.

* formatting

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-04-03 11:16:47 -07:00
Blue
4ee26e6a80 Localization change from build: 143632468 (#40094)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-04-03 17:52:47 +00:00
David Bennett
a6746d1356 CLI: Add Terminate Session command (#40058) 2026-04-01 11:49:24 -07:00
Blue
fb98950eff Localization change from build: 143374899 (#40049)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-03-31 19:14:19 +00: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
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
Blue
f4a68ddd33 Localization change from build: 142911151 (#14535)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-03-25 17:31:20 -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
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
Blue
544dd6d936 Localization change from build: 141718726 (#14402)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-03-11 02:53:07 +00:00
Ben Hillis
0e37b58e6e Merge remote-tracking branch 'origin/master' into HEAD 2026-03-10 12:52:27 -07:00
Blue
d550fd8d8a Remove wsladiag.exe (#14375)
* Remove wsladiag.exe

* Remove code
2026-03-07 13:06:11 -08:00
Blue
456a5cfe45 Localization change from build: 141225222 (#14360)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-03-05 06:51:07 -08:00
David Bennett
e8591c8f68 CLI: Update copyright header and add --version option (#14338) 2026-03-04 19:37:56 +00:00
Blue
7cadd55247 Localization change from build: 141137626 (#14352)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-03-04 08:26:09 -08:00
Ben Hillis
8c220dc083 Fix grammar, typos, and formatting in docs and source (#14286)
* Fix localization text, Intune capitalization, ADMX indentation, unused import

- distributions/validate.py: Remove unused 'import base64'
- en-US/en-GB Resources.resw: Fix word order 'the list distribution' -> 'the distribution list' in MessageCouldFetchDistributionList
- en-US/en-GB Resources.resw: Remove trailing space from MessageCorruptedDistroRegistration value
- intune/en-US/WSL.adml: Fix 'For Linux' -> 'for Linux' capitalization (5 occurrences) to match official product name
- intune/WSL.admx: Fix inconsistent 3-space indent to 4-space on AllowWSL1 and CustomKernelUserSettingConfigurable policies

* Fix grammar, typos, and formatting in docs and source code

- WmiService.h: Fix duplicated word 'of of' -> 'is of' in WQL comment
- drvfs.md: Fix 'which tell' -> 'which tells' (subject-verb agreement), double space, second 'tell' -> 'tells'
- systemd.md: Fix 'tries synchronizes' -> 'tries to synchronize'
- wslhost.exe.md: Fix 'processes terminates' -> 'process terminates'
- boot-process.md: Add missing 'in' preposition, fix C:/ -> C:\, fix lowercase 'linux' to 'Linux' (4 occurrences), fix misplaced parenthesis
- init.md: Fix double space before hvsocket backtick
- session-leader.md: Fix heading level ## -> ### to match sibling section
- CONTRIBUTING.md: Fix double period after bold security notice
- debugging.md: Fix missing word 'be' in 'can enabled', fix 'process' -> 'processes'
- index.md: Add missing period at end of sentence
- technical-documentation/index.md: Fix 'API's' -> 'APIs' (remove incorrect apostrophe)
- relay.md: Fix lowercase 'linux' to 'Linux' (3 occurrences)
- localhost.md: Fix lowercase 'linux' to 'Linux'
- plan9.md: Fix lowercase 'linux' to 'Linux'

* update errormessages testcase

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-03 18:13:59 -08:00
Blue
21cb15e009 Localization change from build: 141093872 (#14345)
Co-authored-by: WSL localization <noreply@microsoft.com>
2026-03-03 13:49:17 -08:00
Andy Sterland
32329bb35c Add vs info to settings (#14169)
* Initial commit to add a page to the OOBE experience for the Visual Studio integration with WSL.

* Updated link for C++ to the landing page for Linux dev.

* Reverting accidental commit of UserConfig.cmake.sample.

* Revert accidental change

* Revert "cleanup: fix UserConfig.cmake.sample in master branch (#14076)"

This reverts commit 4b23185dfe.

* Reapply "cleanup: fix UserConfig.cmake.sample in master branch (#14076)"

This reverts commit d97e2753bb.

* revert

* revert

* Tidying whitespace

* Tidying whitespace

* Tidying whitespace

* Tidying whitespace

* Tidying whitespace

* Update src/windows/wslsettings/Views/OOBE/ShellPage.xaml

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

* Update src/windows/wslsettings/Activation/ProtocolActivationHandler.cs

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-03 14:45:00 -05:00