bhyve bhyve and setting up VMs

I am working on setting up a bhyve server on a mini-server. I am totally new to bhyve, and the first thing I want to do is to stand up a pfsense and an OPNsense box in vm so I can migrate my configs and convert my actual firewall to OPNsense... The only downside is that for the firewall vms, I need 3 interfaces, internal, external, and DMZ...

Where are the best docs for bhyve, and how do I set up multiple interfaces on a box that has a single interface?

Thanks!
 
You can create a bhyve VM with three network interfaces with the following command line arguments:

Code:
# bhyve (any other required command line args) -s 2:0,virtio-net,tap -s 2:1,virtio-net,tap -s 2:2,virtio-net,tap vmname

This will create three vtnet(4) interfaces inside the VM, which are "connected" to three tap(4) interfaces on the bhyve host. You then need to connect the tap interfaces to a real network using if_bridge(4).
 
Back
Top