canonical / multipass

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

Cannot start existing VMs on macOS (Timeout) #2757

Open grabupdev opened 1 year ago

grabupdev commented 1 year ago

Describe the bug Describe what your problem is.

I cant start existing VMs anymore. When i launch a new VM, its working without problems.

start failed: The following errors occurred:                                    
vmname: timed out waiting for response

To Reproduce How, and what happened?

  1. multipass start vmname

Expected behavior What did you expect to happen?

The VM is starting

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

[2022-09-27T20:10:22.858] [info] [VMImageHost] Did not find any supported products in "appliance"
[2022-09-27T20:10:23.060] [info] [rpc] gRPC listening on unix:/var/run/multipass_socket
[2022-09-27T20:10:23.066] [debug] [qemu-img] [2367] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/test/ubuntu-22.04-server-cloudimg-arm64.img
[2022-09-27T20:10:23.084] [debug] [qemu-img] [2368] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/pihole/ubuntu-20.04-server-cloudimg-arm64.img
[2022-09-27T20:10:23.094] [debug] [qemu-img] [2369] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/phpTest/ubuntu-20.04-server-cloudimg-arm64.img
[2022-09-27T20:10:23.103] [debug] [qemu-img] [2370] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/vmname/ubuntu-20.04-server-cloudimg-arm64.img
[2022-09-27T20:10:23.110] [info] [daemon] Starting Multipass 1.10.1+mac
[2022-09-27T20:10:23.110] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2022-09-27T20:10:24.036] [debug] [update] Latest Multipass release available is version 1.10.1
[2022-09-27T20:10:34.115] [debug] [vmname] process working dir ''
[2022-09-27T20:10:34.115] [info] [vmname] process program 'qemu-system-aarch64'
[2022-09-27T20:10:34.115] [info] [vmname] process arguments '-machine, virt,highmem=off, -accel, hvf, -drive, file=/Library/Application Support/com.canonical.multipass/bin/../Resources/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on, -cpu, cortex-a72, -nic, vmnet-shared,model=virtio-net-pci,mac=52:54:00:8d:d7:95, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/vmname/ubuntu-20.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda, -device, scsi-hd,drive=hda,bus=scsi0.0, -smp, 1, -m, 1024M, -qmp, stdio, -chardev, null,id=char0, -serial, chardev:char0, -nographic, -cdrom, /var/root/Library/Application Support/multipassd/qemu/vault/instances/vmname/cloud-init-config.iso'
[2022-09-27T20:10:34.122] [debug] [qemu-system-aarch64] [2374] started: qemu-system-aarch64 -machine virt,highmem=off -nographic -dump-vmstate /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/multipassd.Oihmjl
[2022-09-27T20:10:34.188] [info] [vmname] process state changed to Starting
[2022-09-27T20:10:34.190] [info] [vmname] process state changed to Running
[2022-09-27T20:10:34.190] [debug] [qemu-system-aarch64] [2375] started: qemu-system-aarch64 -machine virt,highmem=off -accel hvf -drive file=/Library/Application Support/com.canonical.multipass/bin/../Resources/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on -cpu cortex-a72 -nic vmnet-shared,model=virtio-net-pci,mac=52:54:00:8d:d7:95 -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/vmname/ubuntu-20.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 1 -m 1024M -qmp stdio -chardev null,id=char0 -serial chardev:char0 -nographic -cdrom /var/root/Library/Application Support/multipassd/qemu/vault/instances/vmname/cloud-init-config.iso
[2022-09-27T20:10:34.190] [info] [vmname] process started
[2022-09-27T20:10:34.192] [debug] [vmname] Waiting for SSH to be up
[2022-09-27T20:10:34.302] [debug] [vmname] QMP: {"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 6}, "package": ""}, "capabilities": ["oob"]}}

[2022-09-27T20:10:34.328] [debug] [vmname] QMP: {"return": {}}

Additional info

Name: phpTest State: Stopped IPv4: -- Release: -- Image hash: 039c9c950da5 (Ubuntu 20.04 LTS) Load: -- Disk usage: -- Memory usage: -- Mounts: /Users/name/Documents/test => /var/www/test UID map: 501:default GID map: 20:default

Name: pihole State: Stopped IPv4: -- Release: -- Image hash: a12805170d70 (Ubuntu 20.04 LTS) Load: -- Disk usage: -- Memory usage: -- Mounts: --

Name: test State: Stopped IPv4: -- Release: -- Image hash: 78b5ca0da456 (Ubuntu 22.04 LTS) Load: -- Disk usage: -- Memory usage: -- Mounts: --


- `multipass get local.driver`
`qemu`

I already turned of the macOS Firewall and rebooted, but the problem is still present.
styro commented 1 year ago

I've just recently struck this problem today. Multipass was working fine on my Mac (2021 MacBook Pro - M1 Pro running MacOs 12.6).

After an OS crash/reboot though, I can no longer start VMs - the launch command will spin until timeout. Uninstalling and reinstalling Multipass hasn't helped.

Same version of Multipass as the above report too - 1.10.1+mac

styro commented 1 year ago

It is possible that the MacOS panic that caused this issue might be related to this other crash report: https://github.com/canonical/multipass/issues/2748

gretadolcetti commented 1 year ago

Have you tried to disable the firewall from system preferences in your Mac?

I had some major issues in Multipass regarding starting my primary VM and the only way to solve them was:

  1. Disable firewall
  2. Start primary VM
  3. Enable firewall
  4. Do your things
CrazyJazzHands commented 1 year ago

I tried this but I still get the same: timed out waiting for response