canonical / multipass

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

Unable to start Multipass VMs after upgrade to MacOS 12.4 on M1 #2600

Closed tazle closed 2 years ago

tazle commented 2 years ago

Describe the bug After upgrading to MacOS 12.4 earlier today, I am not able to start Multipass VMs anymore. I also upgraded Multipass from 1.8.x to 1.9.1 after noticing the proble, but the problem persists.

My multipass is installed using Homebrew.

To Reproduce After running multipass start primary, multipass is stuck at:

$ multipass start primary 
Starting primary -                                                              

Expected behavior Expected VM to start up and be accessible.

Logs

[2022-05-30T13:22:45.603] [info] [daemon] Starting Multipass 1.9.1+mac
[2022-05-30T13:22:45.603] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2022-05-30T13:23:32.667] [debug] [primary] process working dir ''
[2022-05-30T13:23:32.667] [info] [primary] process program 'qemu-system-aarch64'
[2022-05-30T13:23:32.667] [info] [primary] 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:52:85:20, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/ubuntu-20.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda, -device, scsi-hd,drive=hda,bus=scsi0.0, -smp, 8, -m, 8192M, -qmp, stdio, -chardev, null,id=char0, -serial, chardev:char0, -nographic, -cdrom, /var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/cloud-init-config.iso'
[2022-05-30T13:23:32.671] [debug] [qemu-system-aarch64] [24851] started: qemu-system-aarch64 -machine virt,highmem=off -nographic -dump-vmstate /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/multipassd.ygoBAZ
[2022-05-30T13:23:32.742] [info] [primary] process state changed to Starting
[2022-05-30T13:23:32.744] [info] [primary] process state changed to Running
[2022-05-30T13:23:32.744] [debug] [qemu-system-aarch64] [24852] 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:52:85:20 -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/ubuntu-20.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 8 -m 8192M -qmp stdio -chardev null,id=char0 -serial chardev:char0 -nographic -cdrom /var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/cloud-init-config.iso
[2022-05-30T13:23:32.744] [info] [primary] process started
[2022-05-30T13:23:32.752] [debug] [primary] Waiting for SSH to be up
[2022-05-30T13:23:33.270] [debug] [primary] QMP: {"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 6}, "package": ""}, "capabilities": ["oob"]}}

[2022-05-30T13:23:33.297] [debug] [primary] QMP: {"return": {}}

[2022-05-30T13:23:46.018] [debug] [primary] QMP: {"timestamp": {"seconds": 1653906226, "microseconds": 18895}, "event": "NIC_RX_FILTER_CHANGED", "data": {"path": "/machine/unattached/device[13]/virtio-backend"}}

Additional info

Name: second State: Stopped IPv4: -- Release: -- Image hash: 147e0cea207e (Ubuntu 20.04 LTS) Load: -- Disk usage: -- Memory usage: -- Mounts: --


**Additional context**

The apparent problem seems to be that Multipass can't connect to the VM using SSH. It's not clear if the VM is running either, but at least the qemu-system-aarch64 process is running.

I also tried starting the same qemu process manually (to try serial console output), but I think it's missing some setup done by multipass, since qemu produces somewhat different log output as when running under multipass. Also, there is no serial console output.

$ sudo '/Library/Application Support/com.canonical.multipass/bin/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:52:85:20 -device virtio-scsi-pci,id=scsi0 -drive 'file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/ubuntu-20.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda' -device scsi-hd,drive=hda,bus=scsi0.0 -smp 8 -m 8192M -qmp stdio -chardev udp,port=4567,id=char0 -serial chardev:char0 -nographic -cdrom '/var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/cloud-init-config.iso'

{"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 6}, "package": ""}, "capabilities": ["oob"]}}

tazle commented 2 years ago

I also tried launching a new VM (multipass launch -n second), but it has the same issue.

luis4a0 commented 2 years ago

Hi @tazle, thanks for the report. It seems the MacOS firewall changed some rules in the upgrade. See #2387 for several ways of fixing this.

luis4a0 commented 2 years ago

Duplicate of #2387.

tazle commented 2 years ago

Seems that bootpd isn't running. Let's continue in #2387.