Having all bhyve guests on the same network

aragats

Daemon

Reaction score: 703
Messages: 1,618

Hello,

How can I configure my network to achieve this? Probably it's simple, but I couldn't figure it out.

The simplest case is when I have 2 bhyve guests, one on tap0, another on on tap1. I'd like those guest OS's to see each other having IP addresses in the same range.

Thanks!
 
OP
aragats

aragats

Daemon

Reaction score: 703
Messages: 1,618

Well, that was the first thing I tried, didn't work for some reason.
When tap0 and tap1 have IP addresses from the same range, e.g. 192.168.4.1/24 and 192.168.4.2/24, only one guest's network is working!
ping(8) in another one gets no reply, even when tap0 and tap1 are not members of a bridge.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,952
Messages: 38,397

Well, I have several bhyve VMs, all on the same network. I highly recommend using sysutils/vm-bhyve:
Code:
root@molly:~ # vm list
NAME            DATASTORE       LOADER      CPU    MEMORY    VNC                  AUTOSTART    STATE
crossfire       default         uefi        2      2048M     0.0.0.0:5900         No           Running (71102)
db1             default         bhyveload   2      2048M     -                    Yes [1]      Running (70584)
puppetmaster    default         bhyveload   1      1024M     -                    Yes [2]      Running (70753)
root@molly:~ # vm switch info public
------------------------
Virtual Switch: public
------------------------
  type: auto
  ident: bridge0
  vlan: -
  nat: -
  physical-ports: em0
  bytes-in: 4885555895 (4.550G)
  bytes-out: 314189464606 (292.611G)

  virtual-port
    device: tap2
    vm: crossfire

  virtual-port
    device: tap1
    vm: puppetmaster

  virtual-port
    device: tap0
    vm: db1
 
Top