Bug 290232 - vmrun.sh should not require firmware for FreeBSD virtual machines (amd64)
Summary: vmrun.sh should not require firmware for FreeBSD virtual machines (amd64)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: 15.0-CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-14 15:56 UTC by David Marker
Modified: 2025-10-20 13:59 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Marker 2025-10-14 15:56:33 UTC
First, this is in a script in `/usr/share/examples`. I don't know if these have any stability guarantees (my expectation is they don't).

Filing this so others that hit same issue can find easy workaround.

review D44933 [1] changed `vmrun.sh` so that you must have firmware. That was not the case before to boot FreeBSD virtual machines.

Here is the error you will see (for those googling):

Error: Firmware file /usr/local/share/uefi-firmware/BHYVE_UEFI.fd doesn't exist.
       Try: pkg install edk2-bhyve

The lines causing this are around 281-287 [2] and check for firmware. But that check is way before where you would have run without caring about firmware around lines 352-359 [3].

On amd64 you can just comment out the test for firmware to get around this.


[1] https://github.com/freebsd/freebsd-src/commit/aa34b1d
[2] https://github.com/freebsd/freebsd-src/blob/d1bd541b385d49d2ae3a8bad9df72779b606e208/share/examples/bhyve/vmrun.sh#L281-L287
[3] https://github.com/freebsd/freebsd-src/blob/d1bd541b385d49d2ae3a8bad9df72779b606e208/share/examples/bhyve/vmrun.sh#L352-L359
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2025-10-16 14:52:30 UTC
Thanks for the report.  This was indeed an oversight in the change you linked.
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-10-16 14:52:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f19f17b3af675fbbc1244b66bbd8fb4a9836cb02

commit f19f17b3af675fbbc1244b66bbd8fb4a9836cb02
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-10-16 14:48:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-10-16 14:50:33 +0000

    vmrun.sh: Don't require firmware on amd64 unless -E was specified

    PR:             290232
    Reported by:    David Marker <dave@freedave.net>
    Fixes:          aa34b1d20e44 ("vmrun.sh: Add arm64 support")
    MFC after:      3 days

 share/examples/bhyve/vmrun.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-10-19 13:56:23 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=6c5540eebcf25e3f81c3ec9bfa762390d2a86885

commit 6c5540eebcf25e3f81c3ec9bfa762390d2a86885
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-10-16 14:48:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-10-19 13:55:06 +0000

    vmrun.sh: Don't require firmware on amd64 unless -E was specified

    PR:             290232
    Reported by:    David Marker <dave@freedave.net>
    Fixes:          aa34b1d20e44 ("vmrun.sh: Add arm64 support")
    MFC after:      3 days

    (cherry picked from commit f19f17b3af675fbbc1244b66bbd8fb4a9836cb02)

 share/examples/bhyve/vmrun.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-10-19 23:51:55 UTC
A commit in branch releng/15.0 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=7cd9d3fe838c0ff77e4de9c1570856f261d96f18

commit 7cd9d3fe838c0ff77e4de9c1570856f261d96f18
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-10-16 14:48:39 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-19 23:50:44 +0000

    vmrun.sh: Don't require firmware on amd64 unless -E was specified

    Approved by:    re (cperciva)
    PR:             290232
    Reported by:    David Marker <dave@freedave.net>
    Fixes:          aa34b1d20e44 ("vmrun.sh: Add arm64 support")
    MFC after:      3 days

    (cherry picked from commit f19f17b3af675fbbc1244b66bbd8fb4a9836cb02)
    (cherry picked from commit 6c5540eebcf25e3f81c3ec9bfa762390d2a86885)

 share/examples/bhyve/vmrun.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2025-10-20 13:59:43 UTC
This will be fixed in 15.0, thanks for the report.