I'm trying to boot a Debian disk image and get it running using bhyve within a jail.
When I execute this command (inside the jail):
it causes a "vm_create: Device not configured" error.
I dived deeper into the vmrun.sh file and inserted the following code:
The printout is:
and the bhyve command exit status is "4".
Outside the jail (on the host system):
I have my /etc/sysctl.conf with this line added:
I also have these lines added to my /etc/rc.conf:
And inside my /etc/jail.conf, I have:
And the /etc/devfs.rules:
One thing of interest is the name of the rule isn't referenced anywhere, so it doesn't matter that i call it like "devfs_rules_bhyve_jail". Is my understanding correct? I mean, this isn't the problem, right?
And also in my /boot/loader.conf, I have added:
So, what is wrong with my set up and how do I resolve the "vm_create: Device not configured" error? What "device" is not configured?
Thanks!
When I execute this command (inside the jail):
sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 4g -I /install/debian-10.6.0-amd64-xfce-CD-1.iso -E -L 192.168.1.180 -P 5901 debian
it causes a "vm_create: Device not configured" error.
I dived deeper into the vmrun.sh file and inserted the following code:
just before:echo "FBSDRUN " ${FBSDRUN}
echo "cpus" ${cpus}
echo "memsize " ${memsize}
echo "bhyverun_opt " ${bhyverun_opt}
echo "gdbport " ${gdbport}
echo "efiargs " ${efiargs}
echo "devargs " ${devargs}
echo "console " ${console}
echo "installer_opt " ${installer_opt}
echo "vmname" ${vmname}
${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \
-g ${gdbport} \
-s 0:0,hostbridge \
-s 1:0,lpc \
${efiargs} \
${devargs} \
-l com1,${console} \
${installer_opt} \
${vmname}
The printout is:
FBSDRUN /usr/sbin/bhyve
cpus 4
memsize 4g
bhyverun_opt -H -A -P
gdbport 0
efiargs -s 29,fbuf,tcp=192.168.1.180:5901,w=1024,h=768 -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd
devargs -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./diskdev
console stdio
installer_opt -s 31:0,ahci-cd,/install/debian-10.6.0-amd64-xfce-CD-1.iso
vmname debian
vm_create: Device not configured
and the bhyve command exit status is "4".
Outside the jail (on the host system):
I have my /etc/sysctl.conf with this line added:
net.link.tap.up_on_open=1
I also have these lines added to my /etc/rc.conf:
cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm em0 addm tap0 up"
And inside my /etc/jail.conf, I have:
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;
interface = em0;
bhyvedebian {
host.hostname = bhyvedebian.hostname.com;
devfs_ruleset = 25;
ip4.addr = 192.168.1.180;
allow.vmm;
persist;
}
And the /etc/devfs.rules:
[devfs_rules_bhyve_jail=25]
add include $devfsrules_jail
add path vmm unhide
add path vmm/* unhide
add path tap* unhide
add path zroot/jails/bhyvedebian/* unhide
add path nmdm* unhide
One thing of interest is the name of the rule isn't referenced anywhere, so it doesn't matter that i call it like "devfs_rules_bhyve_jail". Is my understanding correct? I mean, this isn't the problem, right?
And also in my /boot/loader.conf, I have added:
vmm_load="YES"
nmdm_load="YES"
virtio_blk_load="YES"
So, what is wrong with my set up and how do I resolve the "vm_create: Device not configured" error? What "device" is not configured?
Thanks!