Solved no network connection after reinstall of freebsd with bhyve

Hi,

I have just worked over 9 month on my server with FreeBSD 11.1 and with bhyve.

The configuration: first Harddisk (SATA dom 64GB) only for FreeBSD. Second harddisk for ZFS and the virtual machines. Third harddisk only user data.

Everything was ok. Then the hardisk with the operating system doesn't work any more. A restart of the server was not possible any more because the SATA dom was not more possible to read.

Together with the operating systems there was ZFS, NFS-, DHCP-, DNS-Server and Bhyve installed.


The first problem was that the backup of my SATA dom didn't work!

So I installed on another disk the operating system with the other Software ZFS, NFS-, DHCP-Server and Bhyve.

Now I can access my zfs-Files, NFS and DHCP works. Perhaps also bhyve.

I can start a virtual machine. It runs and it is possible to connect to the started system via console. But there is no network connection from or to the virtual machine.


I can't fix the problem and hope you have some ideas to solve the problem.


Thx alot.

OlliP
 
Last edited:
only the vm commands

vm start <server-name>
vm console <server-name>
vm stop ....

so only the basic commands from vm
 
So, you're using sysutils/vm-bhyve. Alright, check if you actually have a virtual switch defined. It needs to be connected to your 'external' interface on the host and tied to your VMs.

Code:
root@hosaka:~ # vm switch list
NAME    TYPE    IFACE     ADDRESS  PRIVATE  MTU  VLAN  PORTS
public  manual  bridge10  n/a      no       n/a  n/a   n/a
root@hosaka:~ # vm switch info
------------------------
Virtual Switch: public
------------------------
  type: manual
  ident: bridge10
  vlan: -
  physical-ports: -
  bytes-in: 533988096964 (497.315G)
  bytes-out: 553229715824 (515.235G)

  virtual-port
    device: tap7
    vm: gitlab

  virtual-port
    device: tap8
    vm: gitlab

  virtual-port
    device: tap6
    vm: funky

  virtual-port
    device: tap5
    vm: plex

  virtual-port
    device: tap4
    vm: jenkins

  virtual-port
    device: tap3
    vm: tessierashpool

  virtual-port
    device: tap2
    vm: wintermute

  virtual-port
    device: tap1
    vm: kibana

  virtual-port
    device: tap0
    vm: kdc

root@hosaka:~ #

https://github.com/churchers/vm-bhyve/wiki/Virtual-Switches
 
Code:
root@freebsd:~ # vm switch list
NAME    TYPE        IFACE       ADDRESS  PRIVATE  MTU  VLAN  PORTS
public     standard   vm-public  -                     no              -          -           -
root@freebsd:~ #
 
The vm-public is 'generated' after a restart of the operating system.
I have no idea where it came from.

I have checked multiple times the rc.conf and loader.conf but i can't find an error.
 
Your public is a (virtual) switch that's not connected to an upstream interface at the moment. That's most likely the reason why none of your VMs have access to the network.
 
I have executed the commands
Code:
vm switch distroy public ==> this works and then vm-public is away
vm switch create public ==> works also
vm switch add public igb0 ==> result in error
please see attached file
 

Attachments

  • 2018-09-26 A.jpg
    2018-09-26 A.jpg
    788.6 KB · Views: 126
If you look at the configuration of bridge0 you'll see that igb0 is already a member.
 
when i understand you right i don't need to execute
vm switch add public igb0

but why don't i have no connection between the systems
 
Look at the output of ifconfig igb0, is it actually connected? How's your network configured? Require any VLAN configurations? What IP ranges are used on the network and the VMs?
 
Hi SirDice,

after setting up the right ip-adresses to the FreeBSD System and the vm-Ubuntu the connection was able.
So the Problem is solved.

Thx alot.
OlliP
 
Back
Top