-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple separated instances #1856
Comments
I'm curious -- what sort of app are you developing that would conflict on the process list but would not conflict on TCP ports? |
I thought about it and I don't see any workaround for now, but if you don't use the same ports it's fine... |
It kinda sounds to me like what you're asking for is Docker :-) Docker for Windows works with WSL today. Native Docker within WSL is tracked by #85 . |
Something like that :) I'll close this issue, but the ability to have multiple instances could still be useful if they decide to add another subsystem for android or for any other OS |
I am also interested in this. And now we have the ability to run multiple distributions side-by-side. I am not sure if I understand what you meant in your comment @aseering, but when it comes to conflicting ports, I experimented with running openSuse Leap 42 and Ubuntu side-by-side. I ran My use case for the ability to run multiple instances of one distribution is setting up shortcuts for pre-setup environments for different things. It's true that Docker can give me this as well, but I have Windows 10 Home machines where I can use WSL but not Docker (and Docker Toolbox is a joke), so I don't think having an alternative in multiple instances of a single distribution would hurt. If I could use My 2 cents anyway. :-) |
Possible right now (circa 16273 and probably earlier) for the motivated. I did a PoC back in July.
That's only because #384 wasn't really fixed just stubbed (message). You are seeing the same thing as the guy in #2664, and @aseering is fundamentally correct. We need more networking bits (too lazy to look up an issue ref) and
Yes that is the Right™ way to do this (at least in spirit if not the detail). I have been meaning to do something like this for six months, but keep wasting time playing with filesystem related stuff instead (and not even spending significant time at that). Part of the demotivator too is that I suspect if I make a run at it, the effort will end up duplicative of stuff already in the works. So sit tight. You'll probably get something along the lines of what you want eventually. That is speculation though, natch; I do not know the team's priorities. Also bear in mind what you are really asking for is a death march to Docker. No one said you have to like Docker. |
Hm... So, the problem here is, there is only one WSL could have a separate Alternatively, you could assign multiple loopback IP addresses to your system. For example, add |
@therealkenc I don't know enough about anything to understand your PoC and how to get there, but I am happy to see this is possible in principle and will hope to see it achievable in a way I can use (like Regarding networking and port collisions there may be a better way to do that, but the current behavior seems just fine to me. Offloading the work of ensuring no reuse of ports across the instances to the user is fair game. Having two instances of say Ubuntu just for the price of making sure the ports are not reused? That's a deal right there. So yeah, I don't really consider the current behavior a problem, although I don't know enough to judge whether it can be improved or not. |
That's
That's the extra networking bits missing.
Sure absolutely. Just add it in Device Manager. I take for granted there's some crazy PS way to do it too.
Pretty much. The ask is for a better UX. |
For anyone who comes to this issue from Google, I found this Getting Crazy with Windows Subsystem for Linux article which seems to achieve exactly what I wanted to get. I am going to update this comment once I was able to confirm it still works, but it looks very very promising. |
I think this is a good idea! i have been spawning wsl as "integrated terminal" in Vs Code and it works great. But i have multiple different platforms to develop for, so in the end different containers for different things would be nice. but i know its whining on the highest level :D To be fair, the Main requirement would not be to have them running in parralel (addressing the only one localhost issue, which btw could be solved with hostnames for your instances in your hostconf), but rather have multiple "subystems" which i can then seperatly launch. |
so @TomasHubelbauer how was the experiment going ? i see it as promising too 😃 |
@pentatonicfunk I got myself so immersed in LxRunOffline I forgot to reply! It's good, I recommend you try it. I still wish this was native to WSL, but LxRunOffline is really, really good. Currently I miss three things from it: I wish it was able to create taskbar shortcuts with the correct icon, I wish it was able to create users with passwords by default like WSL and I wish it ran in the same terminal. With these two features it would be possible to have an exact copy of Ubuntu, OpenSure or what have you, indistinguishable from the original creatible thru WSL. On top of it, @DDoSolitary updates the project regularly and is clearly very capable, so while experimental, the project is very stable. |
@TomasHubelbauer well you are too late, i already setup 2 additional instances of ubuntu on WSL. Indeed @DDoSolitary did a great job. As for taskbar icon, i dont see any problem i can change it Via |
@pentatonicfunk Yep, I meant that more as in I'd like it to be a one-click solution where you click to get a new Ubuntu instance and you have it. But I am sure I can script this, I considered doing that, but I found it impossible to locate the original Ubuntu icon file, I don't remember why, but it was either because the ICO file was in an inaccessible directory or it came from an EXE file which was inaccessible to me. Anyway this is a total digression. :-) |
Hey. With all the comments about "what about networking ports", really, I'm not bothered by that. I know WSL is just a shell. It's not a container, it's not a VM. I don't want it to be. I do want multiple environments ( with the same network ) just to have different versions of python, different versions of Java, different versions of node.... I can keep track of ports and make sure ports don't get confused. If I have two shell windows, I know they're running the same set of ports. If I have two shell windows of different distributions.... same ports, still useful. Hope that helps understand why I want this feature even without virtualized networks. |
We use docker containers for all the projects and they all use different ports and can run together however, they sometimes have some reliance on a localally installed tool to setup and manage the dev environment or to run webpac server, compile/run some android or iso app etc and even tho the supporitng servies use different ports they can not use the same version of the locally installed tools to compile and run. So you can not work on the two projects at the same time without stoppping one changing tools and then working on the other. Altho it does seem that WSLv2 is might have solved this problem already but I havnt tried it yet. If anyone has can they comment on their experience? |
@b-hayes This StackOverflow thread may help https://stackoverflow.com/q/51584765/8928481 |
Would it be possible to have multiple instances of linux running ?
Each instances having their own
fs
and their owninit
process.For example a user could develop a ruby app in an instance and have another one to run tests without messing up is dev environment.
I think that it could be a great feature, being able to trash a linux instance without trashing your own dev environment.
The text was updated successfully, but these errors were encountered: