vm-bhyve icon indicating copy to clipboard operation
vm-bhyve copied to clipboard

Fix UEFI VM options

Open dag-erling opened this issue 1 year ago • 3 comments

Currently, vm::run initializes _opts to -AHP, then, in the UEFI case calls vm::uefi which, instead of appending to _opts, sets it to -Hwl bootrom,.... This means UEFI VMs are started without -A, which was never a good idea but which causes them to fail to boot with recent versions of edk2-bhyve (see https://bugs.freebsd.org/273560).

The main purpose of this PR is to change vm::uefi to append to _opts so -A is not lost and UEFI VMs boot correctly.

In addition, it moves the -w option from UEFI-only to default, and deduplicates the -H option.

dag-erling avatar Sep 08 '23 10:09 dag-erling

This PR is essential to make Linux VMs work in FreeBSD 13.2-RELEASE-p3 with edk2-bhyve-g202308. Without this, my Linux VMs would fail to finish booting entirely.

stratacast avatar Sep 12 '23 06:09 stratacast

fwiw, I've applied this patch manually and my linux VM still refuses to start. The configuration is:

loader="uefi"
graphics="no"
xhci_mouse="no"
cpu=1
memory="512M"

(edited out disk and networking)

when trying to start it I get:

vm exit[0]
        reason          SVM
        rip             0x000000001fb54b60
        inst_length     2
        exitcode        0x7b
        exitinfo1       0x511021d
        exitinfo2       0x1fb54b62        

hjf avatar Sep 17 '23 13:09 hjf

Probably the same problem here (1.5.0/uefi/13.2-RELEASE-p8). It worked until recent update to 13.2-RELEASE-p8. Now machine starts for a moment then exits with error 4 or 134. debug="yes" does not give anything more in the log.

cederom avatar Jan 13 '24 02:01 cederom