canonical / multipass

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

In Windows 10: multipass launch failed: Remote "" is unknown or unreachable #3579

Open jjaone opened 2 months ago

jjaone commented 2 months ago

Describe the bug In Windows 10 multipass launch of (Ubuntu) instance(s) fails with error:

launch failed: Remote "" is unknown or unreachable.

To Reproduce

  1. Install multipass (1.13.1+win)
  2. Run command like multipass -vv launch "20.04" --name "u20medium" --cpus 2 --disk 100G --memory 2G

Expected behavior Instance gets created so that with command multipass start u20medium it can be started.

Logs Please provide logs from the daemon, see accessing logs on where to find them on your platform.

Additional info

Additional context I have enterprise VPN running (can not change that), but is not a problem cause that other instance was succesfully created, started with shell.

ricab commented 2 months ago

Hi @jjaone, we have recently fixed #3464 which caused this. It hasn't been released yet, but you can try it out in our latest RC. Otherwise, a workaround on 1.13.1 is to run multipass find --force-update. Does that help in your case?

ricab commented 2 months ago

After seeing your comments in #3074, I suspect that your issue is that Multipass just couldn't connect to the image servers for some reason (possibly the VPN setup). Since you say that you were able to create an instance, it must have succeeded at some point. Any idea what changed?

jjaone commented 1 month ago

For me, this does not work: multipass find --force-update

response it: find failed: failed to download from 'https://cdimage.ubuntu.com/ubuntu-core/16/stable/current/ubuntu-core-16-amd64.img.xz': Operation canceled

But w/o that force flag... PS C:\Users\johndoe> multipass find Image Aliases Version Description 20.04 focal 20240710 Ubuntu 20.04 LTS 22.04 jammy 20240701 Ubuntu 22.04 LTS 24.04 noble,lts 20240710 Ubuntu 24.04 LTS appliance:adguard-home 20200812 Ubuntu AdGuard Home Appliance appliance:mosquitto 20200812 Ubuntu Mosquitto Appliance appliance:nextcloud 20200812 Ubuntu Nextcloud Appliance appliance:openhab 20200812 Ubuntu openHAB Home Appliance appliance:plexmediaserver 20200812 Ubuntu Plex Media Server Appliance

ricab commented 1 month ago

Hi @jjaone that is more evidence in favor of the same hypothesis: the daemon just can't connect to the internet, but it did at some point in the past and cached those images.

Given the versions you show, it was able to connect no longer ago that July 10. You may be able to solve it by figuring out what changed since then that started preventing access.

jjaone commented 1 month ago

Yes, the problem may well be due the connectivity from Windows host to public internet (because of the corporate VPN).

To diagnose this it would be helpful to know what the addresses are multipass is trying to access when find command is run?

On the other hand, I don't understand how the find command works without that force flag and is able to download and show all the images available to my multipass client.

ricab commented 1 month ago

To diagnose this it would be helpful to know what the addresses are multipass is trying to access when find command is run?

Hi @jjaone, you can find the links that it is trying to hit and failing in the logs. See accessing logs. For example, https://cdimage.ubuntu.com/ubuntu-core/16/stable/current/ubuntu-core-16-amd64.img.xz from your message above is one.

On the other hand, I don't understand how the find command works without that force flag and is able to download and show all the images available to my multipass client.

Multipass fetches data on the images periodically and caches it. By default, the find command just returns the last cached data, which succeeds, showing that you have cached data. The --force-update flag forces retrieving remote information right away, which is failing. Given how out of date your cached data is, the periodic attempts to retrieve that data have been failing for a while too. However, an attempt must have succeeded in the past. That is the info that multipass find is showing you.

jjaone commented 1 month ago

Hi @ricab,

thanks for your help in diagnosing this.

Your analysis is correct; my Windows-host in the enterprise VPN environment is able to find and download (launch) instance images only when the corporate VPN is off.

To start and use the instance I can either I have VPN on or off and it works, but when the VPN is up (and actually in any case) I need to setup the host network adapers and networking inside the Multipass Linux with very specific configuration (netplan) of two bridged adapers then to be able to access from Multipass/Ubuntu instance both corporate networks behind the VPN (NAT) and the public internet (Bridge adapers for bot Wired and Wifi).

Anyhow now it works (with above VPN off and on workaround) and can start to configure my Linux instance for actual work. 💪

ricab commented 1 month ago

Hi @jjaone, good to know you got it working for you.

If you're willing to share the VPN provider/tech you are using and a recipe to overcome/workaround the issue, we'd be grateful! We're looking to compile a little knowledge base on the topic of VPNs, with workarounds and things people used, to help others in similar situations.

jjaone commented 1 month ago

Hi @ricab,

I'd be happy to provide the community with a networking solution I came up with to use from Multipass/Linux both corporate networks behind VPN (NAT adapter) and public internet (Bridge adapter). Took some time to get it sorted out.

About the corporate VPN they are using I need to check how much (hardware, model, or forewall setup) details I can share here. Also, I believe that my networking solution is general enough that details are maybe irrelevant as long as you have:

Networks config and setup: wait for It.. 😉