multipass icon indicating copy to clipboard operation
multipass copied to clipboard

Multipass launch command line will crash MacOS

Open christianjli opened this issue 1 year ago • 16 comments

Describe the bug Every time when I trying to start a new instance by using "multiples launch --name primary", the terminal would stuck at "Starting Instance" step. And then my MacOS will crash and reboot.

To Reproduce How, and what happened?

  1. Typing "multiples launch --name primary" in terminal

Expected behavior The instance working without any crashes.

Logs No Logs available since the system crashed before getting any logs.

Additional info

  • My MacOs version is 12.3, and the build version is 21E230.

  • 'multipass version': `multipass 1.14.0+mac multipassd 1.14.0+Mac

-multipass info : No instance found.

  • multipass get local.driver: qemu

Thanks!

christianjli avatar Oct 07 '24 15:10 christianjli

Getting the same on macOS 15

EDIT: The 1.15 dev fixed my problem, so potentially not the same problem

BenStreet365 avatar Oct 07 '24 18:10 BenStreet365

@BenStreet365 There is a known issue with Multipass and MacOS 15 Sequoia. It has been addressed and is planned to be released in an upcoming patch release. You can download it from here and try it out if you like. If it doesn't fix your issue, please let us know.

sharder996 avatar Oct 07 '24 18:10 sharder996

@sharder996 Yeah just go that, thank you! Missed the other issue.

BenStreet365 avatar Oct 07 '24 18:10 BenStreet365

@christianjli Can you elaborate a bit on "No Logs available since the system crashed before getting any logs."? Have you taken a look at our doc for accessing logs? Is the file gone after restarting? If not, providing the output of tail multipassd.log would greatly help in figuring out what the cause of the issue is.

sharder996 avatar Oct 07 '24 18:10 sharder996

@sharder996 I apologize for leaving out certain details, my TA actually wrote it up quickly to see if anyone could help. Here are some more details, please let me know if this is insufficient. While starting the instance with launch my computer would restart. I found our that despite it restarting, the instance was still created, however trying to access it with shell would continually cause my computer to crash and restart each time I attempted it. My TA deleted and redownloaded multipass so I did lose all previous data, but if you'd like I can run it again to retrieve more details with tail multipassd.log.

christianjli avatar Oct 07 '24 22:10 christianjli

@christianjli no worries, thank you for providing more context! If you can run it again and send the output of tail multipassd.log that'd be great.

sharder996 avatar Oct 08 '24 16:10 sharder996

Getting the same on macOS 15

EDIT: The 1.15 dev fixed my problem, so potentially not the same problem

@BenStreet365 That’s nice, but I only see version 1.14 available for download. I have the same issue with macOS 15. After installing the hotfix 1.14.1 RC1, it worked for a short period, but now I have the same problem with starting an instance.

vikingjunior12 avatar Oct 09 '24 16:10 vikingjunior12

@vikingjunior12 here it is: https://github.com/canonical/multipass/issues/3661#issuecomment-2363403467

BenStreet365 avatar Oct 09 '24 17:10 BenStreet365

@vikingjunior12 You have the same problem as OP? If so, do you have any logs that you can post?

sharder996 avatar Oct 09 '24 18:10 sharder996

@vikingjunior12 +1, @sharder996 my logs are as follows:

[2024-10-16T18:39:18.976] [info] [ubuntu] process state changed to Starting [2024-10-16T18:39:18.979] [info] [ubuntu] process state changed to Running [2024-10-16T18:39:18.979] [debug] [qemu-system-aarch64] [22082] 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:ea:82:8f -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application Support/multipassd/qemu/vault/instances/ubuntu/ubuntu-22.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 6 -m 15360M -qmp stdio -chardev null,id=char0 -serial chardev:char0 -nographic -cdrom /var/root/Library/Application Support/multipassd/qemu/vault/instances/ubuntu/cloud-init-config.iso [2024-10-16T18:39:18.980] [info] [ubuntu] process started [2024-10-16T18:39:18.980] [debug] [ubuntu] Waiting for SSH to be up [2024-10-16T18:39:18.982] [debug] [arp] [22083] started: arp -an [2024-10-16T18:39:19.005] [debug] [ubuntu] QMP: {"QMP": {"version": {"qemu": {"micro": 1, "minor": 2, "major": 8}, "package": ""}, "capabilities": ["oob"]}}

[2024-10-16T18:39:19.025] [debug] [ubuntu] QMP: {"return": {}}

[2024-10-16T18:39:21.142] [debug] [arp] [22088] started: arp -an [2024-10-16T18:39:23.261] [debug] [arp] [22093] started: arp -an [2024-10-16T18:39:25.413] [debug] [arp] [22098] started: arp -an [2024-10-16T18:39:27.569] [debug] [arp] [22103] started: arp -an [2024-10-16T18:39:29.679] [debug] [arp] [22108] started: arp -an [2024-10-16T18:39:31.799] [debug] [arp] [22118] started: arp -an [2024-10-16T18:39:33.921] [debug] [arp] [22123] started: arp -an [2024-10-16T18:39:36.059] [debug] [arp] [22128] started: arp -an [2024-10-16T18:39:38.164] [debug] [arp] [22133] started: arp -an [2024-10-16T18:39:40.261] [debug] [arp] [22138] started: arp -an

The new VM is OK, but the old VM's state is unknown. image

rydeng avatar Oct 16 '24 10:10 rydeng

@rydeng what version of macOS are you on?

andrei-toterman avatar Oct 16 '24 12:10 andrei-toterman

15.0.1

---- Replied Message ---- | From | Andrei @.> | | Date | 10/16/2024 20:16 | | To | canonical/multipass @.> | | Cc | rydeng @.>, Mention @.> | | Subject | Re: [canonical/multipass] Multipass launch command line will crash MacOS (Issue #3719) |

@rydeng what version of macOS are you on?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rydeng avatar Oct 16 '24 12:10 rydeng

@rydeng and what version of multipass do you have? are you using the RC1 from here https://github.com/canonical/multipass/releases/tag/v1.14.1-rc1?

andrei-toterman avatar Oct 16 '24 12:10 andrei-toterman

Yes, I am using rc1

---- Replied Message ---- | From | Andrei @.> | | Date | 10/16/2024 20:56 | | To | canonical/multipass @.> | | Cc | rydeng @.>, Mention @.> | | Subject | Re: [canonical/multipass] Multipass launch command line will crash MacOS (Issue #3719) |

@rydeng and what version of multipass do you have? are you using the RC1 from here https://github.com/canonical/multipass/releases/tag/v1.14.1-rc1?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rydeng avatar Oct 16 '24 13:10 rydeng

@andrei-toterman The /var/db/dhcpd_leases file wasn't generated, but if I start a new VM, it appears.

rydeng avatar Oct 17 '24 03:10 rydeng

@rydeng, can you please run the following command

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:ea:82:8f -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application\ Support/multipassd/qemu/vault/instances/ubuntu/ubuntu-22.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 6 -m 15360M -qmp stdio -chardev null,id=char0 -serial chardev:char0 -cdrom /var/root/Library/Application\ Support/multipassd/qemu/vault/instances/ubuntu/cloud-init-config.iso

That should bring up a window that should display the boot sequence of the VM, so we can see if it boots up properly.

andrei-toterman avatar Oct 18 '24 11:10 andrei-toterman

@andrei-toterman Sorry, I didn't notice your reply. After executing the command you gave, a window appeared and remained stuck as follows: image

rydeng avatar Oct 25 '24 02:10 rydeng

@rydeng, when that window comes up, there should be a menu entry to select VGA or Serial. What do you see when selecting that?

ricab avatar Oct 25 '24 07:10 ricab

@ricab There is no menu entry. Just like this issue, I got this: {"QMP": {"version": {"qemu": {"micro": 1, "minor": 2, "major": 8}, "package": ""}, "capabilities": ["oob"]}} 2024-10-25 15:46:32.189 qemu-system-aarch64[7765:6059210] +[IMKClient subclass]: chose IMKClient_Legacy 2024-10-25 15:46:32.189 qemu-system-aarch64[7765:6059210] +[IMKInputSession subclass]: chose IMKInputSession_Legacy

rydeng avatar Oct 25 '24 08:10 rydeng

Hi @rydeng, that's the output on the command line, right? The idea is rather that you look at the output inside the QEMU window that comes up, after selecting either VGA or console in the menu.

ricab avatar Oct 25 '24 13:10 ricab

there is no menu entry.😂

---- Replied Message ---- | From | Ricardo @.> | | Date | 10/25/2024 21:06 | | To | canonical/multipass @.> | | Cc | rydeng @.>, Mention @.> | | Subject | Re: [canonical/multipass] Multipass launch command line will crash MacOS (Issue #3719) |

Hi @rydeng, that's the output on the command line, right? The idea is rather that you look at the output inside the QEMU window that comes up, after selecting either VGA or console in the menu.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rydeng avatar Oct 25 '24 13:10 rydeng

Sorry @rydeng, the command should be actually:

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:ea:82:8f -device virtio-scsi-pci,id=scsi0 -drive file=/var/root/Library/Application\ Support/multipassd/qemu/vault/instances/ubuntu/ubuntu-22.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda -device scsi-hd,drive=hda,bus=scsi0.0 -smp 6 -m 15360M -qmp stdio -cdrom /var/root/Library/Application\ Support/multipassd/qemu/vault/instances/ubuntu/cloud-init-config.iso

ricab avatar Oct 28 '24 15:10 ricab

@ricab Thanks, now I got this: image image image

rydeng avatar Oct 29 '24 09:10 rydeng

@rydeng it looks like your image got corrupted for some reason. Did you perhaps have a snapshot you could restore?

ricab avatar Oct 29 '24 15:10 ricab

@ricab Okay, thank you. Maybe the system upgrade caused some problems. I have launched a new Ubuntu image on a compatible version of macOS 15.0.1, which has been migrated and is now in use.

rydeng avatar Oct 30 '24 03:10 rydeng