Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

SOLVED FreeNAS-11.2-U3 - Ubuntu 18.04 server in VM has no internet access.

Joined
Mar 17, 2019
Messages
11
Thanks
4
#1
Hello good people, I installed Ubuntu server 18.04.2 in VM on FreeNAS-11.2-U3 (my first and fresh FreeNAS install) and it has no internet connection from inside. So I probably need to do something with network settings? I am really lame with network things, I hoped that this would all work automatically :(
Is there a step by step tutorial or someone who could help me with this please?

Thanks
urza
 
Joined
Mar 17, 2019
Messages
11
Thanks
4
#2
To add: I read the Documentation chapter of Virutal Machines.

My VM has one NIC in devices that looks like this:
1555322529991.png


- I tried to change the adapter type to the "Intel e82545 (e1000)" but no change.

From Ubuntu (using VNC) it if I run ifconfig:

1555322725103.png
 

KrisBee

FreeNAS Guru
Joined
Mar 20, 2017
Messages
877
Thanks
272
#3
Use IP a in your Ubuntu VM, and it will probably show something like this:

u18_net1.jpeg


What ever connection you set up during the install (dhcp or static IP), it has been lost on the first boot. This happens because to boot the VM you have to remove the CDROM device, and when you remove the cdrom device the bhyve slot used by the NIC device changes. Inside the VM this changes the "predictable network interface name" from say enp0s5 to enp0s4.

You will need to re-configure the network inside the VM, for example:

u18-net2.jpeg


In this case, just edit appropriate netplan file to change the "predictable network interface name" to enp0s4 and restart the network , for example using a combo of sed & netplan apply:

u18-net3.jpeg
 
Joined
Mar 17, 2019
Messages
11
Thanks
4
#5
Btw is it possible to create this as issue for Freenas developers so they are aware of this? Normal user shouldn't go through this much hassle.
 
Joined
May 22, 2017
Messages
39
Thanks
1
#6
Hi,

I am having this same issues, but @KrisBee's solution did not exactly work for me. Here is what I've done:

When I use IP a:

1564980445703.png


So then I navigate to /etc/netplan and do the command ls -l as @KrisBee did and I get:

1564980572352.png



My file is named different from @KrisBee so I do command cat 01-network-manager-all.yaml on my file in that folder and I get:

1564980705412.png


This kind of leaves me at a loss because I'm not sure how to use the commands sed and net apply when my file isn't showing any of those details or settings i can reconfigure. I did try to ADD those lines with nano -w 01-network-manager-all.yaml but it did not work for me.

Can anyone help?
 
Last edited:
Joined
May 22, 2017
Messages
39
Thanks
1
#7
BTW I'm using Freenas 11.2-U5
 

KrisBee

FreeNAS Guru
Joined
Mar 20, 2017
Messages
877
Thanks
272
#8
@MauricioU Servcer Did you install server of desktop Ubuntu in your VM? It lloks like a desktp install to me, in which case configure the VM network card from the GUI.
 
Joined
May 22, 2017
Messages
39
Thanks
1
#9
@KrisBee - Wow, you're right it is a desktop install. Could you give me a bit more direction in regards to what I can do? I went to the wired settings and I don't see anything that I can change. Where do I configure the VM network card from the gui?

I installed a new ubuntu 18.04 vm and internet was fine. As soon as I restarted my server same issue occurred in the new vm.
 
Joined
May 22, 2017
Messages
39
Thanks
1
#11
@KrisBee Thanks for looking into this. I already know how to set a static IP through the gui, I didn't know that's what you were referring to. I went through it anyways and set it exactly as it should be set and still nothing. I even followed the instructions of setting it in the interfaces file and still nothing. i restarted the system, i restarted the network card. i followed it to a T. still unable to connect
 

KrisBee

FreeNAS Guru
Joined
Mar 20, 2017
Messages
877
Thanks
272
#12
VM a IP address on same subnet as FreeNAS host? VM NI type virtio?
 
Joined
May 22, 2017
Messages
39
Thanks
1
#13
@KrisBee

Definitely on the same subnet as FreeNAS host.

In regards to the VM Adapter type is set as Intel e82545 (e1000). However, it has always been set like that and it has always worked, since FreeNAS 9 when I started using these ubuntu VMs. I suppose it doesnt hurt to try changing it to VirtIO.

I'll report what happens.
 
Joined
May 22, 2017
Messages
39
Thanks
1
#14
No luck changing the adapter type to Virt IO
 

KrisBee

FreeNAS Guru
Joined
Mar 20, 2017
Messages
877
Thanks
272
#15
I don't have any !0GBe kit, I don't have other ideas right now apart from using/testing an ubuntu server install.
 
Joined
May 22, 2017
Messages
39
Thanks
1
#16
Figured it out.

I have 2 nics in my system, a 1 gb nic with 2 ports and a 10 gb nic with 2 ports. The nic device for the VM was set to one of the 10 gb ports. Just to try things I changed it to one of the 1 gb ports and it all of a sudden worked.

However, the most confusing aspect of this is that the VM was ALWAYS set as one of the 10 gb ports. I know this sounds wrong but I know this because I messed with it a long time ago and it worked and I was confused as I didn't think it'd work but it did which is why I didn't think changing that would make a difference. Furthermore, when I installed another VM just to test this it was ALSO set to the 10 gb port by default and it worked just fine until I restarted the entire server.

So I'm a bit confused but it's working now.

Thanks for all the help! And if anyone runs into this issue with the Desktop version of Ubuntu and you have two nics installed, give it a shot! lol
 
Top