List and inspect named volumes#14555
Merged
kvega005 merged 73 commits intomicrosoft:feature/wsl-for-appsfrom Apr 1, 2026
Merged
List and inspect named volumes#14555kvega005 merged 73 commits intomicrosoft:feature/wsl-for-appsfrom
kvega005 merged 73 commits intomicrosoft:feature/wsl-for-appsfrom
Conversation
…olumes-merge-20260305-115914
…4' of https://github.com/kvega005/WSL into feature/wsl-for-apps-named-volumes-merge-20260305-115914
…4' of https://github.com/kvega005/WSL into feature/wsl-for-apps-named-volumes-merge-20260305-115914
…re/wsl-for-apps-named-volumes-merge-20260305-115914
…olumes-merge-20260305-115914
…4' of https://github.com/kvega005/WSL into feature/wsl-for-apps-named-volumes-merge-20260305-115914
…olumes-merge-20260305-115914
…ndInspectNamedVolumes
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class “named volume” management to the WSLA session API (list + inspect), with a VHD-backed implementation and container integration, plus Windows tests to validate behavior and recovery.
Changes:
- Extend
IWSLASessionwithCreateVolume/DeleteVolume/ListVolumes/InspectVolumeand related IDL types/constants. - Implement VHD-backed volume lifecycle, metadata persisted via Docker volume labels, and session startup volume recovery.
- Allow containers to mount named volumes and validate mounts during create/open; add test coverage for create/mount/delete/recovery and list/inspect.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/windows/WSLATests.cpp | Adds named volume tests (create/mount/delete/recovery + list/inspect) and updates expected invalid-name error strings. |
| src/windows/wslasession/WSLAVolumeMetadata.h | Defines JSON metadata schema/label used to tag Docker volumes with WSLA volume metadata. |
| src/windows/wslasession/WSLAVirtualMachine.h | Adds Ext4Format() helper declaration. |
| src/windows/wslasession/WSLAVirtualMachine.cpp | Implements Ext4Format() using mkfs.ext4. |
| src/windows/wslasession/WSLAVhdVolume.h | Introduces internal VHD-backed volume implementation interface. |
| src/windows/wslasession/WSLAVhdVolume.cpp | Implements VHD-backed volume create/open/delete/inspect + attach/mount management. |
| src/windows/wslasession/WSLASession.h | Adds volume management COM methods, volume bookkeeping, and new volume lock. |
| src/windows/wslasession/WSLASession.cpp | Implements volume APIs, volume recovery, name validation reuse, and passes volume set to container create/open. |
| src/windows/wslasession/WSLAContainer.h | Plumbs session volume set into container create/open for named-volume validation. |
| src/windows/wslasession/WSLAContainer.cpp | Adds named-volume mount processing for create and validation for recovered containers. |
| src/windows/wslasession/DockerHTTPClient.h | Adds Docker volume management calls (create/remove/list). |
| src/windows/wslasession/DockerHTTPClient.cpp | Implements Docker volume HTTP transactions. |
| src/windows/wslasession/CMakeLists.txt | Builds the new WSLAVhdVolume.cpp implementation. |
| src/windows/service/inc/wslaservice.idl | Adds volume constants/types and extends IWSLASession with volume APIs. |
| src/windows/inc/wsla_schema.h | Adds JSON inspect schema for volumes (common + VHD-specific). |
| src/windows/inc/docker_schema.h | Adds Docker volume schemas and mount Name field; includes mounts in container list parsing. |
| src/windows/common/WSLAContainerLauncher.h | Adds test/SDK helper to attach named volumes to container options. |
| src/windows/common/WSLAContainerLauncher.cpp | Implements named-volume option wiring to WSLAContainerOptions. |
| localization/strings/en-US/Resources.resw | Adds/renames localized strings for invalid names and volume-related errors. |
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.
!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
Summary of the Pull Request
Adds two new volume management methods to the WSLA session interface, complementing the existing
CreateVolumeandDeleteVolume.PR Checklist
Detailed Description of the Pull Request / Additional comments
IDL (wslaservice.idl)
WSLA_MAX_VOLUME_NAME_LENGTHconstant (255) for volume name length limitsWSLAVolumeInformationstructListVolumesandInspectVolumemethods toIWSLASessionVolume inspect schema (
wsla_schema.h)InspectVhdVolumestruct with VHD-specific details (HostPath,SizeBytes)InspectVolumestruct with common fields (Name,Type) and an optional type-specificVhdVolumesub-object extensible for future volume types without exposing implementation details in the common fieldsValidation Steps Performed
Added
ListAndInspectNamedVolumesTestto validate changes.