Troubleshooting networking on Windows


Multipass uses the native “Hyper-V” hypervisor on Windows, along with the “Default Switch” created for it. That, in turn, uses the “Internet Sharing” functionality, providing DHCP (IP addresses) and DNS (domain name resolution) to the instances.

Known issues

Default Switch going awry

Unfortunately the Default Switch is known to be quirky and Windows updates often put it in a weird state. This may result in new instances failing to launch, and existing ones timing out to start.

The broken state also persists over reboots. The one approach that has helped is removing the network sharing from the default switch and rebooting:

PS> Get-HNSNetwork | ? Name -Like "Default Switch" | Remove-HNSNetwork
PS> Restart-Computer

Hyper-V will recreate it on next boot.

Stale Internet Connection Sharing lease

Another reason for instance timeouts may be that a “stale” IP address for a particular instance name is stored in the Internet Connection Sharing hosts file.

Using Administrator privileges, edit C:\WINDOWS\System32\drivers\etc\hosts.ics and look for any entries that have your instance name in it. If there is more than 1 entry, remove any of them except for the first listed. Save the file and try again.

If you have a networking issue with Multipass on Windows that isn’t solved by the above, please file an issue on our GitHub page - and if you have a solution, please add it to the first post.

In the first known issue, the workaround doesn’t explain what will happen after the reboot. The implication is that things will “just work”, but if any step is needed to add back that default switch, then the instructions should say so and show how. It would be helpful to clarify things either way.

Also, it would also be very helpful to give that first issue a subheadings, like the next one has, to make it easier to refer to.

Thanks @carehart, fixed it up!

Note all the documentation are wiki posts, so feel free to update them (here in Discourse) yourself :slight_smile:

Note this only solves issues using Hyper-V networking on Windows. There is a current open bug (by me) on the Github repo, asking for more options around networking with VirtualBox on Windows.

I do understand the problems with hyper-V networking, but recently the multipassd service refuses to startup automatically and my file mounts refuse to automatically mount. Once I start it manually and re-execute multipass mount it gives me an error saying the mounts already exists but it then mounts the folder as expected. Not quite sure what’s going on or where to look for possible errors. When I initially try to execute multipass list it gives me the can’t reach port 50051 errors, but since the service doesn’t automatically start it’s not surprising.