canonical / multipass

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

Multipass launch command line will crash MacOS #3719

Open christianjli opened 1 month ago

christianjli commented 1 month ago

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

-multipass info : No instance found.

Thanks!

BenStreet365 commented 1 month ago

Getting the same on macOS 15

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

sharder996 commented 1 month ago

@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.

BenStreet365 commented 1 month ago

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

sharder996 commented 1 month ago

@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.

christianjli commented 1 month ago

@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.

sharder996 commented 1 month ago

@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.

vikingjunior12 commented 1 month ago

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.

BenStreet365 commented 1 month ago

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

sharder996 commented 1 month ago

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

rydeng commented 4 weeks ago

@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
andrei-toterman commented 4 weeks ago

@rydeng what version of macOS are you on?

rydeng commented 4 weeks ago

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: @.***>

andrei-toterman commented 4 weeks ago

@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?

rydeng commented 4 weeks ago

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 commented 4 weeks ago

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

andrei-toterman commented 3 weeks ago

@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.

rydeng commented 2 weeks ago

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

image
ricab commented 2 weeks ago

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

rydeng commented 2 weeks ago

@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

ricab commented 2 weeks ago

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.

rydeng commented 2 weeks ago

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: @.***>

ricab commented 2 weeks ago

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
rydeng commented 2 weeks ago

@ricab Thanks, now I got this:

image image image
ricab commented 2 weeks ago

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

rydeng commented 2 weeks ago

@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.