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

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
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
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
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

Wizard
Joined
Mar 20, 2017
Messages
1,288
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
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
Thank you chris, following your steps solved my problem.
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
Btw is it possible to create this as issue for Freenas developers so they are aware of this? Normal user shouldnt go through this much hassle.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
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:

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
BTW I'm using Freenas 11.2-U5
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@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.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
@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.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
@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

Wizard
Joined
Mar 20, 2017
Messages
1,288
VM a ip address on same subnet as FreeNAS host? VM NI type virtio?
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
@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.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
No luck changing the adapter type to Virt IO
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I don't have any !0GBe kit, I don't have other ideas right now apart from using/testing an ubuntu server install.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
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
 

RosePeach

Cadet
Joined
Dec 27, 2019
Messages
5
Hi, I am having the same problem after removing the CDROM device. I am running Centos 8 and I can't find the /etc/netplan directory and files that you talk about. Could you help me fix this problem for Centos?
 

beltet

Dabbler
Joined
Sep 24, 2013
Messages
26
@KrisBee
Thanks for your answer. It has helped me two times now(forgot how to do it since first time...)
Thanks!
 

Beerman81

Cadet
Joined
Apr 19, 2020
Messages
1
I followed the instructions in your post (THANKS), and the VM is clearly connected to the internet, because i can update it and ping IPv4 addresses. However, something on the IPv6 side is broken, because when i ping one of those it times out. Before i deploy this VM into action, I would like to fix this or disable IPv6 entirely.

1588662460912.png


1588662386593.png


1588662566080.png


1588662648473.png


1588662701161.png
 
Top