Hi all,
I am trying to jail a bhyve by following the step in the handbook (25.7.9). When i am inside a jail and i want to create a VM
I will get an error saying
When i do this on the host, it succeeds without error. The strange thing is that i can see
Here are some config files on the host:
devfs.rules
/etc/jail.conf.d/bhyve.conf
The base system on the jail is from http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/15.1-RELEASE/base.txz
I am trying to jail a bhyve by following the step in the handbook (25.7.9). When i am inside a jail and i want to create a VM
bhyvectl --create --vm=bhyvevm0I will get an error saying
vm_open: bhyvevm0 could not be opened: No such file or directoryWhen i do this on the host, it succeeds without error. The strange thing is that i can see
/dev/vmm/test_vm on the host, while inside the jail /dev/vmm is empty.Here are some config files on the host:
devfs.rules
Code:
[devfsrules_jail_bhyve=100]
add include $devfsrules_hide_all
add include $devfsrules_unhide_login
add path 'urandom' unhide
add path 'random' unhide
add path 'crypto' unhide
add path 'shm' unhide
add path 'zero' unhide
add path 'null' unhide
add path 'mem' unhide
add path 'vmm' unhide
add path 'vmm/*' unhide
add path 'vmm.io' unhide
add path 'vmm.io/*' unhide
add path 'nmdmbhyve*' unhide
add path 'zvol' unhide
add path 'zvol/zroot' unhide
add path 'zvol/zroot/vms' unhide
add path 'zvol/zroot/vms/bhyvevm0' unhide
add path 'zvol/zroot/vms/bhyvevm1' unhide
add path 'tap10*' unhide
/etc/jail.conf.d/bhyve.conf
Code:
bhyve {
$if = 0;
exec.prestart = "/sbin/ifconfig epair${if} create up";
exec.prestart += "/sbin/ifconfig epair${if}a up";
exec.prestart += "/sbin/ifconfig epair${if}a name ${name}0";
exec.prestart += "/sbin/ifconfig epair${if}b name jail${if}";
exec.prestart += "/sbin/ifconfig ${name}0 inet 192.168.168.1/27";
exec.prestart += "/sbin/sysctl net.inet.ip.forwarding=1";
exec.clean;
host.hostname = "jailed-bhyve";
vnet;
vnet.interface = "jail${if}";
path = "/usr/local/jails/${name}";
persist; #?
securelevel = 3; #?
devfs_ruleset = 100;
mount.devfs;
allow.vmm;
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.poststop += "/sbin/ifconfig ${name}0 destroy";
}
The base system on the jail is from http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/15.1-RELEASE/base.txz