Fixing "EFI stub: Exiting boot services and installing virtual address map..."
UTM is a virtualization framework for Apple M1 ARM processors. However, compared to more establish virtualization frameworks like VMWare and Virtualbox, UTM still has bugs to iron out and features to implement.
One of the issues with UTM currently is that it has no support for ACPI shutdown, meaning you have to shut down from within the guest OS. This can also be problematic if the guest OS has crashed, locked up, or disconnected from network. When this happens, the only thing you can do is to forcibly turn off or restart the VM which can cause disk corruption.
When disk corruption happens, you might get a
EFI stub: Exiting boot services and installing virtual address map... message
on the next startup and the bootloader will hang. If your guest VM is based on
Ubuntu, this can be solved by:
- Turning off the VM
- In the VM settings in the UTM management UI, under Display, switch the VM over to console-mode instead of full graphics.
- Restart the VM and wait for it to boot into load into a BareBox bootloader.
fsckon the ubuntu disk partition (probably
fsck /dev/mapper/ubuntu--vg-rootif installed under default settings)
exitBarebox. This should try to restart the VM and load into the Ubuntu VM. If the Ubuntu VM loads, then your disk issues are fixed.
- Turn off your VM again and switch back to full graphics in UTM.