getting iohyve VM to access the network

Status
Not open for further replies.

nicosalto

Dabbler
Joined
Nov 25, 2016
Messages
40
Hi,
i am having trouble to get my debian iohyve VM to connect to my local network.
My goal is to install a roon core server, and i am following this tutorial: https://community.roonlabs.com/t/howto-debian-installation-on-frenas-bhyve/10591

My current configuration is :
FreeNAS-11.1-U2 - X11SSM-F supermicro - 2x16Gb kinston - 4x4Tb WD drives + 2x2Tb drives
my motherboard is a Supermicro X10SL7-F and according to the manual, this is the lan interface:
2x RJ45 Gigabit Ethernet LAN ports
1x RJ45 Dedicated IPMI LAN port
https://www.supermicro.com/products/motherboard/xeon/c220/x10sl7-f.cfm

And this is my ifconfig
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=6403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether 0c:c4:7a:86:67:d8
hwaddr 0c:c4:7a:86:67:d8
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect
status: no carrier
igb1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
ether 0c:c4:7a:86:67:d9
hwaddr 0c:c4:7a:86:67:d9
inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect (1000baseT )
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
tap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: iohyve-roon–
options=80000
ether 00:bd:f0:0e:f8:01
hwaddr 00:bd:f0:0e:f8:01
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect
status: no carrier
groups: tap
tap2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: iohyve-roonserver–
options=80000
ether 00:bd:bc:24:f8:02
hwaddr 00:bd:bc:24:f8:02
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet autoselect
status: active
groups: tap
Opened by PID 6707
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:0d:36:85:fc:00
nd6 options=1
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: tap3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 12 priority 128 path cost 2000000
member: epair3a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 10 priority 128 path cost 2000
member: epair2a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 9 priority 128 path cost 2000
member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 8 priority 128 path cost 2000
member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 7 priority 128 path cost 2000
member: igb1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 2 priority 128 path cost 20000
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:7b:50:00:07:0a
hwaddr 02:7b:50:00:07:0a
nd6 options=1
media: Ethernet 10Gbase-T (10Gbase-T )
status: active
groups: epair
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:7b:50:00:08:0a
hwaddr 02:7b:50:00:08:0a
nd6 options=1
media: Ethernet 10Gbase-T (10Gbase-T )
status: active
groups: epair
epair2a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:7b:50:00:09:0a
hwaddr 02:7b:50:00:09:0a
nd6 options=1
media: Ethernet 10Gbase-T (10Gbase-T )
status: active
groups: epair
epair3a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:7b:50:00:0a:0a
hwaddr 02:7b:50:00:0a:0a
nd6 options=1
media: Ethernet 10Gbase-T (10Gbase-T )
status: active
groups: epair
tap3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000
ether 00:bd:70:c8:f8:03
hwaddr 00:bd:70:c8:f8:03
nd6 options=1
media: Ethernet autoselect
status: active
groups: tap
Opened by PID 10966


Iam not very familiar with this output and how to read it properly.
according to the tutorial i need to setup this line in the tunables to setup the network bridge. In my case i don't have an interface named em0, so which one i must use ?
iohyve_flags="kmod=1 net=em0"

similar question for this line
iohyve setup net=em0
In my case which interface i should point iohyve to?

Lastly, within the debian VM, this the current configuration i am using:
/etc/network/interfaces

# The loopback network interface
auto lo0
#iface lo0 inet loopback

#My IP description
#IPv4 address
auto enp0s3
iface enp0s3 inet static
address 192.168.1.100
netmask 255.255.255.0
#network 192.168.1.0
#broadcast 192.168.1.255
gateway 192.168.1.1



# ip a show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:a0:98:ba:de:1f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::2a0:98ff:feba:de1f/64 scope link
valid_lft forever preferred_lft forever


Any advice is most welcomed! thanks in advance!
 

nicosalto

Dabbler
Joined
Nov 25, 2016
Messages
40
UPDATE:
i solved partly the issue! i changed
iohyve_flags="kmod=1 net=em0"

to
iohyve_flags="kmod=1 net=igb1"
restarted freenas, and now i can ping the roon core server from my local network.
BUT, VM doesnt access internet. It fails when i do apt-get update.
Could it be a dns issue ?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
From the output of ifconfig that you posted, the active interface is "igb1" at "192.168.1.5". So I'd expected you'd access your FreeNAS webUI using ip address "192.168.1.5" and can use the network tab to confirm that is the active interface. If so, substitute "igb1" for "em0".

Crossed post:

Just check network config in your vm. What are the contents of /etc/resolv.conf ? Could be you need to add this line to etc/network/interfaces

Code:
dns-nameservers 192.168.1.1


Assuming your router is at 192.168.1.1 and it is acting as your DNS.
 
Last edited:

nicosalto

Dabbler
Joined
Nov 25, 2016
Messages
40
Thanks for your answer KrisBee.
yes the active interface of igb1 is 192.168.1.5 and i access the freenas web interface via that address.
But when i put em0 instead of igb1, then the VM can't access the network at all. At least when i use igb1 i can access the server on my local network.
I added the line of code to /etc/network/interfaces as you recommended, but it doesnt change anything.
Also the file /etc/resolv.conf is empty on the VM machine, what should it contain ?
 

nicosalto

Dabbler
Joined
Nov 25, 2016
Messages
40
It is a DNS issue i think, i edited /etc/resolv.conf and added:
nameserver 38.132.106.139
nameserver 194.187.251.67


and now “ping 8.8.8.8” within the VM works!
But when i “ping google.com”, i get the error:
ping: google.com: Name or service not known
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Adding a dns-nameserver line to the config for the vm interface enp0s3 you posted above, should have enabled you to "ping" external ip addresses. Did you restart the network service after making the change and/or re-boot your vm?

As an alternative, remove the line you added and simply add a nameserver entry to /etc/resolv.conf, as root

echo "nameserver 192.168.1.1 > /etc/resolv.conf

Test you can ping out and go form there ....
 

nicosalto

Dabbler
Joined
Nov 25, 2016
Messages
40
Yes thanks KrisBee, this actually solved the issue!

But, every time i restart the VM the file goes empty.
and if i had to it:
nameserver 192.168.1.1
then everything works again …
 
Status
Not open for further replies.
Top