I don't have internet in my virtual machine linux

alberto2132

Dabbler
Joined
Mar 30, 2023
Messages
28
I just installed a virtual machine inside the Truenas Scale and I have a network problem. My vm does not have internet and I don't know why, here I leave the screenshots of my configuration.
1685990099097-png.67136
1685990375780-png.67140
1685990166174-png.67138
1685990217374-png.67139
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The reason you aren't finding any help here is that you haven't given nearly enough information about your hardware for people to suggest what might be the problem.

If you follow the forum rules and specify things like your motherboard model, network cards and other controllers, then describe how it's all connected, including how you've connected the Network Interfaces in the GUI, perhaps we can suggest something to try or even to fix it.
 

unseen

Contributor
Joined
Aug 25, 2017
Messages
103
Plus, the question is about TrueNAS SCALE but this section is for TrueNAS CORE.

Maybe a moderator could move the question to the correct section of the forum?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I see no mention of a bridge in here. Typically you need a bridge, which is like an ethernet switch in software, so that the physical ethernet port on your NAS is shared with both the NAS kernel of the physical host but also it can be tapped into to allow VM's to access the physical ethernet port as well.

The problem is that this is mildly complicated to set up. I expect something like this would work:

1) Create a bridge

2) Remove the IP address from your primary interface, and apply that change

3) Assign that primary interface as a member of the bridge

4) Assign the IP formerly on the physical interface to the bridge interface, and apply that change

5) Test network changes (might take awhile, you need to be able to confirm the change relatively quickly)

6) Under virtualization, you should have an option to set the VM's ethernet interface to brX.

The problem is that you're doing brain surgery on self, so I'm not clear on what the easiest method to get through this actually is. Removing the IP address of the primary interface is the procedurally correct thing to do, but it means you may lose connectivity to the NAS. If you have a second physical ethernet port on the server, I would set that up temporarily as a management interface and do it that way; that should work trouble-free.

I realized I don't have any recent vintage of SCALE around here to try any of this out. I'll see if I can get around to fixing that later this morning.
 

alberto2132

Dabbler
Joined
Mar 30, 2023
Messages
28
I see no mention of a bridge in here. Typically you need a bridge, which is like an ethernet switch in software, so that the physical ethernet port on your NAS is shared with both the NAS kernel of the physical host but also it can be tapped into to allow VM's to access the physical ethernet port as well.

The problem is that this is mildly complicated to set up. I expect something like this would work:

1) Create a bridge

2) Remove the IP address from your primary interface, and apply that change

3) Assign that primary interface as a member of the bridge

4) Assign the IP formerly on the physical interface to the bridge interface, and apply that change

5) Test network changes (might take awhile, you need to be able to confirm the change relatively quickly)

6) Under virtualization, you should have an option to set the VM's ethernet interface to brX.

The problem is that you're doing brain surgery on self, so I'm not clear on what the easiest method to get through this actually is. Removing the IP address of the primary interface is the procedurally correct thing to do, but it means you may lose connectivity to the NAS. If you have a second physical ethernet port on the server, I would set that up temporarily as a management interface and do it that way; that should work trouble-free.

I realized I don't have any recent vintage of SCALE around here to try any of this out. I'll see if I can get around to fixing that later this morning.
It doesn't work for me, I have followed this video https://www.youtube.com/watch?v=7clQw132w58&ab_channel=Haydn-San . when I have configured everything and I give it to test changes, when it comes out: "Connecting to TrueNas... make sure that the TrueNas system is turned on and connected to the network" I don't get that, I load it and after a minute I get: waiting for the active truenas driver to appear, and then I enter the network administration, but nothing has changed, I only get the interface I had before, that is, the changes are not applied to me.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
It doesn't work for me, I have followed this video https://www.youtube.com/watch?v=7clQw132w58&ab_channel=Haydn-San . when I have configured everything and I give it to test changes, when it comes out: "Connecting to TrueNas... make sure that the TrueNas system is turned on and connected to the network" I don't get that, I load it and after a minute I get: waiting for the active truenas driver to appear, and then I enter the network administration, but nothing has changed, I only get the interface I had before, that is, the changes are not applied to me.
If you set a physical NIC as a bridge member in the Scale 'add a bridge' dialogue, is that NIC automatically set in promiscuous mode, or is there a way to set promiscuous mode so it actually passes relevant packets to the bridge?
 

alberto2132

Dabbler
Joined
Mar 30, 2023
Messages
28
If you set a physical NIC as a bridge member in the Scale 'add a bridge' dialogue, is that NIC automatically set in promiscuous mode, or is there a way to set promiscuous mode so it actually passes relevant packets to the bridge?
What? I don't know what you want to tell me?
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
It was a question, but also a possible reason a bridge might not work. I'm about to set one up, I was just hoping someone who already had would comment.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
It was a question, but also a possible reason a bridge might not work. I'm about to set one up, I was just hoping someone who already had would comment.
Well the bridge did work as suggested in the YouTube video quoted above, and it seems to work without setting promiscuous mode, so I am not sure how the physical NIC knows to pass packets to the bridge MAC address; but it does.

I suggest you go through the video again paying particular attention as to when, and when not, to "test changes" . It is important to save the bridge without an IP address and without a bridge member, and test changes. But then to modify the bridge to add the above two, save it but don't test changes, then remove the IP from the NIC, save that and test both changes together. Provided you can get back into the UI within one minute it should be possible to save the changes.

Actually, I think the time to wait before changes revert can be configures somewhere, and that could help!
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
And another useful point if you want to ssh into the server. SSH saves it's listening addresses as NIC names rather than IP addresses and you have to add the bridge, in an ssh config submenu, and restart ssh service to get ssh to listen on the bridge address, even if the actual IP is unchanged.
 

alberto2132

Dabbler
Joined
Mar 30, 2023
Messages
28
Well the bridge did work as suggested in the YouTube video quoted above, and it seems to work without setting promiscuous mode, so I am not sure how the physical NIC knows to pass packets to the bridge MAC address; but it does.

I suggest you go through the video again paying particular attention as to when, and when not, to "test changes" . It is important to save the bridge without an IP address and without a bridge member, and test changes. But then to modify the bridge to add the above two, save it but don't test changes, then remove the IP from the NIC, save that and test both changes together. Provided you can get back into the UI within one minute it should be possible to save the changes.

Actually, I think the time to wait before changes revert can be configures somewhere, and that could help!
In VirtualBox, do I have to add any more network interface? I'm doing it like in the video and it doesn't work.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I think the video, and my setup, relates to bare metal TrueNAS, so, sorry, I don't know about VirtualBox.
 
Top