Bug 195839 - [bhyve] linux kernel loads, but bhyve core dumps (signal 11)
Summary: [bhyve] linux kernel loads, but bhyve core dumps (signal 11)
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-10 00:14 UTC by david
Modified: 2015-08-24 20:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david 2014-12-10 00:14:17 UTC
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)
Comment 1 david 2014-12-10 00:54:19 UTC
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
Comment 2 Peter Grehan freebsd_committer freebsd_triage 2015-08-24 20:06:31 UTC
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.