How to troubleshoot networking on Windows

Contents:

Architecture

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.

Anti-virus / security software blocking instances

Anti-virus and network security software are not necessarily virtualization-aware. If you’re having issues with connectivity, temporarily disabling this software to test can result in a positive outcome. Examples of this software are Symantec, ESET, Kaspersky, and Malware Bytes.

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.

hi @saviq . Sorry I can’t figure out how to PR / edit the page / edit the wiki entry. :crying_cat_face:

Couple common issues we’ve been fielding.

** multipass instance does not have internet connectivity **

Anti-virus and network security software are not necessarily virtualization-aware. If you’re having issues with connectivity, temporarily disabling this software to test can result in a positive outcome. Examples of this software are Symantec, ESET, Kaspersky, and Malware Bytes.

** instance does not get an IP address **
The Hyper-V feature is present on all versions of Windows 10, however certain capabilities are dependent on the edition of Windows. Specifically at this time, Windows 10 Home does not create a Virtual Switch usable for networking, and as such is presently not supported for Hyper-V networking.

Hi @joshti, you may need to stick around some to get edit permissions, is all.

Thanks for this, I’ll add the bit talking about AV software, however we don’t support Hyper-V on Home at all (mainly because, as you write, only certain pieces of it are actually available), and the installer and errors if you do try and use Hyper-V should make it clear enough?