Ability to install multiple instances of a distro with `wsl --install <distro> <instance_name> <location> --version 1/2`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Is your feature request related to a problem? Please describe.
WSL instances are great as "single purpose", sometimes even "throwaway" containers for testing out a piece of functionality. Today, I do this by keeping "pristine" copies of each distro by wsl --exporting them immediately after installation. I can then spin up new instances by wsl --importing those tarballs.
I realize that it's also possible to get the pristine tarball from the Program Files\WindowsApps folder, but this is even more painful, IMHO, since you have to (a) find and get access to the right folder from an elevated PowerShell, and (b) unzip the tarball before wsl --import can handle it.
The new wsl --install <distro> sounds great (I'm not on Preview), but doesn't sound like it goes far enough towards solving this particular problem.
Describe the solution you'd like
Extend wsl --install <distro> to accept optional parameters for <instance_name>, <location>, and --version 1/2 similar to the wsl --import command.
Describe alternatives you've considered
Alternatives are listed in the "problem statement" above.
Additional context
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing wsl --install and wsl --import command handling in the WSL codebase and review how distro names, instance names, locations, and versions are validated. Done means wsl --install supports the requested optional arguments and can create multiple named instances with the selected location and WSL version, with coverage for the new command forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100