Announcing the first Release Candidate for Apple M1 support

Hey all,

We’ve dropped the first Release Candidate for Apple M1 support. It can be found at:
https://multipass-ci.s3.amazonaws.com/multipass-1.8.0-rc.849%2Bgb6625c10.mac-Darwin.pkg

This is a Universal package that supports both Arm and Intel Macs.

The Intel side of things will now support a QEMU driver, but is not enabled by default. In order to enable the QEMU driver, you need to do:
$ sudo multipass set local.driver=qemu

Please note that if you currently have Hyperkit-based instances, those will not be available when using the QEMU driver, but they will be preserved and can be used again when setting the driver to hyperkit. We have plans to have a conversion utility to allow using the Hyperkit instances with the QEMU driver, but we aren’t there yet.

Lastly, there have a been a few reports during the beta testing that launching instances will suddenly start timing out where before it would work. There seems to be something going on with the Apple virtualized networking that we haven’t been able to solve yet. We are tracking that in #2265 and if you run in to that, please report it there.

Thank you, good luck, and let us know how it goes!

5 Likes

Not usable with snapcraft on an M1:

$ snapcraft
Launching a VM.
launch failed: The following errors occurred:
snapcraft-home-assistant-snap: timed out waiting for response
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.

Hey @diddledani,

Could you please provide the log found at /Library/Logs/Multipass/multipassd.log?

[2021-10-01T14:46:09.785] [debug] [update] Latest Multipass release available is version 1.7.2
[2021-10-01T14:46:14.845] [info] [rpc] gRPC listening on unix:/var/run/multipass_socket, SSL:on
[2021-10-01T14:46:14.852] [info] [daemon] Starting Multipass 1.7.2+mac
[2021-10-01T14:46:14.852] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2021-10-01T17:51:14.342] [info] [daemon] Received signal 15 (Terminated: 15)
[2021-10-01T17:51:14.350] [info] [daemon] Goodbye!
[2021-10-01T17:51:17.753] [debug] [update] Latest Multipass release available is version 1.7.2
[2021-10-01T17:51:19.213] [info] [VMImageHost] Did not find any supported products in "appliance"
[2021-10-01T17:51:20.976] [info] [rpc] gRPC listening on unix:/var/run/multipass_socket, SSL:on
[2021-10-01T17:51:20.980] [info] [daemon] Starting Multipass 1.8.0-rc.849+gb6625c10.mac
[2021-10-01T17:51:20.980] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2021-10-01T17:53:07.163] [debug] [qemu-system-aarch64] [11862] started: qemu-system-aarch64 --version
[2021-10-01T17:53:22.317] [debug] [qemu-img] [11863] started: qemu-img info --output=json /var/root/Library/Caches/multipassd/qemu/vault/images/snapcraft-core20-20210921/focal-server-cloudimg-amd64-disk.img
[2021-10-01T17:53:22.619] [debug] [qemu-img] [11864] started: qemu-img info /var/root/Library/Caches/multipassd/qemu/vault/images/snapcraft-core20-20210921/focal-server-cloudimg-amd64-disk.img
[2021-10-01T17:53:22.636] [debug] [qemu-img] [11865] started: qemu-img resize /var/root/Library/Application Support/multipassd/qemu/vault/instances/snapcraft-home-assistant-snap/focal-server-cloudimg-amd64-disk.img 274877906944
[2021-10-01T17:53:22.651] [debug] [qemu-img] [11866] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/snapcraft-home-assistant-snap/focal-server-cloudimg-amd64-disk.img
[2021-10-01T17:53:22.660] [debug] [snapcraft-home-assistant-snap] process working dir ''
[2021-10-01T17:53:22.660] [info] [snapcraft-home-assistant-snap] process program 'qemu-system-aarch64'
[2021-10-01T17:53:22.660] [info] [snapcraft-home-assistant-snap] 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, -nic, vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c, -cpu, cortex-a72, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/snapcraft-home-assistant-snap/focal-server-cloudimg-amd64-disk.img,if=none,format=qcow2,discard=unmap,id=hda, -device, scsi-hd,drive=hda,bus=scsi0.0, -smp, 2, -m, 2048M, -qmp, stdio, -chardev, null,id=char0, -serial, chardev:char0, -nographic, -cdrom, /var/root/Library/Application Support/multipassd/qemu/vault/instances/snapcraft-home-assistant-snap/cloud-init-config.iso'
[2021-10-01T17:53:22.663] [debug] [qemu-system-aarch64] [11867] started: qemu-system-aarch64 -machine virt,highmem=off -nographic -dump-vmstate /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/multipassd.nlITFX
[2021-10-01T17:53:22.702] [info] [snapcraft-home-assistant-snap] process state changed to Starting
[2021-10-01T17:53:22.704] [info] [snapcraft-home-assistant-snap] process state changed to Running
[2021-10-01T17:53:22.704] [debug] [qemu-system-aarch64] [11868] 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 -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c -cpu cortex-a72 -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/snapcraft-home-assistant-snap/focal-server-cloudimg-amd64-disk.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 2 -m 2048M -qmp stdio -chardev null,id=char0 -serial chardev:char0 -nographic -cdrom /var/root/Library/Application Support/multipassd/qemu/vault/instances/snapcraft-home-assistant-snap/cloud-init-config.iso
[2021-10-01T17:53:22.704] [info] [snapcraft-home-assistant-snap] process started
[2021-10-01T17:53:22.704] [debug] [snapcraft-home-assistant-snap] Waiting for SSH to be up
[2021-10-01T17:53:23.009] [warning] [snapcraft-home-assistant-snap] qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: Started vmnet interface with configuration:
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: MTU:              1500
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: Max packet size:  1514
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: MAC:              4a:8d:27:fa:99:dd
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: DHCP IPv4 start:  192.168.64.1
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: DHCP IPv4 end:    192.168.64.254
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: IPv4 subnet mask: 255.255.255.0
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:58:df:5c: info: UUID:             A26EFB4C-9426-4598-85B6-1730E9D58D0D

[2021-10-01T17:53:23.009] [warning] [qemu-system-aarch64] 
[2021-10-01T17:53:23.009] [debug] [snapcraft-home-assistant-snap] QMP: {"QMP": {"version": {"qemu": {"micro": 0, "minor": 1, "major": 6}, "package": ""}, "capabilities": ["oob"]}}

[2021-10-01T17:53:23.060] [debug] [snapcraft-home-assistant-snap] QMP: {"return": {}}

[2021-10-01T18:00:22.962] [info] [daemon] Cannot open ssh session on "snapcraft-home-assistant-snap" shutdown: failed to determine IP address
[2021-10-01T18:00:22.962] [info] [snapcraft-home-assistant-snap] Shutdown request delayed for 10 minutes
[2021-10-01T18:03:48.515] [debug] [sshfs-mounts] No mounts to stop for instance "snapcraft-home-assistant-snap"
[2021-10-01T18:03:48.515] [debug] [snapcraft-home-assistant-snap] QMP: {"return": {}}

[2021-10-01T18:03:48.516] [debug] [snapcraft-home-assistant-snap] QMP: {"timestamp": {"seconds": 1633107828, "microseconds": 515938}, "event": "POWERDOWN"}

[2021-10-01T18:03:48.516] [info] [snapcraft-home-assistant-snap] VM powering down
[2021-10-01T18:04:34.978] [debug] [snapcraft-home-assistant-snap] QMP: {"return": {}}

[2021-10-01T18:04:34.978] [debug] [snapcraft-home-assistant-snap] QMP: {"timestamp": {"seconds": 1633107874, "microseconds": 978028}, "event": "POWERDOWN"}

[2021-10-01T18:04:34.978] [info] [snapcraft-home-assistant-snap] VM powering down
[2021-10-01T18:05:04.978] [warning] [Qt] QProcess: Destroyed while process ("qemu-system-aarch64") is still running.
[2021-10-01T18:05:04.996] [info] [snapcraft-home-assistant-snap] process state changed to NotRunning
[2021-10-01T18:05:04.996] [error] [snapcraft-home-assistant-snap] error: program: qemu-system-aarch64; error: Process crashed
[2021-10-01T18:12:16.458] [debug] [sshfs-mounts] No mounts to stop for instance " U-�
[2021-10-01T18:12:16.937] [debug] [update] Latest Multipass release available is version 1.7.2
[2021-10-01T18:12:17.314] [info] [VMImageHost] Did not find any supported products in "appliance"
[2021-10-01T18:12:19.057] [info] [rpc] gRPC listening on unix:/var/run/multipass_socket, SSL:on
[2021-10-01T18:12:19.060] [info] [daemon] Starting Multipass 1.8.0-rc.849+gb6625c10.mac
[2021-10-01T18:12:19.061] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug

Ugh, yet another example of the virtualized network not giving out an IP address. Do you happen to have Internet sharing or a VPN turned on?

I think it’s more likely the fact that snapcraft or Multipass has decided to download an amd64 image…

1 Like

Ohhhh…yes, that is completely b0rked. I’ll enter an issue in Github.

1 Like

Thanks for pointing that out. Here’s the issue: https://github.com/canonical/multipass/issues/2268

2 Likes

Thanks @diddledani, unfortunately there are no compatible arm64 snapcraft images yet, so we had to disable it altogether.

The workaround, for now, is to launch a normal instance and use snapcraft --use-lxd inside. We’ll try and work on those images soon.