VM can't access Host IP - all other LAN addresses are fine

Darren David

Explorer
Joined
Feb 27, 2014
Messages
54
I'm in the process of migrating from TrueNAS Core to Scale, which so far has been pleasantly uncomplicated. I reconfigured all of my jails as Docker containers inside of an Ubuntu VM prior to the migration, and I'm now standing that VM up from within TrueNAS Scale while I slowly port each container over to natively-hosted TrueCharts. Ultimately I'll remove the VM, but in the meantime, I'd like to use it as a stopgap measure. Essentially - an Ubuntu VM running several Docker containers.

I've got the VM running, and I need to NFS mount some directories from the host TrueNAS machine so that everything works properly. However, for some reason I cannot reach the host IP from within the VM, and thus all of the NFS mounts are failing with "no route to host." I can, however, ping any other host on the network. I should also mention that SMB shares on the host machine are accessible from other machines on the network, so that's all good.

For reference, the VM IP is 10.0.1.244 and the host IP is 10.0.1.10.

Interface looks fine to me:

Code:
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:b6:fc:8c brd ff:ff:ff:ff:ff:ff
    altname enp0s3
    inet 10.0.1.244/24 brd 10.0.1.255 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fdd3:b745:fd7c:4b12:250:56ff:feb6:fc8c/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 1788sec preferred_lft 1788sec
    inet6 fe80::250:56ff:feb6:fc8c/64 scope link
       valid_lft forever preferred_lft forever


Routes look fine:

Code:
> ip route show
default via 10.0.1.1 dev ens3 proto static
10.0.1.0/24 dev ens3 proto kernel scope link src 10.0.1.244
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
172.21.0.0/16 dev br-310328aa2d70 proto kernel scope link src 172.21.0.1


I can also SSH into the VM and access Portainer, so I know connectivity in general is fine. Is there some reason why a VM wouldn't be able to reach the host machine?
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Yes, you need a bridge interface. Many posts in the forums on creating a bridge, how, etc.
 
Top