NameLicensePackageDocumentation更新时间github地点 BastilleBSD
BSD-3
sysutils/bastille
Documentation
2023.11GitHub - BastilleBSD/bastille: Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD. pot
BSD-3
sysutils/pot
Documentation
2023.12GitHub - bsdpot/pot: pot: another container framework for FreeBSD, based on jails, ZFS and pf cbsd
BSD-2
sysutils/cbsd
Documentation
2024GitHub - cbsd/cbsd: Yet one more wrapper around jail, bhyve, QEMU and XEN AppJail
BSD-3
sysutils/appjail, for devel sysutils/appjail-devel
Documentation
2024GitHub - DtxdF/AppJail: Simple and easy-to-use tool for creating portable jails. iocage
BSD-2
sysutils/iocage
Documentation
2023.12https://github.com/iocage/iocage ezjail
Beer Ware
sysutils/ezjail
Documentation
2015.6 其它还有ocijail
https://github.com/dfr/ocijail
下面单独先容几种比力流行的管理器
CBSD
cbsd同时还可以管理jail和bhyve (Yet one more wrapper around jail, bhyve, QEMU and XEN) ,代码:GitHub - cbsd/cbsd: Yet one more wrapper around jail, bhyve, QEMU and XEN。这里还有作者关于docker的办理方法:CBSD — FreeBSD Jail and Bhyve Management Tools
实践文档:jail管理器CBSD实践@FreeBSD-CSDN博客
BastileBSD
BastileBSD手册:Bastille — Bastille 0.10.20231125-beta documentation 代码:GitHub - BastilleBSD/bastille: Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
AppJail
AppJail is an open-source BSD-3 licensed framework entirely written in POSIX shell and C to create isolated, portable and easy to deploy environments using FreeBSD jails that behaves like an application. 手册:AppJail Handbook
源码:GitHub - DtxdF/AppJail: Simple and easy-to-use tool for creating portable jails.
AppJail的特点是它可以设置一种叫tiny jail的模式,只提供相干c代码的文件即可。 它还支持LinuxJails
AppJail实践文档:Jail管理器AppJail的使用@FreeBSD-CSDN博客
AppJail主页写的几种管理器的对比图
除了没有cbsd,其它几种都在,似乎就AppJail最牛
AppJailbastillepotiocageezjailZFS supportsupportedsupportedrequiredrequiredsupportedZFS supportLanguageC, Bourne ShellBourne ShellRust, Bourne ShellPythonBourne ShellLanguageAutomationMakejail, Initscripts, ImagesTemplatesFlavours, ImagesPluginsFlavoursAutomationJail Typeclone, copy, tiny, thin, thick, empty, linux+debootstrapthin, thick, vnet, Linux, emptythickclone, basejail, template, empty, thickbasejailJail TypeVNETSupportedSupportedSupportedSupportedNot SupportedVNETDynamic firewallYesRequires a loopback interfaceYesNoNoDynamic firewallResource controlFull supportYes, but it does not support statistics and all rctl(8) actions and does not support actions by ruleBasic: CPU and memory onlyLegacy onlyNot SupportedResource controlCPU SetsYesNoYesYesYesCPU SetsIPv6 supportYes (+SLAAC)YesYesYesYesIPv6 supportLinux containersYesYes??Yes??Linux containersDynamic DEVFS Ruleset ManagementYesNoNoNoNoDynamic DEVFS Ruleset ManagementNetwork managementVirtual networks, BridgesNoSubnet, requires sysutils/potnetNoNoNetwork managementJail dependencyYesNoYesYesNoJail dependencySupervisorYes (Healthcheckers)NoNoNoNoSupervisorLog managementYesNoNoNoNoLog managementParse jail.conf(5) file for syntax errorsYesNot supportedYesYesYesParse jail.conf(5) file for syntax errorsVolume managementYesNoBasic, Only supported when using the fscomp featureBasicNoVolume managementParallel startupYes (Healthcheckers, jails & NAT)NoNoNoNoParallel startupNetgraphYesNoNoNoNoNetgraphStartup order controlYesYes, but don't support prioritiesYes, but don't support prioritiesYesYes, using rcorder(8)Startup order controlX11 supportYesNoNoNoNoX11 supportimport/exportYesYesYesYesYesimport/export CBSD主页画的jial管理软件生命周期图
下面是一个启动 bhyve 虚拟机的示例下令,vmrun.sh是一个脚本,这个脚本将会启动虚拟机并循环实行,以是可在其崩溃时主动重新启动。这个脚本可接受数个选项来设置虚拟机:-c 控制虚拟 CPU 的数量,-m 限制客户机的可用内存,-t 定义使用的 tap 设备,-d 指定其使用的磁盘镜像,-i 控制 bhyve 从 CD 镜像引导,而非从磁盘引导,-I 指定要使用的 CD 镜像。最后一个参数是虚拟机的名称,该名称将被用来追踪运行中的虚拟机。这个例子将在安装模式下启动虚拟机:
启动后提示
init_systap: waiting for link: igb0
Looks like /usr/jails/vm/bub22/dsk1.vhd is empty.
May be you want to boot from CD?
[yes(1) or no(0)]
yes确认
然后使用cbsd blogin bub22 登录
cbsd blogin bub22
复制代码
表现
Boot from CD
Waiting for first connection via VNC to starting VMs...
[debug] env LIB9P_LOGGING=/usr/jails/jails-system/bub22/cbsd_lib9p.log /usr/bin/nice -n 1 /usr/sbin/bhyve -c cpus=2,sockets=2,cores=1,threads=1 -m 2684354560 -H -A -U 6c3d474b-323f-11ef-81c3-00e2691367f6 -s 0,hostbridge -s 4,virtio-blk,/usr/jails/vm/bub22/dsk1.vhd,sectorsize=512/4096 -s 2,ahci-cd,/usr/jails/src/iso/cbsd-iso-ubuntu-22.04.3-live-server-amd64.iso,ro -s 5,virtio-net,tap2,mtu=1500,mac=00:a0:98:ca:22:95 -s 6,virtio-rnd -s 7,fbuf,tcp=127.0.0.1:5900,w=1024,h=768,wait,password=cbsd -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,/usr/local/cbsd/upgrade/patch/efi.fd,/usr/jails/jails-system/bub22/BHYVE_UEFI_VARS.fd bub22
使用vncviewer登录