canonical / multipass

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

How to fix multipass on Mac M1? #3432

Closed jlirabs closed 7 months ago

jlirabs commented 7 months ago

Hi I installed multipass on my Mac M1 and it worked the day I installed it. But it stop working the day after and I already try to uninstall and reinstall again, I saw other post with similar problem and do not see any real solution. Every time I try to launch a VM I get the following error:

$ multipass shell bar
start failed: The following errors occurred:
bar: timed out waiting for response

Here the log:

[2024-03-11T17:55:56.991] [debug] [bar] process working dir ''
[2024-03-11T17:55:56.991] [info] [bar] process program 'qemu-system-aarch64'
[2024-03-11T17:55:56.991] [info] [bar] process arguments '-machine, virt,gic-version=3, -accel, hvf, -drive, file=/Library/Application Support/com.canonical.multipass/bin/../Resources/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on, -cpu, host, -nic, vmnet-shared,model=virtio-net-pci,mac=52:54:00:66:f1:56, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/bar/ubuntu-22.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/bar/cloud-init-config.iso'
[2024-03-11T17:55:56.998] [debug] [qemu-system-aarch64] [14927] started: qemu-system-aarch64 -machine virt,gic-version=3 -nographic -dump-vmstate /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/multipassd.OwUtZV
[2024-03-11T17:55:57.065] [info] [bar] process state changed to Starting
[2024-03-11T17:55:57.068] [info] [bar] process state changed to Running
[2024-03-11T17:55:57.068] [debug] [qemu-system-aarch64] [14928] started: qemu-system-aarch64 -machine virt,gic-version=3 -accel hvf -drive file=/Library/Application Support/com.canonical.multipass/bin/../Resources/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on -cpu host -nic vmnet-shared,model=virtio-net-pci,mac=52:54:00:66:f1:56 -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/bar/ubuntu-22.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/bar/cloud-init-config.iso
[2024-03-11T17:55:57.068] [info] [bar] process started
[2024-03-11T17:55:57.068] [debug] [bar] Waiting for SSH to be up
[2024-03-11T17:55:57.560] [debug] [bar] QMP: {"QMP": {"version": {"qemu": {"micro": 1, "minor": 2, "major": 8}, "package": ""}, "capabilities": ["oob"]}}

[2024-03-11T17:55:57.604] [debug] [bar] QMP: {"return": {}}

[2024-03-11T17:56:09.544] [debug] [bar] QMP: {"timestamp": {"seconds": 1710194169, "microseconds": 544717}, "event": "NIC_RX_FILTER_CHANGED", "data": {"path": "/machine/unattached/device[6]/virtio-backend"}}

[2024-03-11T17:56:51.021] [debug] [bar] QMP: {"timestamp": {"seconds": 1710194211, "microseconds": 21227}, "event": "RTC_CHANGE", "data": {"offset": 0, "qom-path": "/machine/unattached/device[4]"}}

[2024-03-11T18:00:44.686] [debug] [async task] fetch manifest periodically
[2024-03-11T18:00:44.725] [info] [VMImageHost] Did not find any supported products in "appliance"

Here some info:

$ multipass ls
Name                    State             IPv4             Image
primary                 Stopped           --               Ubuntu 22.04 LTS
bar                     Unknown           --               Ubuntu 22.04 LTS
foo                     Stopped           --               Ubuntu 22.04 LTS

$ multipass version
multipass   1.13.1+mac
multipassd  1.13.1+mac

$ multipass info bar
Name:           bar
State:          Unknown
Snapshots:      0
IPv4:           --
Release:        --
Image hash:     0f5f68b9b746 (Ubuntu 22.04 LTS)
CPU(s):         --
Load:           --
Disk usage:     --
Memory usage:   --
Mounts:         --

$ multipass get local.driver
qemu

I tried to disable the firewall too, but same timeout error. Please advise.

georgeliao commented 7 months ago

Hi @jlirabs

Sorry that you have encountered this.

By looking at your log, it looks like it is the dreadful firewall issue. There are scenarios where turning off the firewall worked and the scenarios that did not work. You mentioned that you browsed some other threads, did you look into this one https://github.com/canonical/multipass/issues/2387 and try a few fixes there?

jlirabs commented 7 months ago

Hi @georgeliao,

Thanks for your reply, yeah I tried those yesterday and didn't work, I also restarted the MAC a couple of times, also uninstall and reinstall multipass, but nothing was successful. But today it is working as normal again, and I'm in my same home network as yesterday, the only change is that today is tuesday lol, so I'm not sure what the fix is, probably a random scenario as you said.

Thanks you!

townsend2010 commented 7 months ago

Hi @jlirabs!

Since it looks like this cleared up, I'm going to close this. Please feel free to reopen or open a new issue if you encounter this problem again. Thanks!