multipass icon indicating copy to clipboard operation
multipass copied to clipboard

[hyperv] `multipass ls` shows stale IP address after instance restart

Open holta opened this issue 1 year ago • 7 comments

After an instance is rebooted on Windows, multipass list and multipass info both display the instance's original/stale (erroneous!) IP address on top:

C:\Users\XXXX>multipass version
multipass   1.13.0-rc.1313+g66f773628.win
multipassd  1.13.0-rc.1313+g66f773628.win

C:\Users\XXXX>multipass get local.driver
hyperv

C:\Users\XXXX>multipass launch -n primary
Launched: primary
Skipping mount due to disabled mounts feature                                  # ⚠️ SHOULD WE IGNORE THIS WARNING? ⚠️

C:\Users\XXXX>multipass exec primary -- hostname -I
192.168.176.167

C:\Users\XXXX>multipass list
Name                    State             IPv4             Image
primary                 Running           192.168.176.167  Ubuntu 22.04 LTS    # ✅ ACCURATE IP ADDRESS ✅

C:\Users\XXXX>multipass restart

C:\Users\XXXX>multipass exec primary -- hostname -I
192.168.178.108

C:\Users\XXXX>multipass list
Name                    State             IPv4             Image
primary                 Running           192.168.176.167  Ubuntu 22.04 LTS    # ❌ STALE/ERRONEOUS IP ADDRESS ❌
                                          192.168.178.108                      # ✅ ACCURATE IP ADDRESS ✅

C:\Users\XXXX>multipass restart

C:\Users\XXXX>multipass exec primary -- hostname -I
192.168.181.12

C:\Users\XXXX>multipass list
Name                    State             IPv4             Image
primary                 Running           192.168.176.167  Ubuntu 22.04 LTS    # ❌ STALE/ERRONEOUS IP ADDRESS ❌
                                          192.168.181.12                       # ✅ ACCURATE IP ADDRESS ✅

WHY THIS HURTS: Newcomers and students get very confused, as we ask them to use the Multipass instance's IP Address and they naturally try the (top-most) STALE/ERRONEOUS IP Address.

UGLY WORKAROUND: Start > Run > services.msc > Multipass Service > Restart works! (To stop the display of the stale/erroneous IP address.)

QUESTION: We would rather not ask everyday users and newcomers to Restart "Multipass Service" ! Is the underlying bug possibly solvable in coming months?

ASIDE: A simple restart of "Multipass Service" indicates this issue appears to be very solvable — i.e. very distinct from the nightmare revolving around C:\WINDOWS\System32\drivers\etc\hosts.ics as mentioned by https://multipass.run/docs/troubleshoot-networking > Stale Internet connection sharing lease (or am I wrong?)

Tangentially Related:

  • #3346
  • #3353

holta avatar Jan 04 '24 22:01 holta

Hi @holta, thanks for reporting this!

I am seeing this on my end as well and is something we should definitely get fixed.

sharder996 avatar Jan 05 '24 18:01 sharder996

Hi @holta, thanks for reporting this!

I am seeing this on my end as well and is something we should definitely get fixed.

Hi @sharder996!

Any guesses if this might be fixed as part of Multipass 1.14 or 1.15?

holta avatar Jul 17 '24 15:07 holta

Question: Are the following somewhat related, if only tangentially?

  • #2368
  • #3587

holta avatar Jul 17 '24 18:07 holta

It looks like the issue you mentioned might be specific to VirtualBox...

We have not gotten around to fixing this for the 1.14 release, but hopefully we can fix it for 1.15. I will bring it up with the team to see if we can prioritize it.

sharder996 avatar Jul 18 '24 14:07 sharder996