首先,创建bhyve
cbsd bconstruct-tui
然后启动
cbsd bstart bub22
启动后提示
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
发现只有本机的5900服务:
tcp4 0 0 127.0.0.1.5900 *.* LISTEN
需要进去设置一下
进入bhyve_vnc_options 修改bhyve_vnc_tcp_bind ,把127.0.0.1 改成 0.0.0.0
修改之后不要忘记commit
然后就可以使用vicviewer 来登录拉!
开始安装
调试
vncviewer无法登录
防火墙打开5900通信
设置好vnc密码
vnc退出后再次登录无法输入字母等
是因为执行了/usr/local/bin/cbsd /usr/local/cbsd/bhyvectl/blogin bub22
选了1
Do you want to attach into UEFI console anyway?
[yes(1) or no(0)]