There is some writing about running Bhyve within a Jail (testing the opposite).
Can you run jails within a Bhyve freebsd instances?
I assume yes so, so I spend a few hours messing with a Bhyve FreeBSD I have for testing purposes... Installed a few jails in it and while I can make them communicate within the Bhyve network.
I cannot get the Vnet jails within the Bhyve to route to the outside network (I cannot ping 8.8.8.8 for example). Bhyve can ping to 8.8.8.8 and can hit the router/gateway... VNET jails cannot hit the router/gateway nor the 9.9.9.9.
I can ping the epair0a, I can ping a VLAN in host(if I created 10.0.100.1), I can ping an alias in bhyve host if I assign it to the vtnet0 nic. I am guessing maybe there has to do something with the route table but I am not too sure.
Has anyone tried doing JAILS within BHYVE emulation? How did you do the routing or Vnet configuration? Can you post your config files?
Why wouldn't I do Jails inside of Bhyve? (Outside of the resources) Is it too slow?
Do I have to nat the nic/epair with PF?
Can you run jails within a Bhyve freebsd instances?
I assume yes so, so I spend a few hours messing with a Bhyve FreeBSD I have for testing purposes... Installed a few jails in it and while I can make them communicate within the Bhyve network.
I cannot get the Vnet jails within the Bhyve to route to the outside network (I cannot ping 8.8.8.8 for example). Bhyve can ping to 8.8.8.8 and can hit the router/gateway... VNET jails cannot hit the router/gateway nor the 9.9.9.9.
I can ping the epair0a, I can ping a VLAN in host(if I created 10.0.100.1), I can ping an alias in bhyve host if I assign it to the vtnet0 nic. I am guessing maybe there has to do something with the route table but I am not too sure.
Has anyone tried doing JAILS within BHYVE emulation? How did you do the routing or Vnet configuration? Can you post your config files?
Why wouldn't I do Jails inside of Bhyve? (Outside of the resources) Is it too slow?
Code:
#mkdir -p /usr/jails/jails-data/JTest_1-data
zfs create -o mountpoint=/usr/jails/jails-data/JTest_1-data zroot_fbsd/ROOT/default/JTest_1
ifconfig epair create
jail -c name=JTest_1 host.hostname=JTest_1.domain.com path=/usr/jails/jails-data/JTest_1-data children.max=5 persist vnet vnet.interface=epair0b allow.mount=1 allow.mount.devfs=1 allow.raw_sockets=1 devfs_ruleset=4 sysvmsg=1 sysvsem=1 sysvshm=1
ifconfig bridge create
ifconfig bridge addm epair0a addm vtnet0
&& \
jail -r JTest_1 || jail -r 1
zfs destroy -R zroot_fbsd/ROOT/default/JTest_1
Do I have to nat the nic/epair with PF?