Skip to content

Cannot reboot instances on Windows 10 or 11 if /etc/hostname changes (within the instance) #3346

@holta

Description

@holta

Multipass instances work great initially on Windows!
Until we try to reboot them!

Logs often show:

[u22] Error getting extra IP addresses: ssh connection failed: 'Failed to resolve hostname u22.mshome.net (No such host is known. )'
[u22] Waiting for SSH to be up

Thank you for helping us to try to resolve this — as it's affecting everyone who's attempted to use Multipass on Windows 10 and Windows 11 so far:

Possibly related: Internet Connection Sharing file C:\WINDOWS\System32\drivers\etc\hosts.ics appears to be accidentally-but-regularly "damaged" by Multipass — which somehow inserts stray numbers as follows:

192.168.179.12 box.mshome.net # 2024 1 1 8 23 53 18 185
192.168.176.1 DESKTOP-XXXXXXX.mshome.net # 2028 12 6 30 23 53 18 185
192.168.179.226 primary.mshome.net # 2024 1 1 8 22 3 21 851
0 54 30 497

67

The https://multipass.run/docs/troubleshoot-networking Troubleshooting Doc seemed very promising. But then all 3 tips listed there (at the bottom, for Windows) were attempted, and so far do not resolve the problem.

RECAP: All such Multipass instances work great until we try to reboot them. No matter how we reboot them, they fail to reboot. Example:

C:\Users\XXXX>multipass restart u22
restart failed: ssh connection failed: 'Failed to resolve hostname u22.mshome.net (No such host is known. )'

C:\Users\XXXX>multipass shell u22
shell failed: ssh connection failed: 'Failed to resolve hostname u22.mshome.net (No such host is known. )'

C:\Users\XXXX>multipass list
Name                    State             IPv4             Image
u22                     Running           N/A              Ubuntu 22.04 LTS

C:\Users\XXXX>multipass stop u22

C:\Users\XXXX>multipass list
Name                    State             IPv4             Image
u22                     Stopped           --               Ubuntu 22.04 LTS

C:\Users\XXXX>multipass start u22
start failed: The following errors occurred:
u22: timed out waiting for response

To Reproduce

  1. Install Multipass 1.12.2 or 1.13.0 RC onto Windows 10 or 11, wiping all prior Multipass settings and instances to be extra sure.
  2. Run multipass launch 22.04 -m 2G -d 20G --cloud-init omg.yml -n u22 as specified in the Internet-in-a-Box instructions and notice that everything works great until you reboot!
  3. Try to reboot the instance 🤔

Logs

Additional info

C:\Users\XXXX>multipass version
multipass   1.13.0-rc.1308+g240e6cae1.win
multipassd  1.13.0-rc.1308+g240e6cae1.win

C:\Users\XXXX>multipass info --all
Warning: the `--all` flag for the `info` command is deprecated. Please use `info` with no positional arguments for the same effect.
info failed: ssh connection failed: 'Failed to resolve hostname u22.mshome.net (No such host is known. )'

C:\Users\XXXX>multipass info
info failed: ssh connection failed: 'Failed to resolve hostname u22.mshome.net (No such host is known. )'

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions