i'm trying to install the Centos 6.6 amd64 ISO image with bhyve. i'm following the documentation at https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html % sudo kldload vmm % cat centos-device.map (hd0) ./centos.img (cd0) ./centos.iso % truncate -s 16G centos.img % sudo grub-bhyve -r cd0 -m centos-device.map -M 2048 centos .. grub> linux (cd0)/isolinux/vmlinuz grub> initrd (cd0)/isolinux/initrd.img grub> boot note: here grub returns immediately (should i see the installer instead?) % sudo bhyve -AI -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./centos.img \ -s 4:0,ahci-cd,./centos.iso -l com1,stdio -c 4 -m 1024M centos here the linux kernel boots up until it stops at the line "waiting for hardware to initialize..." and then it returns to the shell with a core dump: pid 1198 (bhyve), uid 0: exited on signal 11 (core dumped)
it's similar on centos7: [ OK ] Started dracut pre-udev hook. Starting udev Kernel Device Manager... [ 6.884033] systemd-udevd[443]: starting version 208 [ OK ] Started udev Kernel Device Manager. Starting dracut pre-trigger hook... [ 6.929766] ACPI: bus type ATA registered [ 6.937119] ahci: SSS flag set, parallel bus scan disabled [ 6.938704] ahci 0000:00: and then bhyve dumps core
At leat in the first example, the amount of memory supplied to grub-bhyve (2G) is greater than that given to bhyve (1G). Since grub creates the memory map that is passed to the kernel, this will result in the guest kernel attempting to access memory that doesn't exist, which results in bhyve dumping core. The fix is to make sure the same amount of memory is given to both the loader and bhyve.