-
Notifications
You must be signed in to change notification settings - Fork 651
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
Access to wsl2 #1725
Comments
Hi @hodjaev what makes you say this isn't already possible? Can you not |
Hi, @Saviq, I tested ping today and it didn't work. But ping works from the host. |
Thanks @hodjaev. Hey @sirredbeard, could you guys see what might be the cause of this? |
This is because WSL2-based instances use a virtual switch different than the virtual switch that Hyper-V based instances use and of course, those two NAT'd networks cannot talk to each other by default. I'm not sure if any routing can be set up on the Windows host to allow this. That said, when our bridged networking support lands in Multipass, then I think it would be possible to add an additional interface to Multipass instances that can use the WSL2 virtual switch. |
With bridging support upcoming (#118) you should be able to hook up the instances to the WSL2 network as well. Keep an eye out there. |
For anyone still needing a workaround for this, I found a workaround in the WSL repo issues. |
Outside of Multipass's scope, then. |
Summary of the solution linked above: From an Admin PowerShell run: Set-NetIPInterface -ifAlias "vEthernet (WSL)" -Forwarding Enabled
Set-NetIPInterface -ifAlias "vEthernet (Default Switch)" -Forwarding Enabled Now you'll be able to connect to MultiPass instances running on Windows from WSL. EDIT: This doesn't appear to persist across reboots? |
Amazing @daviewales thanks |
What are you trying to do?
I'd like to have access to multipass vm from wsl2
What's your proposed solution?
Detect if wsl2 is available during multipass installation process. And if so offer an option to have connectivity between the two.
Additional context
The text was updated successfully, but these errors were encountered: