Solved vm-bhyve: help needed for network-configuration

Thorny

Developer
Aloha,
i'm currently try to work with sysutils/vm-bhyve which seems to be great and fit my needs. But since i'm lacking a better understanding of networking, i just can get it to run.

My aim is:
- have a number of vms
- assign each vm a unique IPv4 and IPv6 address

Every IP should is visible in the world since the vms will contain various standalone webservices.

How can i achieve this?
Greetings,
Torsten
 
I did read the article but did not get it really. For example i do not understand how i can assign a specific ip to a specific vm. And another specific ip to another specific vm.
The article already require a better understanding of networking, mixes nat and bridging and do not explain multiple vms / ips.
 
For example i do not understand how i can assign a specific ip to a specific vm.
You configure the VM just like any normal physical machine. For all intents and purposes just treat a VM as a stand-alone machine.
 
Okay, i gave it another try and just imagine everything would be a physical machine. Works mostly fine. I assigned the IP in /etc/rc.conf and get it:

vtnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
ether 58:9c:fc:0e:c6:73
hwaddr 58:9c:fc:0e:c6:73
inet 192.168.0.148 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet 10Gbase-T <full-duplex>
status: active

I can ping my host machine and other machines in 192.168.0.*.
But i can't ping google.de for example. And yes, i have nameserver in /etc/resolv.conf. I just get No route to host. I should i progress?
 
You're probably missing the default gateway, so you can only reach other machines within the same network segment and nothing outside of it. Make sure to set defaultrouter in rc.conf.
 
I did miss the default gateway. -.- It really helps to think of them as physical machines! Thank you very much! :)
 
Back
Top