Running Linux with GUI under Virtualization framework unexpectedly stuck after several minutes

My device is MacBook Pro 13-inch, M1, 2020

Use source code provided by article https://developer.apple.com/documentation/virtualization/running_gui_linux_in_a_virtual_machine_on_a_mac

When installing Debian, Fedora or Ubuntu, installation process can stuck at any point and cause the installation failed. Even if it is lucky enough to pass the installation phase, stuck could still happen at any time when the virtual machine is started.

It seems that there is some low level error that cause the Linux kernel panic, while during this process error seems to be accumulated--it starts with some user level application in Linux starts to behave weirdly, such as sudo does not authenticate a valid user, apt can not run properly, then Linux kernel panic. Sometimes it behaves like the VM get stuck where it is not sure what happened inside it.

I can't provide more detail as it happens randomly and the phenomenon differs each time. While generally it appears to be an accumulated error and eventually the VM get stuck.

Replies

Thanks for reporting this error.

One thing that comes to mind is the disk might be full on the host system. When that happens, the guest would see I/O errors for legitimate block operations. The Linux kernel handles that smoothly but user-space apps may not expect such failures.

Could you share the panic logs from the Linux kernel?

  • I'm still trying to do that as for sometimes the VM just get stuck where I can't see any message.

    I'm currently testing different configurations and my conclusion is:

    VM could get stuck with only networkDevices, storageDevices and serialPorts added, and other devices have no influence on it.It seems only affect VZEFIBootLoader, VZLinuxBootLoader seems not affected.There are plenty of space on the host, and stuck could still happen if I pre-allocate all disk space using dd.
  • I have put the screenshot on the reply.

Add a Comment

The screenshot is above