-
Notifications
You must be signed in to change notification settings - Fork 822
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
Cannot connect Hyper-V VMs(Default Switch) from wsl2 #11494
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
The network log for the mirrored mode The network log for the bridged mode |
Diagnostic information
|
This issue is still not solved. Can any maintainer give me some feedback? |
@PramSin try these commands:
You might need to run |
thanks for attaching the logs. sorry for the delay following up on this at the moment this is not supported when using mirrored networking mode mirrored mode allows communication between WSL and the Windows host using 127.0.0.1 or using an IPv4 address assigned to the Windows host, but not communication with another VM running on Windows |
this is the same |
https://github.com/M4ndr0id/WSL-HyperV-fix.git |
Windows Version
Microsoft Windows [Version 10.0.22631.3447]
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.146.1
Distro Version
Ubuntu 22.04
Other Software
Hyper-V 10.0.22621.1
Repro Steps
I have a Hyper-V VirtualMachine connected with the VMSwitch "vEthernet (Default Switch)"(an internal switch with NAT). And it works well to access VM networking apps from host or access host networking apps from the VM.
Now I want to connect the VM from my WSL distro. I tried two approaches.
The ip address given by the "vEthernet (Default Switch)":
Use mirrored networkingMode
.wslconfig
fileThe result is
Use bridged networkingMode
.wslconfig
fileThe result is
Expected Behavior
Get the same
ping
result as the host gets.Actual Behavior
Use mirrored networkingMode
Use bridged networkingMode
Diagnostic Logs
The
ipconfig
result from hostmirrored networkingMode
ip addr
result from wsl2ip route
result from wsl2ifconfig
result from wsl2Seems the mirrored networkingMode didn't clone the VMNetAdapters into the wsl2 distro. So how can I find my VMs from wsl?
birdged networkingMode
ip addr
result from wsl2ip route
result from wsl2 (null)ifconfig
result from wsl2Seems that the bridged networkingMode is not working at all. But I do like it. Any way I can turn it on properly?
The text was updated successfully, but these errors were encountered: