bhyve Modify UEFI boot order from outside VM?

Is there any way to change the boot order of a bhyve VM using the UEFI firmware before the VM is started?

In a scenario where I have a guest OS already installed but want to reinstall it using a PXE booted network install, it seems that I first need to boot into the guest OS and use its own tools to modify the UEFI boot order on next boot. It would be useful to have control over the UEFI boot order without having to rely on the guest OS.

Usually on UEFI systems, you're able to hit a hotkey while a machine is doing POST to get into a UEFI setup screen from which you can change the boot order or do a one-off boot from a specific device. If the UEFI firmware image provided for bhyve offers the same thing, it seems impossible to get a VNC connection established quickly enough to invoke it before booting proceeds.
 
I don't know what the software you're using to manage the bhyve VMs, if you're using one. Anyway, you can specify that the VM must wait for a VNC connection before to run. With just pure bhyve, for example, you can use this as a parameter in the bhyve command line: -s 30,fbuf,tcp=0.0.0.0:5900,wait

Then, once you connect with a VNC client, strike F2. That should do the trick.
 
Back
Top