Virtual Network Interfaces - churchers/vm-bhyve GitHub Wiki
Examples of some possible network configurations. All guests support multiple network interfaces.
Basic Example, Connected to 'public' virtual switch
network0_type="virtio-net"
network0_switch="public"
Custom MAC Address
Please note that on first run, all network interfaces are assigned a static
MAC address automatically by vm-bhyve
if they don't have one. This MAC address
is then written to the configuration file.
network0_type="virtio-net"
network0_switch="public"
network0_mac="00:11:22:33:44:55"
The bhyve
hypervisor only accepts custom MAC addresses starting with 58:9c:fc
and will refuse to boot otherwise (irrespective of the guest OS) without any useful error message.
Custom Network Device
By default vm-bhyve
will create a dynamic tap device for each interface. If you want
to do something complex, requiring manual network settings, this can be a problem as
the device doesn't exist until you start the guest.
By specifying a custom device you can configure this device yourself via rc.conf
.
Note that I have left the switch
configuration option out. If specified, the tap
device will be automatically attached to the virtual switch. If you have already configured
the custom device as required you may not want this, so can leave the switch settings out.
network0_type="virtio-net"
network0_device="tap0"