bhyve Unable to setup memory (22) if more than 16G

I wrote this script that installed Debian on bhyve.

Code:
bhyve \
    -S \
    -AI -P \
    -H \
    -c 16 \
    -m 16G \
    -l com1,stdio \
    -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
    -s 0,hostbridge \
    -s 3,virtio-blk,/dev/zvol/test/debian \
    -s 4,virtio-rnd,/dev/random \
    -s 5,virtio-net,tap0 \
    -s 30,xhci,tablet \
    -s 31,lpc \
    debian

The virtual machine boots and works, but only if the number of cores is 16 and RAM 16G: -c 16 -m 16G. If I try to allocate more memory (e.g. 64G), the error "Unable to setup memory (22)" appears.

System:
FreeBSD 13.2
AMD EPYC 7763 64-core
RAM: 128Gb
Filesystem: ZFS with default settings.
 
It's really strange. I have a Xeon 5120 Gold (two sockets). RAM 192Gb. And I'm simultaneously running two Windows Server 2022 Datacenter , each with 16 cores and 32Gb RAM. Maybe this is a feature of Debian (I have not tried Debian VM with RAM > 16Gb).
My host - FreeBSD 14
 
Not sure it gives you much to go on:

 
Back
Top