bhyve Bhyve on ZFS , cannot install vm linux cause general error 4

Hi I'm newbie in Freebsd, but for me It's not simple to realize an installation of vm in bhyve, I have seen handbook cap 24.6 for bhyve but is not too much clear and also the man but another time It's not the best and then ,
I followed the Jim Salter Guide for installation of VM with Bhyve:
https://klarasystems.com/articles/from-0-to-bhyve-on-freebsd-13-1/
but I have only error 4 but It is useless because is a general error and then sorry but I need your help.

-THE GOAL IS a vm linux INSTALLATION ON BHYVE ZFS DATASET(because it is better for management)

my system is:
- Freebsd 13.2 with ZFS
hardware:
- lenovo laptop
- cpu: Intel(R) Core(TM) i7-4710MQ
- ram 16 Gb
- ssd samsung 860 evo

Now I' m explaining what I have done:

1- I did Bhyve's INSTALLATION:
$ sudo pkg install grub2-bhyve vm-bhyve bhyve-firmware tigervnc-viewer

2- Dataset creation and configuration:
Code:
$ sudo zfs create pz00/Virtus
$ sudo zfs set recordsize=64K pz00/Virtus
$ sudo zfs create pz00/Virtus/.templates

3- enable Virtualization CONF in /etc/rc.conf:

vm_enable=”YES”
vm_dir=”zfs:pz00/Virtus


4- enable Virtualization in /boot/loader.conf:
vmm_load=”YES”

5- NET – creating switch and tap interface
Code:
$ sudo vm init
$ sudo vm switch create public
$ sudo vm switch add public wlan0

6- reboot:
shutdown -r now

7- DOWNLOAD ISO OS for VM and copy to dataset path /pz00/Virtus:
https://alpinelinux.org/…./alpine-extended-3.17.6-x86_64.iso

8- VM TEMPLATE – conf for new Vm creation:
$ sudo ee /pz00/Virtus/.templates/linux.conf

Code:
# Template from klarasystems, Jim Salter, "From 0 to Bhyve on FreeBSD 13.1"
# Edited

### LOADER ###
# If you want to pull a graphical console, you'll need the UEFI loader,
# no matter what OS you're installing on the guest.
# loader="uefi"

loader="grub"
graphics="yes"
xhci_mouse="yes"

### vCPU ###
# If not specified, cpu=n will give the guest n discrete CPU sockets.
# This is generally OK for Linux or BSD guests, but Windows throws a fit
# due to licensing issues, so we specify CPU topology manually here.
cpu=1
cpu_sockets=1
cpu_cores=2

### MEMORY ###
# Remember, a guest doesn’t need extra RAM for filesystem caching--
# the host handles that for it. 4G is ludicrously low for Windows on hardware,
# but it’s generally more than sufficient for a guest.
memory=2G

# put up to 8 disks on a single ahci controller. This avoids the creation of
# a new “controller” on a new “PCIe slot” for each drive added to the guest.
ahci_device_limit="8"

### NETWORK ###
# e1000 works out-of-the-box, but virtio-net performs better. Virtio support
# is built in on FreeBSD and Linux guests, but Windows guests will need
# to have virtio drivers manually installed.
# network0_type="e1000"

network0_type="virtio-net"
network0_switch="public"

### DISK ###
# bhyve/nvme storage is considerably faster than bhyve/virtio-blk
# storage in my testing, on Windows, Linux, and FreeBSD guests alike.

disk0_type="nvme"
disk0_name="disk0.img"

# This gives the guest a virtual "optical" drive. Specifying disk1_dev=”custom”
# allows us to provide a full path to the ISO.

disk1_type="ahci-cd"
disk1_dev="custom"
disk1_name="/pz00/Virtus/alpine-extended-3.17.6-x86_64.iso"

# windows expects the host to expose localtime by default, not UTC
utctime="no"

#### GRUB - this is an addiction ###
grub_install0="linux /boot/vmlinuz-lts initrd=/boot/initramfs-lts alpine_dev=cdrom:iso9660 modules=loop,squashfs,s
grub_install1="initrd /boot/initramfs-lts"
grub_run0="linux /boot/vmlinuz-lts root=rpool/ROOT/alpine rootfstype=zfs modules=ext4,zfs"
grub_run1="initrd /boot/initramfs-lts"


9- VM CREATE DISK E VM with TEMPLATE:
$ sudo vm create -t linux -s 20G alp_3_17

10- INSTALL from ISO OS:
$ sudo vm install alp_3_17 /pz00/Virtus/alpine-extended-3.17.6-x86_64.iso

11- Bhyve ERROR log useless from vm-bhyve.log:
Code:
Dec 19 20:41:18: initialising
Dec 19 20:41:18:  [loader: grub]
Dec 19 20:41:18:  [cpu: 1,sockets=1,cores=2]
Dec 19 20:41:18:  [memory: 2G]
Dec 19 20:41:18:  [hostbridge: standard]
Dec 19 20:41:18:  [com ports: com1]
Dec 19 20:41:18:  [uuid: e1043edc-9dee-11ee-a8b8-507b9d021c27]
Dec 19 20:41:18:  [debug mode: no]
Dec 19 20:41:18:  [primary disk: disk0.img]
Dec 19 20:41:18:  [primary disk dev: file]
Dec 19 20:41:18: initialising network device tap0
Dec 19 20:41:18: adding tap0 -> vm-public (public addm)
Dec 19 20:41:18: bring up tap0 -> vm-public (public addm)
Dec 19 20:41:18: booting
Dec 19 20:41:18: create file /pz00/Virtus/alp_3_17/device.map
Dec 19 20:41:18:  -> (cd0) /pz00/Virtus/alpine-extended-3.17.6-x86_64.iso
Dec 19 20:41:18:  -> (hd0) /pz00/Virtus/alp_3_17/disk0.img
Dec 19 20:41:18:  -> (hd1) /pz00/Virtus/alpine-extended-3.17.6-x86_64.iso
Dec 19 20:41:18: create file /pz00/Virtus/alp_3_17/grub.cfg
Dec 19 20:41:18:  -> timeout=3
Dec 19 20:41:18:  -> menuentry 'alp_3_17 (bhyve install)' {
Dec 19 20:41:18:  ->     root=cd0
Dec 19 20:41:18:  ->     linux /boot/vmlinuz-lts initrd=/boot/initramfs-lts alpine_dev=cdrom:iso9660 modules=loop,squashfs,sd-mod,usb-storage,sr-mod
Dec 19 20:41:18:  ->     initrd /boot/initramfs-lts
Dec 19 20:41:18:  -> }
Dec 19 20:41:18: /usr/local/sbin/grub-bhyve -c /dev/nmdm-alp_3_17.1A -m /pz00/Virtus/alp_3_17/device.map -M 2G -r host -d /pz00/Virtus/alp_3_17 alp_3_17
Dec 19 20:41:21:  [bhyve options: -c 1,sockets=1,cores=2 -m 2G -AHP -U e1043edc-9dee-11ee-a8b8-507b9d021c27]
Dec 19 20:41:21:  [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,nvme,/pz00/Virtus/alp_3_17/disk0.img -s 4:1,ahci,cd:/pz00/Virtus/alpine-extended-3.17.6-x86_64.iso -s 5:0,virtio-net,tap0,mac=58:9c:fc:06:08:dc -s 6:0,xhci,tablet]
Dec 19 20:41:21:  [bhyve console: -l com1,/dev/nmdm-alp_3_17.1A]
Dec 19 20:41:21:  [bhyve iso device: -s 3:0,ahci-cd,/pz00/Virtus/alpine-extended-3.17.6-x86_64.iso,ro]
Dec 19 20:41:21: starting bhyve (run 1)
Dec 19 20:41:21: bhyve exited with status 4
Dec 19 20:41:21: destroying network device tap0
Dec 19 20:41:22: stopped

12- Dataset list:
Code:
$ sudo zfs mount
........
pz00/Virtus                    /pz00/Virtus
pz00/Virtus/.templates        /pz00/Virtus/.templates
pz00/Virtus/alp_3_17            /pz00/Virtus/alp_3_17

What can I do for "debugging" or what am I wrong???
Thank you in advance
 
Back
Top