Add WSLC (WSL Containers) feature#40366
Merged
Merged
Conversation
WSLC is a container runtime built on the Windows Subsystem for Linux, enabling Windows applications to create and manage Linux containers through a native Windows API surface. Key components: - wslc.exe: CLI for managing containers, images, volumes, and networks (build, run, stop, inspect, push/pull from registries) - wslcsession.exe: Per-user Windows service hosting container lifecycle, storage management, and networking - WSLC SDK: C++ and C# client libraries with NuGet packaging for programmatic container management - Container networking: port forwarding, DNS tunneling, virtio networking, and HCN integration - Storage: VHD-backed volumes, virtiofs file sharing, overlayfs layers - GPU passthrough and device host proxy support Co-authored-by: 1wizkid <richard.fricks@hotmail.com> Co-authored-by: AmirMS <104940545+AmelBawa-msft@users.noreply.github.com> Co-authored-by: beena352 <beenachauhan@microsoft.com> Co-authored-by: Ben Hillis <benhillis@gmail.com> Co-authored-by: Blue <OneBlue@users.noreply.github.com> Co-authored-by: Craig Loewen <crloewen@microsoft.com> Co-authored-by: Darshak Bhatti <47045043+dabhattimsft@users.noreply.github.com> Co-authored-by: David Bennett <dbenne@microsoft.com> Co-authored-by: Feng Wang <wang6922@outlook.com> Co-authored-by: Flor Chacon <14323496+florelis@users.noreply.github.com> Co-authored-by: John Stephens <johnstep@microsoft.com> Co-authored-by: JohnMcPMS <johnmcp@microsoft.com> Co-authored-by: Kevin Vega <40717198+kvega005@users.noreply.github.com> Co-authored-by: Pooja Trivedi <poojatrivedi@gmail.com> Co-authored-by: ramesh-ramn <raman.ramesh@gmail.com> Co-authored-by: Richard Fricks <richfr@microsoft.com> Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>
OneBlue
approved these changes
Apr 30, 2026
| // Create a tmpfs mount for the cross-distro shared mount. | ||
| // | ||
|
|
||
| if (UtilMount(nullptr, CROSS_DISTRO_SHARE_PATH, "tmpfs", 0, nullptr) < 0) |
Collaborator
There was a problem hiding this comment.
Context for other reviewers, this was added in 2db1652
| dnsResolver->ResolveExternalInterfaceConstraintIndex(); | ||
| } | ||
| CATCH_LOG() | ||
| // Copyright (C) Microsoft Corporation. All rights reserved. |
Collaborator
There was a problem hiding this comment.
Looks like we changed the line endings in this file somehow ?
| @@ -29,6 +29,7 @@ wil::unique_socket Connect( | |||
| _In_ const GUID& VmId, | |||
| _In_ unsigned long Port, | |||
| _In_opt_ HANDLE ExitHandle = nullptr, | |||
| ULONG Timeout = 30000, // TODO: Fix | |||
Collaborator
There was a problem hiding this comment.
We can leave this as is. I'm planning to do a major hvsocket IO refactor once this is merged
| std::string_view beginView(m_buffer.data() + m_offset, m_buffer.size() - m_offset); | ||
| std::string_view endView(m_buffer.data(), m_offset); | ||
| return {beginView, endView}; | ||
| /*++ |
Collaborator
There was a problem hiding this comment.
Looks like another line ending change
|
|
||
| // Copyright (C) Microsoft Corporation. All rights reserved. | ||
|
|
||
| #pragma once |
Collaborator
There was a problem hiding this comment.
Another line ending change
| @@ -1048,4 +1089,95 @@ class InstallerTests | |||
| SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nullptr, nullptr); | |||
| VerifyWslSettingsProtocolAssociationExistsWithRetry(); | |||
| } | |||
|
|
|||
| /* | |||
| TODO: Uncomment when the functionality is implemented in the SDK. | |||
Collaborator
There was a problem hiding this comment.
we might want to remove this. This was for the old install API, which doesn't exist anymore
Member
Author
|
@OneBlue - agreed on the comments, I will address as a follow-up change on master. Thanks for taking a look! |
benhillis
added a commit
that referenced
this pull request
Apr 30, 2026
…PI test (#40369) - Restore original CRLF line endings in DnsResolver.cpp, RingBuffer.cpp, and WslCoreHostDnsInfo.h that were inadvertently changed to LF - Remove commented-out WSLCInstall/WSLCInstallManual test methods that referenced the old install API which no longer exists Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WSLC is a container runtime built on the Windows Subsystem for Linux, enabling Windows applications to create and manage Linux containers through a native Windows API surface.
Key components
Stats
feature/wsl-for-apps(665 commits)