Solved FreeBSD-12.0-RELEASE-amd64 freeze boot from bhyve UEFI (BHYVE_UEFI.fd - UEFI GOP: screen goes blank)

Hello ))

Never have problem on this computer wtih bhyve.
HOST

FreeBSD-12.0-RELEASE-amd64

Host configuration.
Code:
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-RELEASE r341666 GENERIC amd64
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
VT(vga): resolution 640x480
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (3997.76-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x306c3  Family=0x6  Model=0x3c  Stepping=3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x21<LAHF,ABM>
  Structured Extended Features=0x2fbb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,NFPUSG>
  XSAVE Features=0x1<XSAVEOPT>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 8226934784 (7845 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads
random: unblocking device.


GUEST
Script use UEFI boot.

Code:
# cat bhyve_fbsd
#/bin/sh

bhyve -c 4 -s 7,fbuf,tcp=192.168.220.12:5910,wait \
-s 0,hostbridge \
-s 3,ahci-hd,fbsd.hdd \
-s 4,ahci-cd,FreeBSD-12.0-RELEASE-amd64-disc1.iso \
-s 10,virtio-net,tap0 \
-s 31,lpc -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd\
-m 4G -H -w fbsd


Start guest

Code:
# ./bhyve_fbsd
fbuf frame buffer base: 0x941e00000 [sz 16777216]
Unhandled ps2 mouse command 0xe1 <------------------------ this string write on console after end of timer boot

Connect VNC 192.168.220.12:5910...
I see information from screenshot and some seconds timer ends, black screen and boot freeze... wait... wait... wait... and no more boot...

With FreeBSD 11.2 Release no have this problem and system boot with UEFI and work fine.

Why, tell please ?
 

Attachments

  • boot_fbsd12.JPG
    boot_fbsd12.JPG
    52.3 KB · Views: 315
Hi )

If i set

-c 1

boot ok

but if i set

-c 2

or

-c 4 - sometimes boot ok

or

-c 6


Connect VNC and boot stop after strings


~~~~~~~~~~~~~~~~~~
SMP: AP CPU #1 Launched!
SMP: AP CPU #2 Launched!



Why this, tell me, please ?
 
bhyve is very picky about the configuration you start it with. I have had tons of troubles until I figured out a configuration that works for me.
This is how I start my VM and it works 100%:
Code:
bhyve -c 16 -m 24G -w -H \
        -s 0,hostbridge \
         \
        -s 3,ahci-hd,/dev/zvol/zroot/iohyve/myVM/disk0 \
        -s 5,virtio-net,tap0 \
         \
        -s 30,xhci,tablet \
        -s 31,lpc -l com1,stdio \
        -l bootrom,/iohyve/Firmware/BHYVE_UEFI.fd/BHYVE_UEFI.fd \
        myVM
 
And this is how I do it with a VNC connection:
Code:
bhyve -c 16 -m 24G -w -H \                                                                                                                                                                                                                                                                                                                 :(
        -s 0,hostbridge \
         \
        -s 3,ahci-hd,/dev/zvol/zroot/iohyve/myVM/disk0 \
        -s 5,virtio-net,tap0 \
        -s 29,fbuf,tcp=127.0.0.1:6900,w=800,h=600,wait \
        -s 30,xhci,tablet \
        -s 31,lpc -l com1,stdio \
        -l bootrom,/iohyve/Firmware/BHYVE_UEFI.fd/BHYVE_UEFI.fd \
        myVM
 
Try install FreeBSD 11.3 Release

use vm-bhyve

Code:
loader="uefi"
cpu=4
memory=4G
network0_type="virtio-net"
network0_device="tap0"
disk0_type="ahci-hd"
disk0_name="fbsd.hdd"
graphics="yes"
graphics_listen="192.168.170.100"
graphics_port="5901"
graphics_res="1280x720"
graphics_wait="yes"
utctime="no"
uuid="fe3ba0ed-asa4-99e9-v6a5-e4b97a2e1519"
network0_mac="22:1e:cv:77:9c:df"

Start install from ISO FreeBSD 11.3. Release
# vm install FBSD-VM /vmbhyve/FreeBSD-11.3-RELEASE-amd64-disc1.iso

After timer boot I see black screen and no usually dialog screen for install FreeBSD...
But on HOST start top utility, I see - VM work, i can stop VM and start VM again.

What I do, for setup.

Temporarily changing,
Code:
~~~
loader="bhyveload"
~~~

Start install from ISO FreeBSD 11.3. Release
# vm install FBSD-VM /vmbhyve/FreeBSD-11.3-RELEASE-amd64-disc1.iso

Connect to VM
# vm console FBSD-VM
Connected

Open text mode, not good view, but ok )))))

When install, use ZFS and select boot mode - UEFI
I install FreeBSD 11.3 Release in the text mode, all fine.
Finish install and VM poweroff.

Change on UEFI
Code:
~~~
loader="uefi"
~~~

and start VM, FreeBSD 11.3 boot fine.

My question.
Why I can't load install process FreeBSD 11.3 Release use UEFI mode, when load installation from iso ?
What change in bhyve ?

FreeBSD 11.2 doesn't have this problem and start setup in UEFI mode fine, this only 11.3 and 12 versions.
 
Last edited by a moderator:
Back
Top