cat ~cbsd/etc/vm-linux-RedHat-9-x86_64.conf <<EOF
vm_profile="RedHat-9-x86_64"
vm_os_type="linux"
long_description="RedHat Linux: 9.1"
fetch=1
# Official resources to fetch ISO's
iso_site="\
https://download.rockylinux.org/pub/rocky/9.1/isos/x86_64/ \
"
cbsd_iso_mirrors=
iso_img="RedHat-9.1-x86_64-dvd.iso"
register_iso_name="cbsd-iso-${iso_img}"
register_iso_as="iso-${vm_profile}"
default_jailname="redhat"
vm_package="small1"
imgsize="12g"
bhyve_rts_keeps_utc="1"
vm_vnc_port="0"
vm_efi="uefi"
xen_active=1
bhyve_active=1
qemu_active=1
clonos_active=0
sha256sum="0"
virtio_rnd="1"
EOF
cbsd bcreate jname=rhel1 vm_os_type=linux vm_os_profile=RedHat-9-x86_64 vm_ram=1g vm_cpus=1 imgsize=20g runasap=1
# cbsd blogin redhat
. Can you point me to the right direction?~cbsd/etc/defaults/blogin.conf
~cbsd/etc/blogin.conf
~cbsd/jails-system/<VMNAME>/etc/blogin.conf
ssh bxbz1@$ip4_addr
Thanks Ole. Good to meet you. Red Hat is now in the list.
Looking for detailed tutorial to set up jail, bhyve and a Linux distro like Red Hat using cbsd, for newbies like me. Found this one, https://www.bsdstore.ru/en/bhyve_cbsd_howto.html, but it is a very brief intro, and I'm already stuck in# cbsd blogin redhat
. Can you point me to the right direction?
This is not required if you are using CBSD because:
Installing Linux on bhyve requires you to move the efi boot files before the reboot of the install session. See the cyberciti.biz link. Done it a few times now, works like a charm
What version of FreeBSD are you using? If 13.2 or 14, then this is definitely a bug with UEFI VARS (in CBSD args). If lower, then this is a bug with the profile ;-) By default CBSD uses bhyve firmware but for FreeBSD<=13.1 profiles uses reFINDI had problems with Debian, installing without this made it unbootable.
Thanks Ole for this detailed information."Contrib" CBSD profiles are located in the `~cbsd/etc/defaults/` directory ( vm-XXXX-YYY.conf files).
For user's profiles please use `~cbsd/etc/` directory.
% more vm-linux-fnOS-0.9.26.conf
# don't remove this line:
vm_profile="fnOS-0.9.26"
vm_os_type="linux"
# this is one-string additional info strings in dialogue menu
long_description="fnOS NAS: 0.9.26"
# custom settings:
fetch=1
# Official resources to fetch ISO's
iso_site="\
https://download.liveupdate.fnnas.com/x86_64/trim/fnos-0.9.26-1118.iso \
"
# Official CBSD project mirrors ( info: https://github.com/cbsd/mirrors )
#cbsd_iso_mirrors="https://mirror.convectix.com/iso/ #https://raw.githubusercontent.com/cbsd/mirrors/refs/heads/main/cbsd-iso.txt"
iso_img="fnos-0.9.26-1118.iso"
# register_iso as:
register_iso_name="cbsd-iso-${iso_img}"
register_iso_as="iso-${vm_profile}"
default_jailname="fnos"
# https://help.fnnas.com/articles/fnosV1/start/install-os.md
imgsize="2.3g"
#imgsize_min="8g"
vm_ram="5g"
# VNC
vm_vnc_port="0"
vm_efi="uefi"
# disable profile?
xen_active=1
bhyve_active=1
qemu_active=1
# Available in ClonOS?
clonos_active=1
md5="48c0bd5bd889ceb271a669de5a05033e"
# disable profile?
xen_active=1
bhyve_active=1
qemu_active=1
# Available in ClonOS?
clonos_active=1
md5="48c0bd5bd889ceb271a669de5a05033e"
#iso_img_dist_size="1971412992"
# enable birtio RNG interface?
virtio_rnd="1"
# firmware settings
cd_boot_firmware="bhyve"
hdd_boot_firmware="refind"
# vm_post_message in single line
vm_post_message="You need to add at least one additional disk, e.g: \n\n% cbsd bhyve-dsk mode=attach jname=${jname} dsk_controller=virtio-blk dsk_size=10g"
No, profiles are scanned every time you run `bconstruct-tui`.. The profile works for me (the only thing is that you made a mistake in the iso_site= parameter - needs URL without filename):the new profile doesn't show up, do I need to run the initenv again? Hereby is the profile:
% cbsd get-profiles src=iso |grep fnO
fnOS-0.9.26 linux fnOS NAS: 0.9.26
% cbsd bcreate jname=fnos1 vm_os_type=linux vm_os_profile=fnOS-0.9.26 vm_ram=5g vm_cpus=2 imgsize=3g
% cbsd bhyve-dsk mode=attach jname=fnos1 dsk_controller=virtio-blk dsk_size=20g
% cbsd bstart
...
fetch -o ~cbsd/etc/vm-linux-fnOS-0.9.conf https://raw.githubusercontent.com/cbsd/cbsd-vmprofiles/refs/heads/master/vm-linux-fnOS-0.9.conf
There is no default password, the password will be set through the installation.PPS: What is the default password ;-) ? Maybe it makes sense to add in profile post-message.
bhyve: Could not open backing file: /usr/cbsd/vm/fnos/dsk1.vhd: No such file or directory
sudo /usr/local/cbsd/share/bhyverun.sh -c /usr/cbsd/jails-system/fnos/bhyve.conf
ifconfig: interface tap2 does not exist
[debug] env LIB9P_LOGGING=/usr/cbsd/jails-system/fnos/cbsd_lib9p.log /usr/bin/nice -n 1 /usr/sbin/bhyve -c 1 -m 4294967296 -H -A -U a20caad7-91e1-11f0-9cfa-70106fc7d856 -s 0,hostbridge -s 4,virtio-blk,/usr/cbsd/vm/fnos/dsk1.vhd,sectorsize=512/4096 -s 1,ahci-cd,/usr/local/cbsd/upgrade/patch/efirefd.fd,ro -s 5,virtio-net,tap2,mtu=1500,mac=00:a0:98:0a:87:9f -s 6,virtio-rnd -s 7,fbuf,tcp=192.168.31.240:5901,w=1024,h=768,password=123454 -s 30,xhci,tablet -s 31,lpc -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd,/usr/cbsd/jails-system/fnos/BHYVE_UEFI_VARS.fd,fwcfg=qemu -l com1,stdio fnos
bhyve exit code: 4. exit_action settings: 0, exit_action_mode ret: 0: must stoppped
See /tmp/tmp.6V8U37h7ND for details
Mon Sep 15 11:15:45 CST 2025
cmd: env LIB9P_LOGGING=/usr/cbsd/jails-system/fnos/cbsd_lib9p.log /usr/bin/nice -n 1 /usr/sbin/bhyve -c 1 -m 4294967296 -H -A -U a20caad7-91e1-11f0-9cfa-70106fc7d856 -s 0,hostbridge -s 4,virtio-blk,/usr/cbsd/vm/fnos/dsk1.vhd,sectorsize=512/4096 -s 1,ahci-cd,/usr/local/cbsd/upgrade/patch/efirefd.fd,ro -s 5,virtio-net,tap2,mtu=1500,mac=00:a0:98:0a:87:9f -s 6,virtio-rnd -s 7,fbuf,tcp=192.168.31.240:5901,w=1024,h=768,password=123454 -s 30,xhci,tablet -s 31,lpc -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd,/usr/cbsd/jails-system/fnos/BHYVE_UEFI_VARS.fd,fwcfg=qemu -l com1,stdio fnos
-----
bhyve: Could not open backing file: /usr/cbsd/vm/fnos/dsk1.vhd: No such file or directory
Could not open backing file: No such file or directory
Device emulation initialization error: No such file or directory
Sleep 1 seconds...
Erase is delete.
Warning: unable to determine bhyve pid for: fnos
Killed
Is this behavior observed with any VM or FNOS only? In fact, it is a symlink to zvol (if you use zfs), so ZFS must be mounted ( `zfs list |grep fnos` ). Or it can be a regular file (UFS, NFS, GlusterFS, S3/fusefs), you can recreate it:I run the following command to see why:
rm -f /usr/cbsd/vm/fnos/dsk1.vhd
truncate -s5g /usr/cbsd/vm/fnos/dsk1.vhd
Yes, it's FNOS only. I tried Linux Mint and no problem at all, hereby is the status:Is this behavior observed with any VM or FNOS only?
$ sudo cbsd bls
JNAME JID VM_RAM VM_CURMEM VM_CPUS PCPU VM_OS_TYPE IP4_ADDR STATUS VNC
fnos 0 4096 0 1 0 linux 192.168.31.241 Off 192.168.31.240:5901
linuxmint 36436 512 0 1 0 linux 192.168.31.242 On 192.168.31.240:5902
$ zfs list | grep fnos
zroot/cbsd/fnos 20.0G 82.2G 276K /usr/cbsd/vm/fnos
zroot/cbsd/fnos/dsk1.vhd 56K 102G 56K -
Yep, so this thread can probably be closed as "solved" (since I don't know of any open issues with RHEL and CBSD based distros at this point).By the way, FNOS is Debian based os and my host OS is FreeBSD 14.3.
ln -sf /dev/zvol/zroot/cbsd/fnos/dsk1.vhd ~cbsd/jails-data/fnos/dsk1.vhd