Re: vm-bhyve: abort trap before OpenBSD install

From: matti k <mattik_at_gwsit.com.au>
Date: Tue, 16 Aug 2022 03:39:40 UTC
On Sun, 14 Aug 2022 23:46:15 +0200
"Rollniak (Yan)" <freebsd@yanthiery.me> wrote:

> Hello,
> 
> I'm trying to fire up an OpenBSD VM with sysutils/vm-bhyve but 
> unfortunately it fail.
> I have a grub menu but if I press enter I get this result :
> 
> # vm install -f obsd-test install71.iso
> Starting obsd-test
>    * found guest in /zroot/bhyve/obsd-test
>    * booting...
> Abort trap
> 
> I run a FreeBSD 13.1, below is the template I used :
> 
> # cat openbsd71.conf
> debug="on"
> loader="grub"
> cpu=1
> memory=256M
> network0_type="virtio-net"
> network0_switch="public"
> disk0_type="virtio-blk"
> disk0_name="disk0.img"
> grub_install0="kopenbsd -h com0 /bsd.rd"
> grub_run0="kopenbsd -h com0 -r sd0a /bsd"
> bhyve_options="-w"
> 
> The root directory of install71.iso :
> 
> # ls -l ./*
> -r--r--r--  1 root  wheel      126 Apr 12 05:25 ./TRANS.TBL
> -rw-r--r--  3 21    wheel  2810843 Apr 12 03:51 ./bsd
> -rw-r--r--  3 21    wheel  2810843 Apr 12 03:51 ./bsd.rd
> 
> ./7.1:
> total 4
> -r--r--r--  1 root  wheel    43 Apr 12 05:25 TRANS.TBL
> drwxr-xr-x  2 root  21     4096 Apr 12 05:25 alpha
> 
> /var/log/messages :
> 
> Aug 14 21:29:47 bhyve-01 kernel: tap0: Ethernet address: 
> 58:9c:fc:10:ff:c7
> Aug 14 21:29:47 bhyve-01 kernel: tap0: promiscuous mode enabled
> Aug 14 21:29:49 bhyve-01 kernel: tap0: link state changed to UP
> Aug 14 21:29:49 bhyve-01 kernel: vm-public: link state changed to UP
> Aug 14 21:29:49 bhyve-01 kernel: pid 38521 (bhyve), jid 0, uid 0:
> exited on signal 6
> Aug 14 21:29:49 bhyve-01 kernel: tap0: link state changed to DOWN
> Aug 14 21:29:49 bhyve-01 kernel: vm-public: link state changed to DOWN
> 
> If I read correctly signal(3), the signal 6 means "SIGABRT: abort 
> program (formerly SIGIOT)", but that doesn't help me much.
> 
> Snippet of /boot/loader.conf :
> 
> vmm_load="YES"
> nmdm_load="YES"
> if_tap_load="YES"
> if_bridge_load="YES"
> bridgestp_load="YES"
> 
> Can someone have any idea about what went wrong with my setup ? :)
> 
> Have a nice day,
> 

Hi, not sure how far you have progressed but what works for me is below
so I hope it helps

# pkg info | grep bhyve
bhyve-firmware-1.0_1           Collection of Firmware for bhyve
edk2-bhyve-g202202_1           EDK2 Firmware for bhyve
grub2-bhyve-0.40_8             Grub-emu loader for bhyve
uefi-edk2-bhyve-csm-0.2_3,1    UEFI EDK2 firmware for bhyve with CSM
(16-bit BIOS) vm-bhyve-1.5.0                 Management system for
bhyve virtual machines

# cd /zroot/bhyve/

# cat .templates/openbsd.conf 
loader="uefi"
cpu=2
memory=4G
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
disk0_dev="sparse-zvol"
bhyve_options="-w

# vm create -t openbsd -s 35G openbsd71
# vm install -f openbsd71 .img/install71.img

probing: pc0 com0 com1 mem[640K 3049M 28K 16M 20K 3M 1024M]
disk: hd0 hd1*
>> OpenBSD/amd64 BOOTX64 3.57
boot> set tty com0
switching console to com0

>> OpenBSD/amd64 BOOTX64 3.57
boot>

...

Welcome to the OpenBSD/amd64 6.9 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?

Cheers,
Matti