One of the important settings to consider when creating a new Virtual Machine in vSphere is the VM firmware, which can either be BIOS or EFI and can be configured under VM Options->Boot Options->Firmware. After selecting the desired guest operating system (GOS) in vSphere, the system will default to a recommended firmware type and can also be overridden by the user. Ultimately, the selection of the VM firmware should be determined by what your GOS supports.
If you ever need to change the VM firmware, you typically will need to re-install the GOS because it does not understand the new firmware change (just like in a physical server) and more than likely the GOS will also not boot due to this change and this is the existing behavior from GOS point of view.
For a net new VM creation, prior to vSphere 8, if you had configured a VM using EFI firmware and you have not installed a GOS and realized that you had made a mistake and needed to change the VM firmware to BIOS, you could easily do so using the vSphere UI or API and then install your OS. In vSphere 8 and specifically when using the latest Virtual Machine Compatibility (vHW20), you can not just switch the VM firmware after the initial VM creation, especially if you had started with EFI firmware and wish to change it to BIOS.
In doing so, you will come across the following error message:
ACPI motherboard layout requires EFI. Failed to start the virtual machine. Module DevicePowerOnEarly power on failed.
To support the new Virtual NUMA Topology in vSphere 8, a new VM motherboard layout has been introduced for VMs using the new Virtual Machine Compatibility 8.0 (vHW20) configured with EFI firmware. This new motherboard layout setting is available as a new vSphere API property called motherboardLayout and defaults to the existing i440bxHostBridge value for VMs configured with BIOS firmware and acpiHostBridges for VMs configured with EFI firmware.
The important consideration when creating a new Virtual Machine Compatibility 8.0 (vHW20) VM is that the motherboard layout is only set once during the initial VM creation. This means that if you had selected EFI as the firmware and then decided to change it to BIOS for whatever reason, the motherboard layout setting will still be configured for the original firmware setting. The reason for this behavior is that a VM can not be converted from using the new motherboard layout to the old or vice versa, especially for the device slots on the new motherboard that will not exist in the old motherboard and the only proper way to switch is to re-create the VM with the desired VM firmware.
Going back to the error message shown earlier, we can see why the message is being displayed because the motherboard layout is still configured as acpiHostBridges from the original VM firmware configure with EFI, but current VM firmware has been switched to BIOS and this is not supported using the new motherboard layout.
So, how do we go about remediating this issue? As mentioned earlier, if this is a brand new VM that you have not installed a GOS, then you simply just need to re-create the VM with the desired VM firmware and the issue goes away.
If you really do not wish to re-create the VM, you do have a couple of options.
Option 1 - Using the vSphere API, you can update the motherboard layout to go back to the default i440bxHostBridge, assuming you are using the BIOS firmware. The following PowerCLI snippet can be applied to the desired VM and it will automatically update the motherboard layout property based on the configured VM firmware.
$vm = Get-VM "Foo" if($vm.ExtensionData.Config.Firmware -eq "efi") { $motherboardLayout = "acpiHostBridges" } else { $motherboardLayout = "i440bxHostBridge" } $spec = New-Object VMware.Vim.VirtualMachineConfigSpec $spec.motherboardLayout = $motherboardLayout $task = $vm.ExtensionData.ReconfigVM_Task($spec) $task1 = Get-Task -Id ("Task-$($task.value)") $task1 | Wait-Task | Out-Null
Option 2 - If you do not want to use vSphere API or if you are using the Free ESXi License, which does not give you write access to the vSphere API, then you will need to update the VMX file manually (which we typically do not recommend) but is your option if you do not have API access.
Step 1 - SSH to ESXi host and change into the datastore where the VM is stored
Step 2 - Ensure the VM is powered off and edit the VMX file and search for the string chipset.motherboardLayout which should have the value "acpi". Update the value to "i440bx"
Step 3 - For the changes to go into effect, we need to reload the VM and to do so, we need to identify the VM ID (also known as the VM Managed Object Reference ID or MoRef for short) by running the following command then specifying the ID in the following command:
vim-cmd vmsvc/getallvms | grep Foo
vim-cmd vmsvc/reload XXX
If you have existing VMs that have GOS installed and you wish to change the firmware from BIOS to EFI, you should consider re-creating the VM with EFI firmware so you get the full capabilities, especially if you plan to take advantage of the new vNUMA Topology features. If you do not intend to use any of the new vNUMA features, then you can update the firmware and simply reinstall the GOS and the motherboard layout will continue to use the default i440bx.
Thanks for the comment!