Bug 254813 - FreeBSD 12.2 bhyve host don't boot guest FreeBSD any version on BSD partition
Summary: FreeBSD 12.2 bhyve host don't boot guest FreeBSD any version on BSD partition
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-virtualization (Nobody)
Depends on:
Reported: 2021-04-06 11:37 UTC by DYM
Modified: 2021-04-07 03:51 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description DYM 2021-04-06 11:37:17 UTC
# uname -a
FreeBSD test 12.2-RELEASE-p5 FreeBSD 12.2-RELEASE-p5 r369528 HOST  amd64

FreeBSD guest no boot on 12.2, but the same guests boot normal on 12.1.
After updating from 12.1 to 12.2 (or clean 12.2 install) FreeBSD guests (11.3, 11.4, 12.1, 12.2) fail to boot.
I use for comfort vm-bhyve.

Install fresh 12.1, install vm-bhyve, install guest FreeBSD (11.4, 12.1, 12.2, 13.0 -- no difference).
Upgrade 12.1 to 12.2, install into bhyve new FreeBSD guest (or use of previous installing guest).
# cat testguest.conf

# vm start guest
Starting FreeBSD12.2
  * found guest in /mnt/VMs/testguest
  * booting...

# vm console testguest
Root mount waiting for: CAM
ahcich0: SATA connect time=0us status=00000133
ahcich0: AHCI reset: device found
ahcich0: AHCI reset: device ready after 0ms
pass0 at ahcich0 bus 0 scbus0 target 0 lun 0
pass0: <BHYVE SATA DISK 001> ACS-2 ATA SATA 3.x device
pass0: Serial Number BHYVE-D4AB-EEFF-B53A
pass0: 600.000MB/s transfers (SATA 3.x, WDMA2, PIO 8192bytes)
pass0: Command Queueing enabled
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <BHYVE SATA DISK 001> ACS-2 ATA SATA 3.x device
ada0: Serial Number BHYVE-D4AB-EEFF-B53A
ada0: 600.000MB/s transfers (SATA 3.x, WDMA2, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 30720MB (6914560 512 byte sectors)
GEOM: new disk ada0

Loader variables:

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

<---------------------------------------------------------- I pressed ENTER
panic: mountroot: unable to (re-)mount root.
KDB: stack backtrace:
#0 0xffffffff80c0a8f5 at kdb_backtrace+0x65
#1 0xffffffff80bbeb1b at vpanic+0x17b
#2 0xffffffff80bbe993 at panic+0x43
#3 0xffffffff80c88a95 at vfs_mountrootc+0x19a5
#4 0xffffffff80b57db7 at start_init+0x27
#5 0xffffffff80b8044e at fork_exit+0x7e
#6 0xffffffff81067f6e at fork_trampoline+0xe
Uptime: 2s

If I write any of next string after "mountroot>"
instead of simple press ENTER -- boot normal:
Trying to mount root from ufs:ada0 []...
Setting hostuuid: 43693d91-95c3-11eb-a6ca-000000211010.
Setting hostid: 0xc8a69a1e.
Starting file system checks:
/dev/ada0: clean, 6512400 free (1152 frags, 813906 blocks, 0.0% fragmentation)
Mounting local filesystems:.
Comment 1 DYM 2021-04-06 11:55:41 UTC
Possibly, maybe it's the same:
Comment 2 DYM 2021-04-07 02:18:21 UTC
Reason for change component from "bhyve" to "kern":
bootloader has forgotten how to boot from BSD-labels (without MBR or GPT) on guest.

It is reproduced if guest system install on the BSD-label (with all previous conditions).

Similar problem has already been: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240364
However, a simple file replacement (on host or on guest) does not solve the problem.