canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.76k stars 642 forks source link

Cannot start correctly instance after fresh install on Windows 11 (stuck for minutes at "starting", then timeout) #3451

Closed david-77 closed 6 months ago

david-77 commented 6 months ago

Describe the bug Instance stuck at "starting" for minutes, and then the following message appears : launch failed: The following errors occurred: microk8s: timed out waiting for response

I found other people discussing the same issue, and I tried :

Every time, i have the same issue. I need to keep WSL 2 (for docker desktop), so I can't uninstall it. Is there any way to make it work without uninstalling WSL 2 ?

To Reproduce How, and what happened?

  1. Download Mulitpass installer for Windows multipass-1.13.1+win-win64.exe
  2. Install it as Administrator
  3. Follow 'MicroK8s' installation via Multipass: https://microk8s.io/docs/install-multipass
  4. In my PowerShell, type the following command : multipass launch --name microk8s-vm --mem 4G --disk 40G
  5. Displays image download, configuration, and instance starting
  6. It stays there at "starting microk8s-vm ...."

Expected behavior What did you expect to happen? The instance to starts correctly

Logs Found this entry in windows event log, seems interesting : [daemon] Cannot open ssh session on "microk8s-vm" shutdown: ssh connection failed: 'Failed to resolve hostname microk8s-vm.mshome.net (Hôte inconnu. )'

Additional info

Additional context Windows 11 x64 WSL 2 activated Docker Desktop

2024-03-27 18_24_58-Clipboard 2024-03-27 18_16_26-Clipboard

sharder996 commented 6 months ago

Hi @david-77, I know you mentioned that you tried deleting the hosts.ics file, but it still looks like there might be a problem with the file. See the Multipass docs on stale internet connection sharing lease.

Can you either verify that there are no problems with the file or paste the contents here?

david-77 commented 6 months ago

Hi @sharder996 , Thanks for your reply. I've deleted,edited multiple times the hosts.ics file (as admin) Here its content for now :

# Copyright (c) 1993-2001 Microsoft Corp.
#
# This file has been automatically generated for use by Microsoft Internet
# Connection Sharing. It contains the mappings of IP addresses to host names
# for the home network. Please do not make changes to the HOSTS.ICS file.
# Any changes may result in a loss of connectivity between machines on the
# local network.
#
172.18.128.1 mycomputername.mshome.net # 2029 3 1 26 16 45 0 535

Once or twice i saw this file with a added line for the instance, such as 172.xxx.yyy.zzz microk8s-vm.mshome.net

The file was corrupted just once (the first time I think). But after deleting it and rebooted my machine, it always seemed to be ok.

See the Multipass docs on stale internet connection sharing lease.

Yes, I've read this page before posting my issue. Also, I found this blog post which seems corresponding my problem, referencing the #1512 issue But not real answer, only a workaround I cannot apply (removing WSL2)

sharder996 commented 6 months ago

Do you happen to have internet connection sharing turned on?

david-77 commented 6 months ago

Great !!!!! Thanks a lot ! Internet Sharing was disabled on the hyperv adapter, and once I enabled it and reboot the computer : tada ! (french way to express a little victory ;) Thanks again !!!!