multipass icon indicating copy to clipboard operation
multipass copied to clipboard

Useless IPs reported on instances

Open Saviq opened this issue 4 years ago • 4 comments

~~#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:

  1. only display IPs for interfaces Multipass created (based on their MAC)
  2. show interface names as well (to help identify usable networks)

Saviq avatar Dec 07 '21 10:12 Saviq

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?

nathan-j-hart avatar Dec 09 '21 17:12 nathan-j-hart

Also, just wanted to clarify: the scope of this is limited to Virtualbox, right?

nathan-j-hart avatar Dec 14 '21 08:12 nathan-j-hart

@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.

Saviq avatar Dec 14 '21 08:12 Saviq

Ok makes sense, thanks!

nathan-j-hart avatar Dec 14 '21 10:12 nathan-j-hart