VM cannot connect to host SMB

NathanG

Cadet
Joined
Apr 26, 2021
Messages
3
Hi, Now I am using truenas scale 21.04 and trying to create a shared folder in VM. However, in the windows 10 VM, I cannot connect to host smb or ping the host's IP. Is there any methods to solve this problem or build shared folders in the VM?
 

cpu2k6

Dabbler
Joined
Apr 11, 2020
Messages
12
Hi,
Had the same issue.
1. Create new Network interface, Type bridge. Select your main Interface as a member.
2. Test, and Save it.
3. Delete IP Adress from your main Interface, and give it to newly created bridge interface.
4. Test, and Save it.
5. Turn off your VM.
6. Edit your VM config, so that it uses the bridge interace.
6. Turn your VM back on.

hope it helps
 

NathanG

Cadet
Joined
Apr 26, 2021
Messages
3
I fixed this issue by creating a new bridge in the network setting and give this bridge a new IP like 192.168.100.2 (no need to bind this to a physical adaptor, just an empty bridge). Then I added this bridge as a device to the VM. Now in the VM, there are two network devices, one you use to connect to the internet and the other one is the bridge. As you set the bridge device in the VM with the same IP segment of the bridge as 192.168.100.3 you could access the smb using the bridge IP (192.168.100.2).
 

ptyork

Dabbler
Joined
Jun 23, 2021
Messages
32
I could never get cpu2k6's solution to work (can't get past step 4), but Nathan's does (fake bridge + set static IP on guest's second virtual NIC).

This is all voodoo magic to me. Any idea why this doesn't work to start with? I.e., why can't the host and guest see each other even though they are on the same subnet and they are both visible to external clients??

Regardless, this capability seems like a core use case for SCALE. Storage hosted by TNS and shared with virtualized guests via NFS or SMB. I'd think they'd want to to "just work" out of the box.
 

oumpa31

Patron
Joined
Apr 7, 2015
Messages
253
I'm having the same issues. I'll have to try this tomorrow
 

Muddro

Explorer
Joined
Oct 6, 2014
Messages
59
I have not been able to get this to work on beta. I made a new bridge interface, once while adding main as a member and another with it empty, go to test it, and then i am no longer able to access the NAS. I need to reboot to restore settings.
 

oumpa31

Patron
Joined
Apr 7, 2015
Messages
253
I have not been able to get this to work on beta. I made a new bridge interface, once while adding main as a member and another with it empty, go to test it, and then i am no longer able to access the NAS. I need to reboot to restore settings.
i think you did something wrong mine worked like a charm. the only issue im having is VNC Viewer wont reconnet to the view if you close it out
 

Muddro

Explorer
Joined
Oct 6, 2014
Messages
59
i think you did something wrong mine worked like a charm. the only issue im having is VNC Viewer wont reconnet to the view if you close it out
I don't know. I can't get past the first step of creating the interface. It freezes up on the test phase
 

oumpa31

Patron
Joined
Apr 7, 2015
Messages
253
I don't know. I can't get past the first step of creating the interface. It freezes up on the test phase
I see when I had that happen to me I needed to change the NIC port I was connected to on my server. It was acting like the port died. If you have more than one port try changing the connection.
Which method are you using? I set mine up like this.
1. Create new Network interface, Type bridge. and give this bridge a new IP like 192.168.100.2 (no need to bind this to a physical adaptor, just an empty bridge)
2. Test, and Save it.
3. Turn off your VM.
4. Edit your VM devices. add this bridge as a device to the VM as just another NIC.
5. Turn your VM back on.
6. Now in the VM, there are two network devices. set the static address on the bridge to 192.168.100.3 with 192.168.100.1 as the default route.
7. now you should be able to connect to the SMB shares at 192.168.100.2
 
Last edited:

manzomanze

Dabbler
Joined
May 3, 2021
Messages
13
After some troubleshooting i was able to create the bridge and reach the host but i was unable to reach any service running in the containers, it is like the vm is unable to reach those ports.
For example i have radarr running at 192.168.0.242:9078, it is reachable from other hosts however when i try to reach to it from the vm it is unreachable even if the true nas host pings at 192.168.100.2.
I may be hijacking a bit too much this post, i don't want to pollute the thread, should i make a different thread for this issue?
 

Muddro

Explorer
Joined
Oct 6, 2014
Messages
59
I see when I had that happen to me I needed to change the NIC port I was connected to on my server. It was acting like the port died. If you have more than one port try changing the connection.
Which method are you using? I set mine up like this.
1. Create new Network interface, Type bridge. and give this bridge a new IP like 192.168.100.2 (no need to bind this to a physical adaptor, just an empty bridge)
2. Test, and Save it.
3. Turn off your VM.
4. Edit your VM devices. add this bridge as a device to the VM as just another NIC.
5. Turn your VM back on.
6. Now in the VM, there are two network devices. set the static address on the bridge to 192.168.100.3 with 192.168.100.1 as the default route.
7. now you should be able to connect to the SMB shares at 192.168.100.2

I'll try again tomorrow, but every time I've tried could not get past the test phase and set it up as you described. Hangs and then need to reboot to get back in the ui
 

Victor-Zorro

Cadet
Joined
Oct 30, 2020
Messages
9
Can you look in network config - global settings if outbound network is set to allow all, or allow specific?
I noticed that if it is set to specific, it also appends to vm's outbound capabilitys
 

BirdBare

Cadet
Joined
Nov 6, 2021
Messages
7
I see when I had that happen to me I needed to change the NIC port I was connected to on my server. It was acting like the port died. If you have more than one port try changing the connection.
Which method are you using? I set mine up like this.
1. Create new Network interface, Type bridge. and give this bridge a new IP like 192.168.100.2 (no need to bind this to a physical adaptor, just an empty bridge)
2. Test, and Save it.
3. Turn off your VM.
4. Edit your VM devices. add this bridge as a device to the VM as just another NIC.
5. Turn your VM back on.
6. Now in the VM, there are two network devices. set the static address on the bridge to 192.168.100.3 with 192.168.100.1 as the default route.
7. now you should be able to connect to the SMB shares at 192.168.100.2

Howdy, do you have to put the bridge interface on a new subnet? I have mine on 23 instead of 24. For some reason I still can't access the SMB shares.

Any thoughts?
 

physicsme

Cadet
Joined
Jun 26, 2022
Messages
2
I see when I had that happen to me I needed to change the NIC port I was connected to on my server. It was acting like the port died. If you have more than one port try changing the connection.
Which method are you using? I set mine up like this.
1. Create new Network interface, Type bridge. and give this bridge a new IP like 192.168.100.2 (no need to bind this to a physical adaptor, just an empty bridge)
2. Test, and Save it.
3. Turn off your VM.
4. Edit your VM devices. add this bridge as a device to the VM as just another NIC.
5. Turn your VM back on.
6. Now in the VM, there are two network devices. set the static address on the bridge to 192.168.100.3 with 192.168.100.1 as the default route.
7. now you should be able to connect to the SMB shares at 192.168.100.2
I had same problem, VM can see all other machines on the same network but not the TrueNAS host itself.
Tried your method. Unfortunately it didn't work.
In linux VM the newly added NIC would be down on system boot. When I manually set it to "up" using ifconfig, it only gets ipv6 address.
In windows VM pretty much the same, the newly added NIC is recognized by windows but also only gets ipv6 address.
Neither can see TrueNAS host with new NIC.
 

physicsme

Cadet
Joined
Jun 26, 2022
Messages
2
I had same problem, VM can see all other machines on the same network but not the TrueNAS host itself.
Tried your method. Unfortunately it didn't work.
In linux VM the newly added NIC would be down on system boot. When I manually set it to "up" using ifconfig, it only gets ipv6 address.
In windows VM pretty much the same, the newly added NIC is recognized by windows but also only gets ipv6 address.
Neither can see TrueNAS host with new NIC.
Update:
I seem to have resolve the issue now. But it's setting the original NIC as a member of the bridge and giving the bridge the old IP address the original NIC had.
It took a system reboot of the TrueNAS host for the bridge to get connection. And then it needs some more tinkering (setting up dns server and default gateway for the bridge) for Kubernetes to get back online.
 

aztm22

Cadet
Joined
May 19, 2023
Messages
1
I see when I had that happen to me I needed to change the NIC port I was connected to on my server. It was acting like the port died. If you have more than one port try changing the connection.
Which method are you using? I set mine up like this.
1. Create new Network interface, Type bridge. and give this bridge a new IP like 192.168.100.2 (no need to bind this to a physical adaptor, just an empty bridge)
2. Test, and Save it.
3. Turn off your VM.
4. Edit your VM devices. add this bridge as a device to the VM as just another NIC.
5. Turn your VM back on.
6. Now in the VM, there are two network devices. set the static address on the bridge to 192.168.100.3 with 192.168.100.1 as the default route.
7. now you should be able to connect to the SMB shares at 192.168.100.2

done it and it works perfect
 

marcnz

Cadet
Joined
Dec 23, 2023
Messages
4
I must be doing something wrong as I really can't get this solution from upmpa31 to work.
Here are my IPs:
Truenas host: 192.168.1.70
Windows VM: 192.168.1.71
The VM has currently 1 NIC device (eno1) > Set as Static IP in VM as 192.168.1.71/24 with GTW: 192.168.1.1 and DNS: 192.1687.1.1

Following the instructions, I created a new bridge interface in Truenas:
Name: br0
When trying to set an IP Address via "Add Aliase": 192.168.1.61 I can't SAVE. It just stays there forever until I click anywhere else and it goes away without any change to test. I can save it if I set it up with DHCP.
I must keep my host IP with static as 192.168.1.70 and if I bind the eno1 interface to it, nothing works. my Plex is out of whack and so are my other applications sucha s nextcloud.
If someone can provide a very detailed solution, that would be greatly appreciated.
Networking has always been some kind of black magic to me... I can understand a few terms, but how they interact with each other always gives me headaches.
 
Top