Repository navigation
Document WSLC session and elevation model - #158
Merged
Merged
Conversation
WSLC picks the container session from the elevation level of the calling process, so elevated and non-elevated callers get separate VHD-backed stores that cannot see each other. This was undocumented and is the root cause of "the site works locally but Wincontainer is empty". Explain the elevation-to-session mapping, why the non-elevated session is WSLC's default rather than a Wincontainer concept, how this differs from Docker Desktop's LocalSystem service, and how to diagnose a stale session directory that makes wslc fail with E_INVALIDARG.
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.
Why
Wincontainer's elevation requirement was undocumented, and the reason is not obvious from the code. WSLC selects the container session from the elevation level of the calling process, so elevated and non-elevated callers land in separate VHD-backed stores under
%LOCALAPPDATA%\wslc\sessions\that cannot see each other.wslc container listhas no--sessionflag to bridge them. That mismatch is the root cause of the recurring "the site works locally but Wincontainer is empty" problem, and of a hard failure where a non-elevatedwslccall errors withE_INVALIDARGinstead of returning an empty list.What changed
README.md: the elevation-to-session mapping table, why the two stores are isolated, and the two distinct reasons admin is needed (session identity vs. privileged setup forwsl --installand the WSLC MSI)..github/skills/deploying-to-wincontainer/SKILL.mdwith the same model plus a Diagnosing session problems block (Get-ChildItemon the sessions dir,system session list --verbose, theE_INVALIDARGerror text and its fix), and added that error to the Common mistakes table.Notes
E_INVALIDARGfailure mode is live on the dev machine:wslc-cli-jptrsholds aswap.vhdxwith nostorage.vhdx, so every non-elevatedwslccall fails. Not fixed here; removing the stale directory is a manual step and is documented rather than automated.asInvokerwould remove the daily UAC cost. This PR only makes the current model legible.Testing
wslc system session list, and theE_INVALIDARGreproduction directly againstwslc 2.9.4.0on the dev machine.