SOLVED VMs can't see host

Anda

Explorer
Joined
Aug 12, 2015
Messages
63
Hey,

so I'm currently switching from TrueNAS 12.1 Nightlies to SCALE Nightlies. So far I only saw a few bugs here and there. But It does work.
The only problem that I have right now is that my VMs can't see my host aka. TrueNAS.

For example, my pihole-vm has the IP 192.168.188.21 and my torrent-vm has 192.168.188.30.
They can see each other (and have Internet Access):
pihole@pihole:~$ ping 192.168.188.30 -c 4 PING 192.168.188.30 (192.168.188.30) 56(84) bytes of data. 64 bytes from 192.168.188.30: icmp_seq=1 ttl=64 time=0.168 ms 64 bytes from 192.168.188.30: icmp_seq=2 ttl=64 time=0.437 ms 64 bytes from 192.168.188.30: icmp_seq=3 ttl=64 time=0.252 ms 64 bytes from 192.168.188.30: icmp_seq=4 ttl=64 time=0.234 ms --- 192.168.188.30 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3080ms rtt min/avg/max/mdev = 0.168/0.272/0.437/0.099 ms

But If I try to ping my TrueNAS (192.168.188.29), well:
pihole@pihole:~$ ping 192.168.188.29 -c 4 PING 192.168.188.29 (192.168.188.29) 56(84) bytes of data. From 192.168.188.21 icmp_seq=1 Destination Host Unreachable From 192.168.188.21 icmp_seq=2 Destination Host Unreachable From 192.168.188.21 icmp_seq=3 Destination Host Unreachable From 192.168.188.21 icmp_seq=4 Destination Host Unreachable --- 192.168.188.29 ping statistics --- 4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3058ms pipe 4

I configured all my VMs with VirtIO (NIC and DISK) and CPU-Passthrough.
The NICs are all attached to my 10GBE NIC "enp1s0 ". When a VM is active I get a new interfaces "macvtap" without any interface settings set. However, I see a IPv6 address on the dashboard. Even though I have IPv6 deactivate on my main interfaces "enp1s0". And these "macvtap" interfaces are being used.

I read this guide but how can I change these kinds of settings in SCALE? In Core, I think it was possible via the GUI.

I need the VMs to see the host otherwise I can't mount my SMB share. Has anyone an idea?
 
Last edited:

Anda

Explorer
Joined
Aug 12, 2015
Messages
63
Okay, I solved It now.

I had to create a Bridge Interface "br0" and select my 10GBE NIC "enp1s0" as a Bridge Member. Also, I had to give the Bridge Interface "br0" the IP from my "enp1s0" interface "192.168.188.29" and afterward delete the IP from "enp1s0".

After that, you can attach the VMs NIC to "br0". And now they can see each other and the host.
 

groenator

Dabbler
Joined
Sep 21, 2021
Messages
44
Have you done this via the UI or CLI? When I add the IP of my bond0 to my bridge interface it's said that the IP network is already in use.
 

Zerenge87

Cadet
Joined
Oct 23, 2021
Messages
1
Have you done this via the UI or CLI? When I add the IP of my bond0 to my bridge interface it's said that the IP network is already in use.
I am currently dealing with this issue as well. I did try the steps above, but it broke my bond0 connection and my VM's could still not ping or connect to the host.
 

groenator

Dabbler
Joined
Sep 21, 2021
Messages
44
That is what I was afraid of too. I hope we can submit this as a bug or a feature request to create the bridge by default. I thought choosing the network interface is already in bridge mode. I will wait for the RC release. Hopefully, they will improve this.
 
Last edited:

marshalleq

Explorer
Joined
Mar 12, 2016
Messages
88
Spent a few hours trying to figure out why my VM's can't connect to the host via SMB or NFS and then find this! This should really be automatic on a NAS. Still happening on latest Scale.
 

marshalleq

Explorer
Joined
Mar 12, 2016
Messages
88
It's solved in comment #2.
 

engineerdj

Dabbler
Joined
Jan 17, 2022
Messages
21
Anyone have any luck with this? I am following steps from comment #2 and I run into an issue trying to assign the active interface IP to the bridge. It won't allow it stating that the IP is already in use. It then doesn't let me proceed to removing the assigned IP from the active interface to assign to the bridge. If I try and create the bridge and only attach the active interface as a member, but not add an IP assignment, I can save the bridge but lose access to the GUI. The only way to resolve this is to delete the bridge through the console.
 

gsrcrxsi

Explorer
Joined
Apr 15, 2018
Messages
86
Anyone have any luck with this? I am following steps from comment #2 and I run into an issue trying to assign the active interface IP to the bridge. It won't allow it stating that the IP is already in use. It then doesn't let me proceed to removing the assigned IP from the active interface to assign to the bridge. If I try and create the bridge and only attach the active interface as a member, but not add an IP assignment, I can save the bridge but lose access to the GUI. The only way to resolve this is to delete the bridge through the console.
I just did this and had to use the CLI shell to manually configure it. it wouldnt work via the GUI. but it seems to have worked properly in CLI. just add the interface to the bridge (br0), then add the ip to the bridge in console.
 

olepinguin

Dabbler
Joined
Apr 10, 2022
Messages
10
guys,
I'm quit new here. But is it to hard to write down how to solve the problem?
post #2 dons't work out of the box or isn't clear, see other post.

to "do" this via CLI is a good hint but doesn't solve the problem at all because the settings are still missing..
At the end it costs lifetime do work out the solution even if it's clear to you.

Ole
 

olepinguin

Dabbler
Joined
Apr 10, 2022
Messages
10
I just did this and had to use the CLI shell to manually configure it. it wouldnt work via the GUI. but it seems to have worked properly in CLI. just add the interface to the bridge (br0), then add the ip to the bridge in console.
thanks, but just for clarification: the CLI is that you are talking about is the one, that can be reach after boot sequence directly on the host. There you have the option (1) to change and configure the network. Configure create a br0 with IP of the host, ensure original network adapter doesn't1 hold the host IP as well by eddying the network adapter via menu.

Ole
 

sammael

Explorer
Joined
May 15, 2017
Messages
76
Hi, could anyone please elaborate on the steps how to do this in the CLI interface (I've no idea what I'm doing there). I have a bond0 interface with 6 members which is bound to 192.168.1.181 and then I got a vm that is also using bond0 which makes everything works everywhere apart from the vm and truenas not being able to see each other. So far everything I tried in ui or cli just kills network until it rolls back.

So I gather I have to make new interface br0, add the bond0 to it, remove the ip from bond0 and add the ip to br0, then attach vm to br0. Trying to do that in ui I run into same issues as in above posts and I can't figure the commands in the CLI.

Thanks for any suggestions.
 

olepinguin

Dabbler
Joined
Apr 10, 2022
Messages
10
Hi, could anyone please elaborate on the steps how to do this in the CLI interface (I've no idea what I'm doing there). I have a bond0 interface with 6 members which is bound to 192.168.1.181 and then I got a vm that is also using bond0 which makes everything works everywhere apart from the vm and truenas not being able to see each other. So far everything I tried in ui or cli just kills network until it rolls back.

So I gather I have to make new interface br0, add the bond0 to it, remove the ip from bond0 and add the ip to br0, then attach vm to br0. Trying to do that in ui I run into same issues as in above posts and I can't figure the commands in the CLI.

Thanks for any suggestions.
as mentioned you need to go to the machine where TN is running on. NOT CLI (no ssh or shell on http GUI)
After reboot the screen will show theese opion (or erros) - you will see the following options
Inked20220410_100540_LI.jpg


after entering 1 for first option you will see the NW config, where you need to create / change the bridge (br0 in my case) that should be used for your VM. Assign the host IP and ensure the network adapter of the host (emp3s0 in my case) dosn't have assigned the same IP
20220410_100500.jpg


at the end of the day, if you switch back to your server GUI within the UI ist should be looks like that
20220410_104101.jpg
 

sammael

Explorer
Joined
May 15, 2017
Messages
76
Edit: I couldn't get it make it work, turns out the network needed more than the default 60sec to "settle". I forced it even with the lost network acces via ipmi kvm, and after some 3minutes everything came up and the ip is switched to br0 with bond0 being member of br0.

Thanks for the pics they helped me find where to look!
 
Last edited:

olepinguin

Dabbler
Joined
Apr 10, 2022
Messages
10
welcome - but to be honest, I also gave up.
at the end it costs to much lifetime for a simple default use case: access NFS on TN host form VM AND still have internet on host.
 

olepinguin

Dabbler
Joined
Apr 10, 2022
Messages
10
is there any support here by the guys how want to develop this further ? non administrated forum?

Anyway I got it to work !!
I used the instructions above
https://www.truenas.com/docs/scale/virtualization/accessingnasfromvm/

and did the same in the console.
BUT in my case it worked only with DHCP as described in the manual.
as I want to use a static IP finally I changed it afterwards to use a static IP -> uncheck DHCP and IP as alias in the bridge.

sorry, but what a ride..
 
Last edited:
Top