3.14. Alternative firmware (EFI)

Oracle VM VirtualBox

3.14. Alternative firmware (EFI)

Starting with release 3.1, VirtualBox includes experimental support for the Extensible Firmware Interface (EFI), which is a new industry standard intended to eventually replace the legacy BIOS as the primary interface for bootstrapping computers and certain system services later.

By default, VirtualBox uses the BIOS firmware for virtual machines. To use EFI for a given virtual machine, you can enable EFI in the machine's "Settings" dialog (see Section 3.5.1, “"Motherboard" tab”). Alternatively, use the VBoxManage command line interface like this:

VBoxManage modifyvm "VM name" --firmware efi

To switch back to using the BIOS, use:

VBoxManage modifyvm "VM name" --firmware bios

One notable user of EFI is Apple's Mac OS X, but more recent Linuxes and Windows (starting with Vista) offer special versions that can be booted using EFI as well.

Another possible use of EFI in VirtualBox is development and testing of EFI applications, without booting any OS.

Note that the VirtualBox EFI support is experimental and will be enhanced as EFI matures and becomes more widespread. Mac OS X, Linux and newer Windows guests are known to work fine. Windows 7 guests are unable to boot with the VirtualBox EFI implementation.

3.14.1. Video modes in EFI

EFI provides two distinct video interfaces: GOP (Graphics Output Protocol) and UGA (Universal Graphics Adapter). Modern operating systems (such as Mac OS X) generally use GOP, while some older ones still use UGA. VirtualBox provides a configuration option to control the graphics resolution for both interfaces, making the difference mostly irrelevant for users.

The default resolution is 1024x768. To select a graphics resolution for EFI, use the following VBoxManage command:

VBoxManage setextradata "VM name" VBoxInternal2/EfiGraphicsResolution HxV

Determine the horizontal resolution H and the vertical resolution V from the following list of default resolutions:

VGA

640x480, 32bpp, 4:3

SVGA

800x600, 32bpp, 4:3

XGA

1024x768, 32bpp, 4:3

XGA+

1152x864, 32bpp, 4:3

HD

1280x720, 32bpp, 16:9

WXGA

1280x800, 32bpp, 16:10

SXGA

1280x1024, 32bpp, 5:4

SXGA+

1400x1050, 32bpp, 4:3

WXGA+

1440x900, 32bpp, 16:10

HD+

1600x900, 32bpp, 16:9

UXGA

1600x1200, 32bpp, 4:3

WSXGA+

1680x1050, 32bpp, 16:10

Full HD

1920x1080, 32bpp, 16:9

WUXGA

1920x1200, 32bpp, 16:10

DCI 2K

2048x1080, 32bpp, 19:10

Full HD+

2160x1440, 32bpp, 3:2

Unnamed

2304x1440, 32bpp, 16:10

QHD

2560x1440, 32bpp, 16:9

WQXGA

2560x1600, 32bpp, 16:10

QWXGA+

2880x1800, 32bpp, 16:10

QHD+

3200x1800, 32bpp, 16:9

WQSXGA

3200x2048, 32bpp, 16:10

4K UHD

3840x2160, 32bpp, 16:9

WQUXGA

3840x2400, 32bpp, 16:10

DCI 4K

4096x2160, 32bpp, 19:10

HXGA

4096x3072, 32bpp, 4:3

UHD+

5120x2880, 32bpp, 16:9

WHXGA

5120x3200, 32bpp, 16:10

WHSXGA

6400x4096, 32bpp, 16:10

HUXGA

6400x4800, 32bpp, 4:3

8K UHD2

7680x4320, 32bpp, 16:9

If this list of default resolution does not cover your needs, see Section 9.8.1, “Custom VESA resolutions”. Note that the color depth value specified in a custom video mode must be specified (8, 16, 24 and 32 are accepted), but it is silently assumed to be 32 by EFI.

The EFI default video resolution settings can only be changed when the VM is powered off.

3.14.2. Specifying boot arguments

It is currently not possible to manipulate EFI variables from within a running guest (e.g., setting the "boot-args" variable by running the nvram tool in a Mac OS X guest will not work). As an alternative way, "VBoxInternal2/EfiBootArgs" extradata can be passed to a VM in order to set the "boot-args" variable. To change the "boot-args" EFI variable:

VBoxManage setextradata "VM name" VBoxInternal2/EfiBootArgs <value>