SOLVED KVM Guest Cannot Ping TrueNAS SCALE Host (or vice-versa)

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Hello,

I have the same problem, but when I try to test configuration the NAS become unreachable (The app on truenas are not accessible and the router doesn't see the NAS) and after 60 seconds Truenas revert the change and I can access to the NAS but the bridge disappear obviously.

I am in : TrueNAS-SCALE-21.08-BETA.1

Before the step 1:
View attachment 49398

Step 1: I uncheck DHCP
View attachment 49399

Step 2:
View attachment 49403
View attachment 49401


step 3:
View attachment 49402

I "Test Changes" and the I recover the access to the NAS 60 seconds later.

Do you think it's a bug or I miss something? (I have second NIC but I haven't free place on the router)
Same result for me from same steps.
 

SnoppyFloppy

Explorer
Joined
Jun 17, 2021
Messages
77
Hello,

I have the same problem, but when I try to test configuration the NAS become unreachable (The app on truenas are not accessible and the router doesn't see the NAS) and after 60 seconds Truenas revert the change and I can access to the NAS but the bridge disappear obviously.

I am in : TrueNAS-SCALE-21.08-BETA.1

Before the step 1:
View attachment 49398

Step 1: I uncheck DHCP
View attachment 49399

Step 2:
View attachment 49403
View attachment 49401


step 3:
View attachment 49402

I "Test Changes" and the I recover the access to the NAS 60 seconds later.

Do you think it's a bug or I miss something? (I have second NIC but I haven't free place on the router)

The procedure you've described, worked for me. After pressing "Test Changes" do you reload the browser-tab?

When I do that the page will load for maybe 40 sec. or so but at some point the UI will load and at that point I can save the changes.

If you just stay on the tab, it will just revert back after the 60 sec.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
This process works. While it's not impossible there's some unique factors in each setup that could cause problems behind the scenes with the middleware (i.e. bug) my guess is user error.

Ensure you're setting the bridge up correctly first. If you are assigning it a static ip (and you should) make sure you assign one correctly - I've seen a couple screenshots already where it appears the user is assigning the ip of their interface which was configured via dhcp - that could cause problems Make sure you use an ip that is outside of the range your DHCP server assigns, or has an exception made for it.

If the ip in turn is different from the one your current interface uses then obviously when you do the settings test you'll need to re-open the GUI from that ip in order to confirm the changes - you won't be automatically redirected.

It should be simple to do - I've done it multiple times on my test machines without issue. I haven't had to reboot or even restart the GUI, just remember to open a new page for the new ip since whenever I do this it's because my physical NIC was configured for dhcp and I assign my bridge a static one that is different.
 

JenJen

Dabbler
Joined
Jun 30, 2021
Messages
19
I verify and I linked the mac adress of the NIC to the adress IP I entered in the bridge.

I try to reload the brower-tab but nothing happen until 60 seconds.

Maybe it's my network configuration but I don't find what.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
I verify and I linked the mac adress of the NIC to the adress IP I entered in the bridge.

I try to reload the brower-tab but nothing happen until 60 seconds.

Maybe it's my network configuration but I don't find what.

Why not set the bridge to a different IP that is unused and when you test, open a new tab and browse to said ip?

If it works you can always try to set it back to the ip you want after.
 

JenJen

Dabbler
Joined
Jun 30, 2021
Messages
19
Why not set the bridge to a different IP that is unused and when you test, open a new tab and browse to said ip?

If it works you can always try to set it back to the ip you want after.

I already test this solution with an ip which is not include in DHCP range. I try to refresh the tab but the behaviour stays the same :(
I think I will open a bug in JIRA and I will use a long cable to try my second NIC.

Thanks for your help
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Ok, so I have the bridge working from ixian's advice (thanks :cool:), and the previous instructions from others in this thread (also many thanks). I did not use another IP - just the one in my first NIC as per previous instructions. In my case, however, creating the bridge did not function until, plugged into the console via usb and switched to that output on my monitor, I followed the console's output which urged me to type 'network interface checkin' (not 100% sure of this as I unfortunately did not write it down, but I think it's correct). Previously, not doing this simply resulted in the old interface configuration reappearing after a period of time in the GUI. Then the terminal outputted two lines:
Code:
[43821.91231] br0 post 1 (enp8s0) entered blocking state
[43821.91231] br0 post 1 (enp8s0) entered disabled state

I waited for quite a long time - maybe 20 minutes. The login page did not appear - tried different tabs - until I rebooted from the console terminal (is that tautologous?). Now my network interface shows that the bridge is operational with NIC1's original IP, NIC1 (enp8s0) is still there with no IP, and the second NIC is crossed out (still physically connected - see attached screenshots). I haven't yet taken ixian's advice to click the trash can to clear the config. Next I attached the VM to the bridge as in kewitt's step 4 and test pinging the host with success.
However, now I have no available application catalogs, they cannot be refreshed, and I am getting the following error:
Code:
Error: [EFAULT] Failed to clone 'https://github.com/truenas/charts.git' repository at '/mnt/ZIGNAS1/ix-applications/catalogs/github_com_truenas_charts_git_master' destination: Cmd('git') failed due to: exit code(128) cmdline: git clone -v https://github.com/truenas/charts.git /mnt/ZIGNAS1/ix-applications/catalogs/github_com_truenas_charts_git_master stderr: 'Cloning into '/mnt/ZIGNAS1/ix-applications/catalogs/github_com_truenas_charts_git_master'... fatal: unable to access 'https://github.com/truenas/charts.git/': Could not resolve host: github.com '

clearly, I think, indicating they do not have network access. I have tried different options in Advanced Settings - Kubernetes Settings (e.g. setting Route v4 Interface to bridge and original enp8s0 NIC, and the route v4 Gateway to the router's IP) with no success. In the Network Global Configuration I have set the Default IPv4 Gateway both the bridge IP and that of the router, equally with no success. Anyone have any suggestions?
 

Attachments

  • Interfaces.png
    Interfaces.png
    17.4 KB · Views: 370
  • Kubernettes-Settings.png
    Kubernettes-Settings.png
    20.2 KB · Views: 401

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
Hello,

I have the same problem, but when I try to test configuration the NAS become unreachable (The app on truenas are not accessible and the router doesn't see the NAS) and after 60 seconds Truenas revert the change and I can access to the NAS but the bridge disappear obviously.

I am in : TrueNAS-SCALE-21.08-BETA.1

Before the step 1:
View attachment 49398

Step 1: I uncheck DHCP
View attachment 49399

Step 2:
View attachment 49403
View attachment 49401


step 3:
View attachment 49402

I "Test Changes" and the I recover the access to the NAS 60 seconds later.

Do you think it's a bug or I miss something? (I have second NIC but I haven't free place on the router)

i've the exact same problem !!

So, i've tried to do one thing : remove dhcp from the NIC and set ip address. It don't work !
So i think the main problem is here
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
i've the exact same problem !!

So, i've tried to do one thing : remove dhcp from the NIC and set ip address. It don't work !
So i think the main problem is here
Did you follow the new documentation?
If you describe the setup and problem in detail, then people might find the issue.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
My network, eno1 connect to internet with public ip from dhcp hosting provider
1638760988018.png


Then i remove dhcp from eno1
1638761052066.png


Then create a new bridge
1638761237503.png


1638761268999.png


After click to "test change", ui is not reachable until 60 sec and so truenas rollback change...

It seems setting ip static does not work.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
Can you confirm you have set the IP gateway address correctly.

Its in the Global configuration. https://www.truenas.com/docs/scale/network/
You're totaly right, after setting the gateway, adding a new br0 was a success, THANKS !!

I'm still stuck as my VM don't have the same network (private) as my host public ip.

What is a good way to setup truenas with VM in private (ie: 192.168.x.x) access to internet via the public host ip and vice versa ?

Thanks !!
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What is a good way to setup truenas with VM in private (ie: 192.168.x.x) access to internet via the public host ip and vice versa ?
1. Probably nobody knows yet. TrueNAS SCALE is just to new, so you are probably the first person on this forum trying. You will have to figure out from fundamentals, i.e. an understanding of Linux networking in general. I did that for CORE and jails, but as I said - not VMs on SCALE.
2. You don't connect your SCALE appliance to the public Internet with a public IP address, do you? Please don't. The system is not build for that.
 

bfudn

Dabbler
Joined
Dec 2, 2021
Messages
13
1. Probably nobody knows yet. TrueNAS SCALE is just to new, so you are probably the first person on this forum trying. You will have to figure out from fundamentals, i.e. an understanding of Linux networking in general. I did that for CORE and jails, but as I said - not VMs on SCALE.
2. You don't connect your SCALE appliance to the public Internet with a public IP address, do you? Please don't. The system is not build for that.
You're right. I think TNS is too young and many things don't work as expect (VM or container) or don't work at all.
I've test debian11+cockpit+portainer which is the perfect fit that covers my needs.

Thanks
 

Griffen8280

Cadet
Joined
Jan 19, 2016
Messages
5
I am having this same issue on my setup. I have followed all the advice here however my system times out every single time and reverts the changes with no bridge. I have also followed the documentation posted by MorganL to the same result. I have tried fooling with it on the cli directly however that hasn't worked either, but that could be my error for sure there. Is there a CLI tutorial or method out there somewhere that you guys know of?
 

Griffen8280

Cadet
Joined
Jan 19, 2016
Messages
5
I am having this same issue on my setup. I have followed all the advice here however my system times out every single time and reverts the changes with no bridge. I have also followed the documentation posted by MorganL to the same result. I have tried fooling with it on the cli directly however that hasn't worked either, but that could be my error for sure there. Is there a CLI tutorial or method out there somewhere that you guys know of?
Figured out my own CLI work around. For whatever reason I could not get the GUI to perform these steps, I would get the "time out of death" others refer to here and it would never save my settings. Here is the CLI way to do it.

On the console:
  • Select option 1) Configure network interfaces
  • First run a
    Code:
    query
    to get the name of your physical interface (in my case it was enp7s0)
  • Then run:
    Code:
    delete enp7s0
    • Follow this up with
      Code:
      commit
    • I also ran
      Code:
      checkin
      just to make sure it was good, this should return <null>
  • Now we create the bridge with:
    Code:
    create name=br0 type=BRIDGE bridge_members=enp7s0 ipv4_dhcp=true aliases="192.168.X.X"
    • Follow this up with
      Code:
      commit
    • I also ran
      Code:
      checkin
      just to make sure it was good, this should return <null>
  • After this is complete you can run another
    Code:
    query
    to verify the bridge is there and enp7s0 is in it
  • Then type
    Code:
    exit
  • Select option 6) Reboot
When it finished rebooting it informed me that I could reach the box through the web interface at the IP I chose as the alias for the bridge above and a new IP that has been assigned to the physical NiC as well. Of course I don't use the second one as the Bridge IP is all I wanted but now my VMs can talk to and mount NFS shares no problem. I also tested that any Docker apps I had were also able to get out to the internet and the various internal TrueNAS operations could also get out to the internet (some were having issues with this?). Hope this helps someone else out there if the GUI just isn't working for you, use the most powerful of Linux tools.
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
Figured out my own CLI work around. For whatever reason I could not get the GUI to perform these steps, I would get the "time out of death" others refer to here and it would never save my settings. Here is the CLI way to do it.

On the console:
  • Select option 1) Configure network interfaces
  • First run a
    Code:
    query
    to get the name of your physical interface (in my case it was enp7s0)
  • Then run:
    Code:
    delete enp7s0
    • Follow this up with
      Code:
      commit
    • I also ran
      Code:
      checkin
      just to make sure it was good, this should return <null>
  • Now we create the bridge with:
    Code:
    create name=br0 type=BRIDGE bridge_members=enp7s0 ipv4_dhcp=true aliases="192.168.X.X"
    • Follow this up with
      Code:
      commit
    • I also ran
      Code:
      checkin
      just to make sure it was good, this should return <null>
  • After this is complete you can run another
    Code:
    query
    to verify the bridge is there and enp7s0 is in it
  • Then type
    Code:
    exit
  • Select option 6) Reboot
When it finished rebooting it informed me that I could reach the box through the web interface at the IP I chose as the alias for the bridge above and a new IP that has been assigned to the physical NiC as well. Of course I don't use the second one as the Bridge IP is all I wanted but now my VMs can talk to and mount NFS shares no problem. I also tested that any Docker apps I had were also able to get out to the internet and the various internal TrueNAS operations could also get out to the internet (some were having issues with this?). Hope this helps someone else out there if the GUI just isn't working for you, use the most powerful of Linux tools.

I'm having the exact same issue. Thanks for posting your solution.
In my case it's not working even with the command line.

When I delete my physical interface, it is not actually deleted (if I run 'query', it still appears on the list) so, when I create the bridge, I get an error because the IP address assigned to the bridge is already in use by another interface.

Any idea what I am doing wrong?

(My primary interface has address 10.10.10.102/24. I tried to change it to 10.10.10.102/32 via the web interface but I can't reconnect before 60 sec and the changes are reverted)

Thanks!
 

Griffen8280

Cadet
Joined
Jan 19, 2016
Messages
5
I've never seen a CLI command fail before. Have you tried restarting and attempting to run the commands again from a fresh boot? If that doesn't work then one of the devs/mods may have to weigh in on why commands aren't working on your setup.
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
At the end I managed to create the bridge. I had to set the primary interface to an IP external to my subnet.
This way, when I set the IP on the bridge, it does not complain about conflicts.

Everything seems to work, but I'm not sure if having an interface with a dummy IP will come back and bite me at a certain point.
 
Top