jails bhyve: init_bootrom: vm_create_devmem: No such file or directory in jailed bhyve with vnet with manual bhyve host example

The jails follows the following config:
Code:
acme {
exec.start = "/bin/sh /etc/rc";
exec.consolelog = "/var/log/jail_console_${name}.log";

allow.mount;
allow.mount.devfs;
allow.raw_sockets;
allow.vmm;
enforce_statfs = 1;
securelevel = 2;
exec.clean;
mount.devfs;
devfs_ruleset = 25;

path = "/jails/${name}";
host.hostname = "${name}";

$id = "5";
$ip = "192.168.0.${id}/24";
$gateway = "192.168.0.1";
$bridge = "bridge0";
$epair = "epair${id}";

vnet;
vnet.interface = "${epair}b";

exec.prestart  = "/sbin/ifconfig ${epair} create up";
exec.prestart += "/sbin/ifconfig ${epair}a up descr jail:${name}";
exec.prestart += "/sbin/ifconfig ${bridge} addm ${epair}a up";
exec.prestart += "/sbin/ifconfig ${epair}a ether 02:78:86:dd:81:0a";
exec.prestart += "/sbin/ifconfig ${epair}b ether 02:78:86:dd:81:0b";
exec.start    += "/sbin/ifconfig ${epair}b ${ip} up";
exec.start    += "/sbin/ifconfig tap create name tap-acme-vm";
exec.start    += "/sbin/ifconfig bridge create name bridge-acme-vm";
exec.start    += "/sbin/ifconfig bridge-acme-vm addm ${epair}b addm tap-acme-vm up";
exec.start    += "/sbin/route add default ${gateway}";
exec.stop      = "/sbin/ifconfig bridge-acme-vm destroy";
exec.stop     += "/sbin/ifconfig tap-acme-vm destroy";
exec.stop     += "/bin/sh /etc/rc.shutdown";
exec.poststop = "/sbin/ifconfig ${bridge} deletem ${epair}a";
exec.poststop += "/sbin/ifconfig ${epair}a destroy";
}
The jail was setup with
Code:
bsdinstall jail /jails/acme
service jail start acme
pkg -j acme install bhyve-firmware
And then setup the vm as in the handbook running inside the jail
Code:
cd /root
truncate -s 16G guest.img
fetch https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso
sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M -t tap-acme-vm -d guest.img \
     -i -I FreeBSD-14.0-RELEASE-amd64-bootonly.iso guestname
which kind of boots, but after entering the installer I get the following error:
Code:
Loading kernel...
/boot/kernel/kernel text=0x17ac20 text=0xd6b360 text=0x4236d4 data=0x180 data=0x186448+0x478bb8 0x8+0x188838+0x8+0x1abd4a|
Loading configured modules...
can't find '/etc/hostid'
can't find '/boot/entropy'
bhyve: init_bootrom: vm_create_devmem: No such file or directory
 
Again forgot to share the devfs rules:
Code:
[devfs_rules_bhyve_jail=25]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path vmm unhide
add path vmm/* unhide
add path tap* unhide
add path nmdm* unhide
 
Back
Top