Running GUILinuxVirtualMachineSampleApp Throws error: Guest did stop virtual machine.

I am following example on Apple docs: GUILinuxVirtualMachineSampleApp I am able to create GUI VM first time but from second time onwards it throws error Guest did stop virtual machine.

2023-10-01 20:45:08.991551+0530 GUILinuxVirtualMachineSampleApp[6417:1426889] [client] No error handler for XPC error: Connection invalid

Thought some permission error, app cannot access the VM bundle, tried giving all perms, but didn't help, also the error is not specific as to why did guest stop the VM. Please let me know what might be the cause and how to move forward.

Deleting VM bundle and restarting works but that's not the solution I am looking forward too.

Replies

This may happen when the Linux installation failed after setting up the disk and boot loader. At the next boot, the disk is used rather than the install media, but Linux stops because the installation is invalid.

Resetting the EFI Storage and the main disk would return the VM in a blank state.

Thanks for the help Benjamin, I realised mistake was from my side, on second boot when the linux tries to boot from disk.img, I haven't installed linux on it, hence it failed. So on first boot, created partitions in disk.img , and installed linux on it and then on subsequent runs on App , it works like charm. Dropping my medium article for reference of those who want to try the app.

https://medium.com/@yada4828/install-linux-on-macos-m1-using-apple-virtualization-framework-7b09958f386b

  • Thanks for closing the loop here.

Add a Comment