Useless IPs reported on instances
~~#1951 is back.~~
In multipass list and multipass info we list all the IPs we find on instances. The problem is they may not be reachable outside of the instance (e.g. bridges for containers, guest networks). It's confusing today that you see an IP that you can not reach.
PS C:\Users\natha> multipass list
Name State IPv4 Image
docker-vm Running 172.17.0.1 Ubuntu 20.04 LTS
PS C:\Users\natha> ssh -v 172.17.0.1
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Connecting to 172.17.0.1 [172.17.0.1] port 22.
debug1: connect to address 172.17.0.1 port 22: Connection timed out
ssh: connect to host 172.17.0.1 port 22: Connection timed out
I see two options out of this:
- only display IPs for interfaces Multipass created (based on their MAC)
- show interface names as well (to help identify usable networks)
I like the approach of only listing IPs for multipass-created interfaces. I think the typical use case for these IPs is to interface with the VM from the host, and IPs that can't be reached by the host would be confusing to list. As discussed off-line, the case of private networks between VMs is also of concern here. I think the right approach is showing more detail on how the IP can be accessed (e.g. accessible by host/the internet/private), and hiding all non-MP managed IPs (i.e. IPs inaccessible outside the VM). Does that sound like the right approach? Anything I am missing?
Also, just wanted to clarify: the scope of this is limited to Virtualbox, right?
@nathan-j-hart only for the default interface. If you installed e.g. docker on any other hypervisor, it would apply, too - the extra bridge needs hiding.
Ok makes sense, thanks!