multipass icon indicating copy to clipboard operation
multipass copied to clipboard

Timeout when starting instance

Open ahmadhabibi14 opened this issue 8 months ago • 4 comments
trafficstars

Always got timeout when launch a new instance or start an instance

multipass launch --name luwesvpn --cpus 2 --disk 5G --memory 2G 

Error:

luwesvpn: timed out waiting for response

Ingfo:

❯ multipass info luwesvpn
Name:           luwesvpn
State:          Unknown
Snapshots:      0
IPv4:           --
Release:        --
Image hash:     eacac65efe9e (Ubuntu 24.04 LTS)
CPU(s):         --
Load:           --
Disk usage:     --
Memory usage:   --
Mounts:         --

Here's the log by journalctl

❯ journalctl -xeu snap.multipass.multipassd.service
Mar 24 20:57:10 fedora multipassd[1689]: download_timeout is active
Mar 24 20:57:10 fedora multipassd[1689]: download_timeout is active
Mar 24 20:57:10 fedora multipassd[1689]: Failed to get https://cloud-images.ubuntu.com/releases/streams/v1/index.json: Host cloud-images.ubuntu.com not found - trying cache.
Mar 24 20:57:10 fedora multipassd[1689]: Cannot retrieve headers for https://cdimage.ubuntu.com/ubuntu-core/22/stable/current/ubuntu-core-22-amd64.img.xz: Host cdimage.ubuntu.>
Mar 24 20:57:10 fedora multipassd[1689]: Qt error HostNotFoundError: Host cdimage.ubuntu.com not found
Mar 24 20:57:10 fedora multipassd[1689]: download_timeout is active
Mar 24 20:57:10 fedora multipassd[1689]: Cannot retrieve headers for https://cdimage.ubuntu.com/ubuntu-core/24/stable/current/ubuntu-core-24-amd64.img.xz: Host cdimage.ubuntu.>
Mar 24 20:57:10 fedora multipassd[1689]: Qt error HostNotFoundError: Host cloud-images.ubuntu.com not found
Mar 24 20:57:10 fedora multipassd[1689]: Qt error HostNotFoundError: Host cloud-images.ubuntu.com not found
Mar 24 20:57:10 fedora multipassd[1689]: download_timeout is active
Mar 24 20:57:10 fedora multipassd[1689]: download_timeout is active
Mar 24 20:57:10 fedora multipassd[1689]: Failed to get https://cloud-images.ubuntu.com/daily/streams/v1/com.ubuntu.cloud:daily:download.json: Host cloud-images.ubuntu.com not >
Mar 24 20:57:10 fedora multipassd[1689]: Failed to get https://cloud-images.ubuntu.com/buildd/daily/streams/v1/com.ubuntu.cloud:daily:download.json: Host cloud-images.ubuntu.c>
Mar 24 20:57:10 fedora multipassd[1689]: QFutureWatcher caught DownloadException failed to download from 'https://cdimage.ubuntu.com/ubuntu-core/16/stable/current/ubuntu-core->
Mar 24 20:57:50 fedora multipassd[1689]: fetch manifest periodically
Mar 24 21:12:53 fedora multipassd[1689]: fetch manifest periodically
Mar 24 21:27:54 fedora multipassd[1689]: fetch manifest periodically
Mar 24 21:42:56 fedora multipassd[1689]: fetch manifest periodically
Mar 24 21:57:59 fedora multipassd[1689]: fetch manifest periodically
Mar 24 22:13:01 fedora multipassd[1689]: fetch manifest periodically
Mar 24 22:28:04 fedora multipassd[1689]: fetch manifest periodically
Mar 24 22:43:06 fedora multipassd[1689]: fetch manifest periodically
Mar 24 22:58:09 fedora multipassd[1689]: fetch manifest periodically
Mar 24 23:13:11 fedora multipassd[1689]: fetch manifest periodically
Mar 24 23:28:13 fedora multipassd[1689]: fetch manifest periodically
Mar 24 23:38:33 fedora multipassd[1689]: process working dir '/snap/multipass/14485/qemu'
Mar 24 23:38:33 fedora multipassd[1689]: process program 'qemu-system-x86_64'
Mar 24 23:38:33 fedora multipassd[1689]: process arguments '-bios, OVMF.fd, --enable-kvm, -cpu, host, -nic, tap,ifname=tap-a020585d6d8,script=no,downscript=no,model=virtio-net>
Mar 24 23:38:33 fedora multipassd[1689]: [210074] started: qemu-system-x86_64 -nographic -dump-vmstate /tmp/multipassd.vNSjtI
Mar 24 23:38:33 fedora multipassd[1689]: process state changed to Starting
Mar 24 23:38:33 fedora multipassd[1689]: process state changed to Running
Mar 24 23:38:33 fedora multipassd[1689]: [210099] started: qemu-system-x86_64 -bios OVMF.fd --enable-kvm -cpu host -nic tap,ifname=tap-a020585d6d8,script=no,downscript=no,mode>
Mar 24 23:38:33 fedora multipassd[1689]: process started
Mar 24 23:38:33 fedora multipassd[1689]: Waiting for SSH to be up
Mar 24 23:38:33 fedora multipassd[1689]: QMP: {"QMP": {"version": {"qemu": {"micro": 1, "minor": 2, "major": 8}, "package": ""}, "capabilities": ["oob"]}}
Mar 24 23:38:33 fedora multipassd[1689]: QMP: {"return": {}}
Mar 24 23:38:36 fedora multipassd[1689]: QMP: {"timestamp": {"seconds": 1742830716, "microseconds": 212130}, "event": "RTC_CHANGE", "data": {"offset": -1, "qom-path": "/machin>
Mar 24 23:38:37 fedora multipassd[1689]: QMP: {"timestamp": {"seconds": 1742830716, "microseconds": 264344}, "event": "RTC_CHANGE", "data": {"offset": -1, "qom-path": "/machin>
Mar 24 23:38:46 fedora multipassd[1689]: QMP: {"timestamp": {"seconds": 1742830726, "microseconds": 124192}, "event": "NIC_RX_FILTER_CHANGED", "data": {"path": "/machine/unatt>
Mar 24 23:43:14 fedora multipassd[1689]: fetch manifest periodically

ahmadhabibi14 avatar Mar 24 '25 15:03 ahmadhabibi14

Hi @ahmadhabibi14, sorry that you are experiencing this problem.

At a glance, the following lines point to the DNS resolution failure:

Mar 24 20:57:10 fedora multipassd[1689]: Failed to get https://cloud-images.ubuntu.com/daily/streams/v1/com.ubuntu.cloud:daily:download.json: Host cloud-images.ubuntu.com not >
Mar 24 20:57:10 fedora multipassd[1689]: Failed to get https://cloud-images.ubuntu.com/buildd/daily/streams/v1/com.ubuntu.cloud:daily:download.json: Host cloud-images.ubuntu.c>
Failed to get https://cloud-images.ubuntu.com/releases/streams/v1/index.json: Host cloud-images.ubuntu.com not found - trying cache.
Mar 24 20:57:10 fedora multipassd[1689]: Cannot retrieve headers for https://cdimage.ubuntu.com/ubuntu-core/22/stable/current/ubuntu-core-22-amd64.img.xz: Host cdimage.ubuntu.>
Mar 24 20:57:10 fedora multipassd[1689]: Qt error HostNotFoundError: Host cdimage.ubuntu.com not found

If you can ping the following from your machine: cloud-images.ubuntu.com , then something is blocking the way of the multipass snap. One thing we can check is whether the apparmor is denying the multipassd snap or not:

journalctl | grep audit | grep DENIED | grep multipassd

If the problem is due to the apparmor rules, the output should have network-related denial logs. Otherwise, something else is blocking the way, maybe firewalld or something else in the network path.

I'll try to see whether I can reproduce the problem or not. I'll share my findings under this ticket.

Thanks again for taking the time to report this issue.

xmkg avatar Mar 25 '25 09:03 xmkg

Hi @ahmadhabibi14, unfortunately, I could not reproduce your exact issue in a fresh Fedora 41 install. In my attempt, the snap was able to fetch the image, so the VM has been created. But it failed to start afterwards. So I tried allowing the Multipass's QEMU bridge in firewalld with the following command:

# Add the multipass QEMU bridge to the trusted zone 
sudo firewall-cmd --permanent --zone=trusted --add-interface=mpqemubr0
# Reload the firewall rules
sudo firewall-cmd --reload

Then, I tried starting the instance again; it worked. You can also try to disable firewalld temporarily to check if firewalld is the culprit: sudo systemctl stop firewalld (just don't forget to start it back afterwards).

Can you test the approach above to see if that works for you?

xmkg avatar Mar 25 '25 14:03 xmkg

Also having this issue and following any path that might fix it. Is mpqemubr0 a standard interface identifier that can be used across the board, or are these unique to a machine? Asking to find out if I can try this fix as-is or not.

Hi @ahmadhabibi14, unfortunately, I could not reproduce your exact issue in a fresh Fedora 41 install. In my attempt, the snap was able to fetch the image, so the VM has been created. But it failed to start afterwards. So I tried allowing the Multipass's QEMU bridge in firewalld with the following command:

# Add the multipass QEMU bridge to the trusted zone 
sudo firewall-cmd --permanent --zone=trusted --add-interface=mpqemubr0
# Reload the firewall rules
sudo firewall-cmd --reload

Then, I tried starting the instance again; it worked. You can also try to disable firewalld temporarily to check if firewalld is the culprit: sudo systemctl stop firewalld (just don't forget to start it back afterwards).

Can you test the approach above to see if that works for you?

KeivaOG avatar Apr 19 '25 01:04 KeivaOG

I had a similar problem. I followed the Troubleshooting guide until I got to the No IP address section that, surprisingly, doesn't have instructions for Linux. I've re-installed Multipass and it didn't help. Finally, I was able to make it work with the following commands from the comment above:

# Add the multipass QEMU bridge to the trusted zone 
sudo firewall-cmd --permanent --zone=trusted --add-interface=mpqemubr0
# Reload the firewall rules
sudo firewall-cmd --reload

Thank you.

P.S. Multipass was working correctly on my machine for many months. The problems started after I've fixed LXD connectivity issues by configuring UFW firewall as per their documentation.

izmalk avatar May 08 '25 13:05 izmalk

Hey @geoffreynyaga, we should probably this in our docs. WDYT?

ricab avatar Sep 12 '25 18:09 ricab