# Bhyve hypervisor mode: Legacy or UEFI



## Phishfry (Jan 18, 2019)

I am building out a SuperMicro X10DRL as my virtualization learning computer.
I can install FreeBSD in either Legacy mode or UEFI mode through BIOS settings.
What is the best setting for maximum compatibility for my various Bhyve VM's I have planned?
For instance I want to run some VM in UEFI mode and some in legacy.(This is possible right?)
Which BIOS setting am I better off using for this mixed usage, LEGACY or UEFI?


----------



## Phishfry (Jan 18, 2019)

I am aware of the sysutils/bhyve-firmware that must be installed for UEFI to work with Bhyve.
https://wiki.freebsd.org/bhyve/UEFI
So motherboard LEGACY BIOS mode can run LEGACY and UEFI installed VM's/OS's correct?
My question is can UEFI mode on motherboard be enabled to run both Bhyve LEGACY VM's and UEFI VM's?


----------



## Phishfry (Jan 18, 2019)

Does this port offer Bhyve UEFI VM on LEGACY BIOS ?
sysutils/uefi-edk2-bhyve-csm
UEFI-EDK2 firmware for bhyve with CSM


----------



## aragats (Jan 18, 2019)

I believe your motherboard settings (and FreeBSD setup mode) have nothing to do with _bhyve_ VMs.
If you want to install MS Windows in _bhyve_, UEFI is the only option.
A Linux VM can be run with sysutils/grub2-bhyve, which is legacy BIOS (kind of) emulation.


----------



## Phishfry (Jan 18, 2019)

aragats said:


> If you want to install MS Windows in _bhyve_, UEFI is the only option.


UEFI as in the Bhyve UEFI firmware, not the BIOS setting correct?

For an example old pfSense did not support UEFI and only ran in LEGACY mode.
New pfSense (>version 2.5) only runs in UEFI mode.


----------



## Emrion (Jan 18, 2019)

Phishfry said:


> UEFI as in the Bhyve UEFI firmware, not the BIOS setting correct?


Yes. As agarat stated, the starting mode of your real machine has nothing to do with the modes you choose for the VMs installed on it. Those modes just matter for booting time.

Old versions of OSes just support BIOS legacy mode, newer versions often support only UEFI. FreeBSD is one of the rare OS wich can be started in either mode, given that you installed it on an UEFI machine and you select default options for this matter.


----------

