Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. Required ports: | sysutils/bhyve-firmware | sysutils/uefi-edk2-bhyve | sysutils/uefi-edk2-bhyve-csm | net/tigervnc-viewer | Add the following lines to ''%%/etc/rc.conf%%''. Replace ''%%re0%%'' with your own network interface. It's good practice to assign each VM a unique ''%%tap%%'' interface in case you need to run multiple VMs at the same time. For simplicity's sake, this setup uses only one ''%%tap%%'': <code> if_bridge_load="YES" if_tap_load="YES" cloned_interfaces="bridge0 tap0" ifconfig_bridge0="DHCP addm re0 addm tap0" ifconfig_bridge0_alias0="inet 10.0.0.1/24" </code> Reboot your machine and then grab a [[http://9front.org/releases/|9front ISO]]. Make a directory where you'll store everything 9front-related. I usually keep all my [[https://www.freebsd.org/cgi/man.cgi?query=bhyve&sektion=8|bhyve(8)]] VMs under a [[https://docs.freebsd.org/en/books/handbook/zfs/|ZFS dataset]]: <code> $ cd /path/to/vms/ $ mkdir 9front $ mv /path/to/9front_iso 9front.iso </code> Create an empty file to be used as the VM's hard drive. 10G will be more than enough: <code> $ truncate -s 10G disk.img </code> Make a startup script. Feel free to tweak the variable values to match your own setup. Obviously, when you're done installing 9front from the ISO, you'll be running the script without the ''%%-s 3,...%%'' line: <code> $ cat 9front_start #!/bin/sh name="9front" cpu="2" mem="2G" iso="9front.iso" disk="disk.img" tap="tap0" ifconfig ${tap} up bhyve -c ${cpu} -m ${mem} -wH \ -s 0,hostbridge \ -s 3,ahci-cd,${iso} \ -s 4,ahci-hd,${disk} \ -s 5,virtio-net,${tap} \ -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ ${name} </code> Make a shutdown script in order for bhyve(8) to close properly: <code> $ cat 9front_stop #!/bin/sh name="9front" tap="tap0" ifconfig ${tap} down bhyvectl --force-poweroff --vm=${name} bhyvectl --destroy --vm=${name} </code> Make the scripts executable and start the VM: <code> $ chmod +x 9front_start 9front_stop # ./9front_start; ./9front_stop </code> Run vncviewer(1) to connect to the VNC display: <code> $ vncviewer 0.0.0.0 </code> When prompted for the monitor type during boot, choose ''%%xga%%''. **Note:** It may be necessary to rename your disk image after you remove the iso from the configuration. This is only an issue if your device id's change, IE sdE0 to sdF0 or vice versa. Renaming the disk image resets the device id to the correct one. bhyve/9front.txt Last modified: 2023/10/15 20:57by thedaemon