No network access from VM

dsouleles

Dabbler
Joined
Nov 4, 2012
Messages
19
Update - the lack of network access from the UBUNTU VM turned out to be a problem with the UBUNTU install. It had the incorrect NIC listed in the /etc/netplan configuration file. Specifically, it had enp0s5 listed when the correct NIC is enp0s4. I found a description of this problem on the UBUNTU forum. I do not know why it happened or what one can do during the install to prevent it. But I thought I would leave this here in case others have the same problem. I wasted an afternoon chasing down what I thought was a Truenas VM / networking problem. It may still be - but I am not knowledgeable enough to diagnose it further. Perhaps someone here can shed light,
Dean
**************
Hello,

I'm using TrueNAS Core 13.0-U5.2. I have attempted to install UBUNTU server 22.04.2 LTS in a VM. The server installs ok but after reboot there is no network access from the VM.

Here is the result of ":ip a"

VM IP A.jpg

Here is the VM NIC configuration:
VM NIC.jpg


Here is the VM Devices:
VM Devices.jpg

Here is the TrueNAS NIC configuration:
TN NIC.jpg


I have an older ubuntu server VM installed and running fine. It has been running pi-hole for years. I have also previously installed other VMS including mint linux and not had this problem,

Any suggestions or hints would be very much appreciated.

Regards,
Dean
 
Last edited:

TN68

Dabbler
Joined
Sep 24, 2022
Messages
31
This happened to me too; thanks for the tip to resolve it! Once you know something about the error it's then easier to find information about it.

It looks like there are recurring posts about this... major posts in '17, '19, '20, this one in '23. It seems related to removing the CDROM device after installing the VM, instead of deleting the path to the .ISO and leaving the CDROM device intact?

https://www.truenas.com/community/t...p0s4-not-assigned-dynamic-ipv4-address.90514/
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Ubuntu and probably other distributions seem to name their network interfaces according to their connection to the PCI bus - which changes if you remove devices. I have been giving that exact same advice - edit /etc/netplan/somethingsomething - on numerous occasions and always considered the problem to be rather trivial/obvious. I mean, login via console, check available network interfaces, compare with current configuration - all very basic sysadmin stuff.

What's your idea about making this easier for new users? Obviously there is nothing on the TrueNAS code side that could be changed. Ubuntu does as Ubuntu does inside the VM.

Any suggestions?
 

TN68

Dabbler
Joined
Sep 24, 2022
Messages
31
The only idea I can think of is a warning on the TrueNAS side, like a warning prompt when you delete the VM CDROM device that says "Warning: Removing the CDROM device may break network connectivity, consider removing the file path instead."; It may be annoying to experienced users, but would help rookies.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
In a FreeBSD or Windows VM no such thing happens. This is purely a Linux issue and possibly not even present in all distros.
 
Top