-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Is your feature request related to a problem? Please describe
The current WSL import/export workflow forces users to install distributions onto local disks. This creates two key limitations:
- Lack of true portability - Developers cannot maintain self-contained WSL environments on removable drives
- Host system contamination - Temporary usage on foreign computers leaves persistent installations and user data traces
Describe the solution you'd like
Implement a portable execution mode where:
wsl --importaccepts external storage paths (e.g.\\?\Volume{UUID}\wsl_distro)- Distributions run directly from removable media without disk writes
- Automatic cleanup upon ejection (no registry/Appx残留)
Technical implementation could involve:
- Extended VHDX mounting from removable drives
- Transient profile/tempfile redirection to external storage
- New
wsl --mount-removable <path>command
Describe alternatives you've considered
- Manual export/import workflows
- Still requires local disk staging (time-consuming)
- Leaves temporary files in
%USERPROFILE%\AppData
- Portable Virtual Machines
- Heavy performance overhead (full VM vs lightweight WSL2)
- Complex USB boot configurations required
Additional context
- Verified on: Windows 11 22H2 (WSL 1.2.5) - Standard import always writes to local disk
- Prior research: No existing workarounds using
wsl.confor registry edits - Community demand: Similar requests observed on Reddit and SuperUser since 2020
Conceptual workflow:
[USB Drive]
├── distro.vhdx
└── wsl-portable.json # Metadata
> wsl --mount-removable E:\wsl\ --distro PortableEnv nylish