Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instances won't start on Apple M3 silicon #3308

Closed
ricab opened this issue Nov 17, 2023 · 76 comments
Closed

Instances won't start on Apple M3 silicon #3308

ricab opened this issue Nov 17, 2023 · 76 comments
Labels
bug high high importance
Milestone

Comments

@ricab
Copy link
Collaborator

ricab commented Nov 17, 2023

          Hello,

I've got a similar issue at least with the "multipass start" command hanging.

I've installed, uninstalled, reinstalled both 1.12.2+mac and 1.13.0-dev.298.ci4858+g5236ad09.mac.

The interesting thing (maybe, as not an expert!) is that in 1.13.0 you see some additional logging and after where it usually hangs we get "Cannot open dhcpd_leases file: No such file or directory".

I've tried creating dhcpd_leases and it still fails as usual after some time but no longer reports that it can't open the file.

I assume it's looking for something useful to be added to that file by the DHCP but it never is and that's what causes the issue? I have restarted the daemons several times, rebooted, anything I can try!

sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist 

It's a new machine (mbp m3) with the latest os (14.1.1). One of my team got their m2 running this last week with exactly the same setup and no issues here. We have had trouble in the past with the firewall on, but its not turned on my machine.

Any thoughts?
Thank you, Jeremy

[2023-11-17T12:44:06.538] [debug] [primary] process working dir ''
[2023-11-17T12:44:06.538] [info] [primary] process program 'qemu-system-aarch64'
[2023-11-17T12:44:06.538] [info] [primary] 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:ef:35:6a, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/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/primary/cloud-init-config.iso'
[2023-11-17T12:44:06.550] [debug] [qemu-system-aarch64] [936] started: qemu-system-aarch64 -machine virt,gic-version=3 -nographic -dump-vmstate /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/multipassd.zzapSp
[2023-11-17T12:44:06.723] [info] [primary] process state changed to Starting
[2023-11-17T12:44:06.726] [info] [primary] process state changed to Running
[2023-11-17T12:44:06.726] [debug] [qemu-system-aarch64] [937] 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:ef:35:6a -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/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/primary/cloud-init-config.iso
[2023-11-17T12:44:06.726] [info] [primary] process started
[2023-11-17T12:44:06.726] [debug] [primary] Waiting for SSH to be up
[2023-11-17T12:44:06.726] [warning] [primary] Cannot open dhcpd_leases file: No such file or directory
[2023-11-17T12:44:07.010] [debug] [primary] QMP: {"QMP": {"version": {"qemu": {"micro": 0, "minor": 0, "major": 8}, "package": ""}, "capabilities": ["oob"]}}

[2023-11-17T12:44:07.059] [debug] [primary] QMP: {"return": {}}

[2023-11-17T12:44:07.766] [warning] [primary] Cannot open dhcpd_leases file: No such file or directory
[2023-11-17T12:44:08.841] [warning] [primary] Cannot open dhcpd_leases file: No such file or directory
[2023-11-17T12:44:09.916] [warning] [primary] Cannot open dhcpd_leases file: No such file or directory
[2023-11-17T12:44:10.991] [warning] [primary] Cannot open dhcpd_leases file: No such file or directory
[2023-11-17T12:44:12.066] [warning] [primary] Cannot open dhcpd_leases file: No such file or directory

Originally posted by @jwynharris in #3303 (comment)

@ricab
Copy link
Collaborator Author

ricab commented Nov 17, 2023

Hi @jwynharris, for some reason DHCP isn't working for you and instances don't get an IP address (which they need for the start procedure to complete). There could be multiple reasons for that.

One frequent cause is that the macOS firewall sometimes blocks its own bootpd process. This is extensively discussed in #2387 and unfortunately there isn't much we can do about it (other than offer workarounds). Hopefully, if enough people report this problem to Apple, they will come to fix it?

If that is not your case, there are a few other possible causes for this, mostly documented here. Please try those suggestions and let us know how it goes for you.

@jwynharris
Copy link

jwynharris commented Nov 17, 2023

Hi @ricab, thank you for your help.

To Reproduce

  1. Complete fresh install on a MBP (M3) running Sonoma 14.1.1. Unmanaged, defaults with firewall off, has one wifi network connection. Nothing else added. No VPN, no nothing!

  2. Download and install the latest Mutlipass dmg (version 1.12.2). I did not install brew or anything as wanted to keep it as clean as possible.

Expected behaviour

To run multipass launch and it to successfully spin up a VM

Additional info
Screenshot 2023-11-18 at 10 33 46 AM

Screenshot 2023-11-18 at 10 35 40 AM Screenshot 2023-11-18 at 10 35 59 AM

BTW I installed multipass on my older Intel mac (also running Somona 14.1.1) just before - and it working straight away. Super weird stuff Apple! This shows useful stuff in the dhcpd_leases file so pretty sure the problem is with getting dhcp to play ball on apple silicon.

Additional context

Last line of the log is: [2023-11-17T12:44:07.059] [debug] [primary] QMP: {"return": {}}

I note in most other peoples reports that the last line they see is more more step and something like: '[2022-01-04T13:31:08.663] [debug] [dbarn] QMP: {"timestamp": {"seconds": 1641321068, "microseconds": 663550}, "event": "NIC_RX_FILTER_CHANGED", "data": {"path": "/machine/unattached/device[7]/virtio-backend"}}'

I've never seen this line.

So I have also tried:

  1. Rebooting (lots of times)

  2. Restarting mutlipass / making sure the daemon is running:

sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
  1. Reinstalling multipass (both 1.12.2 and the 1.13.0 dev version)

  2. Restarting the firewall (which shows as off in the UI in any case as my machine is currently unmanaged)

/usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
/usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd
  1. On a previous not quite as clean install, I also tried installing OnyX (Firewall randomly messing with Multipass networking on macOS #2387 and multipass times out to start a VM #3003) and ran cleanups to see if this helped. It did not unfortunately.

  2. It appears that the DCHP is not running as per https://multipass.run/docs/troubleshoot-networking#heading--troubleshooting:

Screenshot 2023-11-18 at 10 58 41 AM

I see that since version 14 (#3209) you can't enable it usingsudo launchctl load -w /System/Library/LaunchDaemons/bootps.plist - it just returns "Load failed: 5: Input/output error Try running launchctl bootstrap as root for richer errors." and also suspect this has been changed for security reasons.


Generally looks like /var/db/dhcpd_leases is never touched or ever exists on my machine. So I think you are right in that no IP address can be assigned (by dhcp) and then picked up by the VM. Since the dhcp daemon is not running as abive, maybe the default setup needs me to do something like turn on Internet Sharing to allow the dhcp service to run?

Ok, so I've just triedsudo /bin/launchctl kickstart -kp system/com.apple.bootpd and now I have this:
Screenshot 2023-11-18 at 11 21 52 AM

Let me post this, reinstall multipass, reboot, maybe kickstart bootpd and see what happens... UPDATE - it did not help :(

After reboot, I kickstarted com.apple.bootpd, ran multipass launch, and still no luck.


I will report this problem to apple as you suggest.

@jwynharris
Copy link

I've also just updated to Sonoma 14.2 Beta (23C5047e), in the hope this would fix. No luck unfortunately..

@hefan
Copy link

hefan commented Nov 18, 2023

Same Problem here with Sonoma 14.1.1, multipass 1.12.2. no firewall, no VPN.

@jwynharris
Copy link

jwynharris commented Nov 18, 2023

Also.. my managed 2019 Intel MBP with Sonoma 14.0 works well. It's even got the firewall turned on. I just updated this 2019 machine to 14.1.1 to see if it was the OS version - and it still works.

So in summary I have two machines, and others in my team have other machines:

  1. Managed 2019 Intel MBP which has run both Sonoma 14.0 and 14.1.1. WORKED! Screen shots below are from the networking config.
  2. 2023 M3 MBP which has run (clean install, default setup) which has run both Sonoma 14.1.1 and now 14.2 beta 3. DOES NOT WORK :(
  3. ... also a developer in my team installed Multipass on their 2023 M2 MBP last week on a fresh install and this WORKED.

Could it be the m3? Makes no sense!

Screenshot 2023-11-19 at 11 24 36 AM Screenshot 2023-11-19 at 11 24 20 AM Screenshot 2023-11-19 at 11 24 03 AM

@jwynharris
Copy link

jwynharris commented Nov 19, 2023

Given that on my small sample of working on m2 and intel but not on m3, I wondering if maybe some difference in hardware was causing the issue?

So I setup a ethernet network to see if it would work on the intel and m3 machine.

  1. intel - works on ethernet (as it did with wifi).
  2. m3 - NO luck on ethernet :(

However I did notice something interesting between these two setups. On the m3 I see this in the logs:

Screenshot 2023-11-19 at 1 49 43 PM

However on the intel:

Screenshot 2023-11-19 at 1 51 01 PM

Note that there is no mention of multipass or multipassd in the Intel launchd.log file (remember the intel version works).

Maybe something to do with how the processes run or something and this is causing the issue??

@nktpro
Copy link

nktpro commented Nov 19, 2023

Just wanted to add one more data point here: I could also confirm exactly what @jwynharris was seeing.

I just transitioned from a M2 (Max) MBP to the new M3 (Max), both with Firewall disabled. multipass has been working perfectly on the M2 machine for a long time, but could not launch/start instances on the M3. My observations of multipassd logs matched what @jwynharris reported.

@jwynharris
Copy link

Hi @ricab,

I suspect this is a new / different issue. Do you or someone else familiar with the code base have access to an M3 that can debug this specific issue?

Then if it is something weird with Apple's networking / drivers / hardware then I can submit another bug request with more detail, as can others.

Happy to help as I can as I am keen to solve this for me and anyone else with an M3.

Also I would be interested to hear if there is anyone reading this who has an M3 and is NOT experiencing this issue (as currently assuming everyone will).

Thank you,
Jeremy

@hefan
Copy link

hefan commented Nov 19, 2023

To also be more precise:
Same Problem here with new iMac M3 Sonoma 14.1.1, multipass 1.12.2. no firewall, no VPN.
No Problem with Macbook Air M1 Sonoma 14.1.1, multipass 1.12.2. no firewall, no VPN.

@townsend2010
Copy link
Contributor

Hello All,

I'm convinced this is not the dreaded Apple Firewall issue and is appearing more likely to be a lack of M3 support in this version of QEMU that is in our latest package. Unfortunately, no one on the Multipass Team has an M3-based Mac yet. That said, I would like to see what is happening in the boot process.

@jwynharris, since you've been investigating this quite a bit, could I please ask you to do the following?

First, make sure all qemu-system-aarch64 processes are not running. The easy way is to issue:

$ sudo killall -9 qemu-system-aarch64

Then run the following command in the terminal:

$ sudo /Library/Application\ Support/com.canonical.multipass/bin/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:ef:35:6a -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application\ Support/multipassd/qemu/vault/instances/primary/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 -cdrom /var/root/Library/Application\ Support/multipassd/qemu/vault/instances/primary/cloud-init-config.iso

The preceding assumes an instance named primary already exists. Also could you please get a screen grab of the QEMU window and attach it to this bug?

In the meantime, I will work on updating our version of QEMU and get a test package built that can be tried.

Thank you!

@townsend2010 townsend2010 changed the title No DHCP leases on M3 MBP Instances won't start on Apple M3 silicon Nov 20, 2023
@townsend2010
Copy link
Contributor

From all indications, looks like the same issue afflicting lima-vm: lima-vm/lima#1996

@jwynharris
Copy link

Hi @townsend2010

Thanks. Had to create an instance called primary with multipass set client.primary-name=primary. Which naturally didn't complete. After a while I rebooted and then ran your commands:

Screenshot 2023-11-21 at 9 36 13 AM

Here is the QEMU window:

Screenshot 2023-11-21 at 9 36 20 AM

It showed this straight away and didn't proceed or update after that.

Hope this helps!

@townsend2010
Copy link
Contributor

Hi @jwynharris!

Thanks for this. It confirms the UEFI firmware that ships with at least the version of qemu in our released package has some incompatibility with the M3 hardware. I'm working on making a test package to see if there is an update to qemu that fixes this.

@townsend2010
Copy link
Contributor

Hello again,

I have a test package here: https://multipass-ci.s3.amazonaws.com/pr568/multipass-1.13.0-dev.1245.pr568%2Bgf87e344db.mac-Darwin.pkg

I will say, that I'm not real hopeful that this will fix it because the EDK2 firmware in upstream QEMU is the same as in our release package and I believe the problem is with that. That said, perhaps there is a change in qemu itself that does indeed fix it, so 🤞

Please let us know your results. Thanks!

@stevenschlansker
Copy link

I filed a seemingly-related issue here:
https://gitlab.com/qemu-project/qemu/-/issues/1990

@townsend2010
Copy link
Contributor

@stevenschlansker Thank you filing that upstream qemu issue! It is the same issue.

@jwynharris
Copy link

Hi @townsend2010

No luck unfortunately :(

Installed via the package, rebooted. Then ran. Log here:

[2023-11-22T09:27:55.493] [info] [daemon] Starting Multipass 1.13.0-dev.1245.pr568+gf87e344db.mac
[2023-11-22T09:27:55.493] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2023-11-22T09:28:04.239] [info] [daemon] Received signal 15 (Terminated: 15)
[2023-11-22T09:28:04.271] [info] [daemon] Goodbye!
[2023-11-22T09:29:07.904] [debug] [blueprint provider] Loading "anbox-cloud-appliance" v1
[2023-11-22T09:29:07.929] [debug] [blueprint provider] Loading "charm-dev" v1
[2023-11-22T09:29:07.932] [debug] [blueprint provider] Loading "docker" v1
[2023-11-22T09:29:07.934] [debug] [blueprint provider] Loading "jellyfin" v1
[2023-11-22T09:29:07.937] [debug] [blueprint provider] Loading "minikube" v1
[2023-11-22T09:29:07.938] [debug] [blueprint provider] Loading "ros-noetic" v1
[2023-11-22T09:29:07.942] [debug] [blueprint provider] Loading "ros2-humble" v1
[2023-11-22T09:29:07.958] [info] [rpc] gRPC listening on unix:/var/run/multipass_socket
[2023-11-22T09:29:07.958] [debug] [async task] fetch manifest periodically
[2023-11-22T09:29:07.968] [info] [VMImageHost] Did not find any supported products in "appliance"
[2023-11-22T09:29:07.971] [debug] [qemu-img] [893] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/ubuntu-22.04-server-cloudimg-arm64.img
[2023-11-22T09:29:08.016] [debug] [qemu-img] [895] started: qemu-img amend -o compat=1.1 /var/root/Library/Application Support/multipassd/qemu/vault/instances/primary/ubuntu-22.04-server-cloudimg-arm64.img
[2023-11-22T09:29:08.032] [info] [daemon] Starting Multipass 1.13.0-dev.1245.pr568+gf87e344db.mac
[2023-11-22T09:29:08.032] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2023-11-22T09:29:08.900] [debug] [update] Latest Multipass release available is version 1.12.2
[2023-11-22T09:30:42.612] [debug] [qemu-system-aarch64] [3573] started: qemu-system-aarch64 --version
[2023-11-22T09:30:44.097] [debug] [qemu-img] [3577] started: qemu-img info /var/root/Library/Caches/multipassd/qemu/vault/images/jammy-20231026/ubuntu-22.04-server-cloudimg-arm64.img
[2023-11-22T09:30:44.111] [debug] [qemu-img] [3578] started: qemu-img resize /var/root/Library/Application Support/multipassd/qemu/vault/instances/warm-mantis/ubuntu-22.04-server-cloudimg-arm64.img 5368709120
[2023-11-22T09:30:44.124] [debug] [qemu-img] [3579] started: qemu-img snapshot -l /var/root/Library/Application Support/multipassd/qemu/vault/instances/warm-mantis/ubuntu-22.04-server-cloudimg-arm64.img
[2023-11-22T09:30:44.130] [debug] [qemu-img] [3580] started: qemu-img amend -o compat=1.1 /var/root/Library/Application Support/multipassd/qemu/vault/instances/warm-mantis/ubuntu-22.04-server-cloudimg-arm64.img
[2023-11-22T09:30:44.135] [debug] [warm-mantis] process working dir ''
[2023-11-22T09:30:44.135] [info] [warm-mantis] process program 'qemu-system-aarch64'
[2023-11-22T09:30:44.135] [info] [warm-mantis] 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:94:56:5f, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/warm-mantis/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/warm-mantis/cloud-init-config.iso'
[2023-11-22T09:30:44.137] [debug] [qemu-system-aarch64] [3581] started: qemu-system-aarch64 -machine virt,gic-version=3 -nographic -dump-vmstate /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/multipassd.yoGQyp
[2023-11-22T09:30:44.167] [info] [warm-mantis] process state changed to Starting
[2023-11-22T09:30:44.170] [info] [warm-mantis] process state changed to Running
[2023-11-22T09:30:44.170] [debug] [qemu-system-aarch64] [3582] 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:94:56:5f -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/warm-mantis/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/warm-mantis/cloud-init-config.iso
[2023-11-22T09:30:44.170] [info] [warm-mantis] process started
[2023-11-22T09:30:44.171] [debug] [warm-mantis] Waiting for SSH to be up
[2023-11-22T09:30:44.472] [debug] [warm-mantis] QMP: {"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 8}, "package": ""}, "capabilities": ["oob"]}}

[2023-11-22T09:30:44.535] [debug] [warm-mantis] QMP: {"return": {}}

@townsend2010
Copy link
Contributor

Hi @jwynharris,

Ok, I was afraid of that and is not unexpected. Thanks for trying and unfortunately, we'll just have to wait for upstream to figure out what the problem is.

@jwynharris
Copy link

Thanks for all your efforts so far @townsend2010. I assume they know there is an issue and working on a fix? I'll watch this thread so if any update please post here. Happy to test anything :)

@townsend2010
Copy link
Contributor

I assume they know there is an issue and working on a fix?

Well, M3's have been out less than a month and the upstream bug was entered less than 24 hours ago (at the time of this writing), so they might be aware, but probably haven't started working on a fix I would say. I will monitor upstream and report here on any activity.

@upngo
Copy link

upngo commented Nov 22, 2023

rancher-sandbox/rancher-desktop#6006

Found this issue where someone alludes to M3 being incompatible with QEMU currently

@jwynharris
Copy link

Looks like some progress at https://gitlab.com/qemu-project/qemu/-/issues/1990 reported by @stevenschlansker?

@townsend2010
Copy link
Contributor

Hello,

Here is a quick update to what is happening upstream regarding this issue. It appears there is already a fix in upstream EDK2 (the virtual UEFI firmware) and seems to fix it for M3 users. However, it looks like this same fix is not working reliably on M1 based machines. A developer seems to understand what is going on with this and has made a recommendation on how upstream QEMU should handle this, but there has been no activity after that. 🙂

@Fred78290
Copy link

Probably it will better to use Apple Virtualization Framework rather than qemu. Rancher Desktop dit it and it works perfectly on my M3 Pro.

The x86_64 emulation is done via Rosetta2 thru the Virtualization Framework.
Regards

@townsend2010 townsend2010 added bug high high importance labels Dec 1, 2023
@lunderhage
Copy link

@Fred78290 : I agree, but let's get what we have working first. I am sad I can't really put my shiny new M3 Max Macbook to business yet without a proper virtualization solution.

@jwynharris
Copy link

@lunderhage - yes, and I think multipass will perform better as not going through Rosetta2?

@townsend2010
Copy link
Contributor

It appears upstream QEMU has now tagged v8.2.1, so I will begin incorporating that into the Multipass 1.13.1 release.

@townsend2010
Copy link
Contributor

Hey all!

Here is a test package that hopefully works on all of the Apple silicon types: https://multipass-ci.s3.amazonaws.com/pr583/multipass-1.14.0-dev.1487.pr583%2Bgc432665bc.mac-Darwin.pkg

Please try it out and let us know. Thanks!

@kb1
Copy link

kb1 commented Jan 30, 2024

Ah, my precious is back. The dry winter is over. On my M3, I successfully launched an instance and shelled in. Thank you!!!

@ssg3d
Copy link

ssg3d commented Jan 30, 2024

Ah, my precious is back

Ditto

Here is a test package that hopefully works on all of the Apple silicon types

It works on my M3 too.

Though my test case was slightly different - I uninstalled the old Multipass by doing sudo sh "/Library/Application Support/com.canonical.multipass/uninstall.sh", but said NO to cleaning up the instances. On installing the new Multipass, I saw that the instance was still running. And I was able to shell into it.

@ssg3d
Copy link

ssg3d commented Jan 30, 2024

Update: I launched a new instance, was able to shell into it and stop it. However I could not stop my old instance which was created using the older Multipass. On rebooting the Mac, Multipass list gave the error "list failed: cannot connect to the multipass socket". I also can't uninstall Multipass now using "/Library/Application Support/com.canonical.multipass/uninstall.sh", it says zsh: permission denied: /Library/Application Support/com.canonical.multipass/uninstall.sh. The folder is not present in /Library/Application Support.

@ssg3d
Copy link

ssg3d commented Jan 30, 2024

Ah now I am really in a mess. I tried installing it again. But still no luck uninstalling. I looked up #3257, did sudo find ~/Library /var/root/Library /Library -iname 'multipass*' 2>/dev/null, there was a bunch of stuff, ran sudo rm -rf ~/Library/{Application\ Support/multipass*,Preferences/multipass} /Library/Logs/Multipass, but still there is a bunch of Multipass stuff when I ran the find again. Also I have the UI icon running which I cannot stop. I think I scrambled my machine, please help me clean it up and reinstall Multipass!!

@ssg3d
Copy link

ssg3d commented Jan 30, 2024

Sorry for the knee jerk desperate updates. Over a combination of reboots, installs, uninstalls and manual file removal, I was finally able to clean all Multipass files. And the UI also is gone. I did a reinstall, launched a test instance and all is well.

@jwynharris
Copy link

Just tried 1.14.0-dev - I could shell in, but for my particular existing dev environment it didn't quite work as when I tried to boot up my existing Laravel application it could not write to the logs - some permission issue. So I reverted back to 1.11.1 and it all worked fine! When I get more time I will try 1.14 again and see what the issue is.

@Fred78290
Copy link

Fred78290 commented Jan 30, 2024

It appears upstream QEMU has now tagged v8.2.1, so I will begin incorporating that into the Multipass 1.13.1 release.

@townsend2010

qemu 8.2.1 support now Apple silicon M3, tested with homebrew + qemu + limactl and its work.

with cpuType = host not cortex-a75 :)

macbookm3fboltz:autoscaled-masterkube-multipass fboltz$ limactl ls -f json | jq .
{
  "name": "test",
  "status": "Running",
  "dir": "/Users/fboltz/.lima/test",
  "vmType": "qemu",
  "arch": "aarch64",
  "cpuType": "host",
  "cpus": 2,
  "memory": 2147483648,
  "disk": 10737418240,
  "sshLocalPort": 60981,
  "sshConfigFile": "/Users/fboltz/.lima/test/ssh.config",
  "hostAgentPID": 35919,
  "driverPID": 35934,
  "config": {
    "vmType": "qemu",
    "os": "Linux",
    "arch": "aarch64",
    "images": [
      {
        "location": "https://cloud-images.ubuntu.com/releases/23.10/release-20231220/ubuntu-23.10-server-cloudimg-amd64.img",
        "arch": "x86_64",
        "digest": "sha256:f1f08067d92fedd9f4a0952d86bbb13506f054eb06599003154bea65bc7463a0"
      },
      {
        "location": "https://cloud-images.ubuntu.com/releases/23.10/release-20231220/ubuntu-23.10-server-cloudimg-arm64.img",
        "arch": "aarch64",
        "digest": "sha256:261fdf08e5ed8dffbf13a6a6d82d6e997d85bdda71f3e7212773b48a619a42fc"
      },
      {
        "location": "https://cloud-images.ubuntu.com/releases/23.10/release/ubuntu-23.10-server-cloudimg-amd64.img",
        "arch": "x86_64"
      },
      {
        "location": "https://cloud-images.ubuntu.com/releases/23.10/release/ubuntu-23.10-server-cloudimg-arm64.img",
        "arch": "aarch64"
      }
    ],
    "cpuType": {
      "aarch64": "host",
      "armv7l": "cortex-a7",
      "riscv64": "rv64",
      "x86_64": "qemu64"
    },
    "cpus": 2,
    "memory": "2GiB",
    "disk": "10GiB",
    "mounts": [
      {
        "location": "~",
        "mountPoint": "~",
        "writable": false,
        "sshfs": {
          "cache": true,
          "followSymlinks": false,
          "sftpDriver": ""
        },
        "9p": {
          "securityModel": "none",
          "protocolVersion": "9p2000.L",
          "msize": "128KiB",
          "cache": "fscache"
        },
        "virtiofs": {}
      },
      {
        "location": "/tmp/lima",
        "mountPoint": "/tmp/lima",
        "writable": true,
        "sshfs": {
          "cache": true,
          "followSymlinks": false,
          "sftpDriver": ""
        },
        "9p": {
          "securityModel": "none",
          "protocolVersion": "9p2000.L",
          "msize": "128KiB",
          "cache": "mmap"
        },
        "virtiofs": {}
      }
    ],
    "mountType": "reverse-sshfs",
    "ssh": {
      "localPort": 0,
      "loadDotSSHPubKeys": true,
      "forwardAgent": false,
      "forwardX11": false,
      "forwardX11Trusted": false
    },
    "firmware": {
      "legacyBIOS": false,
      "images": [
        {
          "location": "https://gitlab.com/kraxel/qemu/-/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2",
          "arch": "aarch64",
          "digest": "sha256:a5fc228623891297f2d82e22ea56ec57cde93fea5ec01abf543e4ed5cacaf277",
          "vmType": "qemu"
        },
        {
          "location": "https://github.com/AkihiroSuda/qemu/raw/704f7cad5105246822686f65765ab92045f71a3b/pc-bios/edk2-aarch64-code.fd.bz2",
          "arch": "aarch64",
          "digest": "sha256:a5fc228623891297f2d82e22ea56ec57cde93fea5ec01abf543e4ed5cacaf277",
          "vmType": "qemu"
        }
      ]
    },
    "audio": {
      "device": ""
    },
    "video": {
      "display": "none",
      "vnc": {
        "display": "127.0.0.1:0,to=9"
      }
    },
    "upgradePackages": false,
    "containerd": {
      "system": false,
      "user": true,
      "archives": [
        {
          "location": "https://github.com/containerd/nerdctl/releases/download/v1.7.2/nerdctl-full-1.7.2-linux-amd64.tar.gz",
          "arch": "x86_64",
          "digest": "sha256:5ea4524ff346000bb32ef1d9fb8c4b8e809fbff69260d179218d7c308cc2aa99"
        },
        {
          "location": "https://github.com/containerd/nerdctl/releases/download/v1.7.2/nerdctl-full-1.7.2-linux-arm64.tar.gz",
          "arch": "aarch64",
          "digest": "sha256:3d6f256181005a1b612cd340c8eb84c2b9218a0df040e59e300d6168b0701de2"
        }
      ]
    },
    "guestInstallPrefix": "/usr/local",
    "hostResolver": {
      "enabled": true,
      "ipv6": false
    },
    "propagateProxyEnv": true,
    "caCerts": {
      "removeDefaults": false
    },
    "rosetta": {
      "enabled": false,
      "binfmt": false
    },
    "plain": false,
    "timezone": "Europe/Paris"
  },
  "sshAddress": "127.0.0.1",
  "protected": false,
  "limaVersion": "0.20.0",
  "HostOS": "darwin",
  "HostArch": "aarch64",
  "LimaHome": "/Users/fboltz/.lima",
  "IdentityFile": "/Users/fboltz/.lima/_config/user"
}

@townsend2010
Copy link
Contributor

Hi @jwynharris!

Just tried 1.14.0-dev - I could shell in, but for my particular existing dev environment it didn't quite work as when I tried to boot up my existing Laravel application it could not write to the logs - some permission issue. So I reverted back to 1.11.1 and it all worked fine! When I get more time I will try 1.14 again and see what the issue is.

This is very odd. Please let us know as soon as you can what you have found out. I'm in the process of getting this into the 1.13.1 and if there is a regression, we need to be aware of it. Thanks!

@ddemoss-sc
Copy link

@townsend2010 I am having a similar issue. When viewing ls -alh within the VM, it will show odd ownership: nobody. In my particular case this is in a mounted drive, and when I view the file ownership in the m3 macbook the owner is shown as 1000. I can change the ownership of the file (chown) only from the macbook (even running chown in ubuntu as root fails), but running additional commands continues to generate files randomly with this permission bug. If there are any log files or commands that would help suss out what's going on here let me know. Thanks

@townsend2010
Copy link
Contributor

Hi @ddemoss-sc!

You are hitting some other issue not related to this QEMU issue. In the package version I posted here, there are other changes around mount's file ownership as well. Could you please open a new issue? Thanks!

@lunderhage
Copy link

When will we see the v1.13.1 release? The milestone says it is 100% completed, but there is still no new release.

@townsend2010
Copy link
Contributor

townsend2010 commented Feb 8, 2024

Hi @lunderhage!

There was another regression that was just fixed and closed today. I then had to cherry pick this into the release branch and RC packages are being built as I type this. We will then have to sanity test these packages and if all is good, we will submit the packages for signing by our IS team which can take up to 3 days (hopefully shorter when I escalate this). If all goes well, I expect 1.13.1 to be released next week.

@ssg3d
Copy link

ssg3d commented Feb 10, 2024

To upgrade to the new version, whats the recommended process?

  1. Simply run the new DMG?
  2. Uninstall the old version first then 1?
  3. Stop all instances on the old version first then 2 then 1?
  4. Delete all instances from the old version first then 2, 1?

@townsend2010
Copy link
Contributor

Hi all!

Just to let you know, version 1.13.1 has been released that has the fix for this issue.

@ssg3d, all you need to do is download and install the package and follow the prompts.

@zchrykng
Copy link

Just commenting to say that it works on my machine. No issues.

@ssg3d
Copy link

ssg3d commented Feb 13, 2024

@townsend2010

all you need to do is download and install the package and follow the prompts.

Thanks, thats simple and it works. I'm now running 1.13.1 and all seems well.

@jwynharris
Copy link

Same same! Thank you @townsend2010 for seeing this through

@saltyautomation
Copy link

Same for me as well just a little late to this party. Thanks for getting this fixed @townsend2010!

@lucj
Copy link

lucj commented Oct 8, 2024

Hi, I've just installed Multipass 1.14.0 on mac M3 Pro, and the launch command hangs.
Any hints ?

@Fred78290
Copy link

Are running on MacOS sequoia? In this case it's normal

Install the 1.15-dev (search in issue)

regards

@lucj
Copy link

lucj commented Oct 9, 2024

Thanks @Fred78290, no problem I'll wait for official 1.15.

@Fred78290
Copy link

See here #3661 (comment)

@lucj
Copy link

lucj commented Nov 24, 2024

Hi, the 1.15 test package does not seem to be available anymore. https://multipass-ci.s3.amazonaws.com/pr661/multipass-1.15.0-dev.2929.pr661%2Bgc67ef6641.mac-Darwin.pkg

@ricab
Copy link
Collaborator Author

ricab commented Nov 26, 2024

Wrong issue @lucj? Anyway, that's been released (in 1.14.1).

@lucj
Copy link

lucj commented Nov 28, 2024

hi @ricab yes it was the right issue as instances didn't start on macOS m3 :) It's ok now with 1.14.1, thanks 👍
I'm getting a 'Failed to connect: No route to host' when trying to shelling into my instance, but it's probably something on my side :)

@ricab
Copy link
Collaborator Author

ricab commented Nov 28, 2024

Hi @lucj, others are reporting that in #3766. We couldn't reproduce yet, but we're still working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high high importance
Projects
None yet
Development

No branches or pull requests