This is an old revision of the document!
kern.ipc.semmni=40 kern.ipc.semmns=300 vmm_load="YES" nmdm_load="YES" if_bridge_load="YES" if_tap_load="YES"
loned_interfaces="bridge0 tap0" ifconfig_bridge0="addm re0 addm tap0"
net.link.tap.up_on_open=1
pkg install grub2-bhyve pkg install screen
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 02:b1:2b:2e:66:00 nd6 options=9<PERFORMNUD,IFDISABLED> groups: bridge id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 4 priority 128 path cost 2000000 member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 1 priority 128 path cost 55
1 44 0xffffffff80200000 1fa7c38 kernel 4 1 0xffffffff824bf000 aaa0 if_tap.ko 5 1 0xffffffff824ca000 11c38 if_bridge.ko 6 2 0xffffffff824dc000 8f58 bridgestp.ko 12 1 0xffffffff82681000 3571f0 vmm.ko 13 1 0xffffffff829d9000 5010 nmdm.ko
(hd0) ./ubuntu-16.04.img (cd0) ./ubuntu-16.04.1-server-amd64.iso
truncate -s 16G ubuntu-16.04.img
grub-bhyve -m device.map -r cd0 -M 1024M ubuntu-16.04 bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./ubuntu-16.04.img \ -s 4:0,ahci-cd,./ubuntu-16.04.1-server-amd64.iso -l com1,stdio -c 4 -m 1024M ubuntu-16.04
#!/bin/sh CONSOLE="-l com1,stdio" VMNAME="ubuntu16_04" DISKIMAGE="-s 3:0,virtio-blk,./ubuntu-16.04.img" RAM="1024M" CPUS="4" TAPDEV="tap0" NETWORK="-s 2:0,virtio-net,${TAPDEV}" grub-bhyve -m device.map -r hd0,msdos1 -M ${RAM} ${VMNAME} bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc ${NETWORK} ${DISKIMAGE} ${CONSOLE} -c ${CPUS} -m ${RAM} ${VMNAME} bhyvectl --destroy --vm=${VMNAME}