VMware Communities
am333
Contributor
Contributor

"[msg.efi.exception] The firmware encountered an unexpected exception. The virtual machine cannot boot." on UEFI images.

Hello,

I've been trying to figure out an issue we've been seeing when trying to convert a machine into a VM. I think I've discovered the answer, I thought I'd post here to see if this is an actual issue or a PEBKAC issue.

The issue seems to be related to the size of UEFI images (bootx64.efi) that only causes issues in VMWare products both ESXi  6.7.0 (build: 8169922) & Workstation 14.1.2 (build: 8497320).

The OS (custom additions to Gentoo) has EFI_STUB enabled and the initramfs built into the kernel image.

What seems to be happening is, when you get a bootx64.efi image over about 93MB+ in size. If you add 2+ Network adaptors to the VM you will receive the message similar to the following:

2018-08-16T14:05:47.721+01:00| vcpu-0| I125: Guest: About to do EFI boot: EFI Internal Shell (Unsupported option)               (Note: This also happens when booting from HDD ESP partition or DVD)

2018-08-16T14:06:06.145+01:00| vcpu-0| I125: [msg.efi.exception] The firmware encountered an unexpected exception. The virtual machine cannot boot.

Oddly, if you don't have network adaptors added to the VM, the same image boots fine.

Taking the same EFI (93MB+) image onto VirtualBox the image starts up as expected and seems happy enough.

if you do the same build, but without the initramfs included and pass it as a kernel boot option the OS starts fine.

This happens with just downloading the master linux branch from Kernel.org building it with EFI_STUB and including a 93MB+ initramfs file (General Setup->Initramfs Source files(s)).

The size of the image looks (to my very untrained eye) to be trampling over something important in VMWare's UEFI bootloader firmware.

Is this an issue, or is there something documented somewhere that says your bootx64.efi image should only be (X)MB in size?

As mentioned above this is happening on:

ESXi  6.7.0 (build: 8169922)

Workstation 14.1.2 (build: 8497320)

bootx64.efi Linux image that is larger than about 94MB (this has initramfs included)

Issue seems to appear when adding 2+ network adaptors.

Debugging this issue, I put some efi_printk's into HEAD.S64 & eboot.c  these only appear when the bootx64.efi images was less than 93MB in size else we didn't seem to actually start booting the kernel.

Cheers for any help & guidance on the issue. 

0 Kudos
0 Replies