-
I've been trying to setup a macvlan network for my jail, but it just doesn't want to work and I can't figure out why. Should I see said interface listed when running I DO see the I previously tried to use macvlan in an ubuntu vm (on the same TrueNAS SCALE server) with docker and also struggled to get it to work. I ended up giving up and using ipvlan on dedicated physical NICs (so only one IP per MAC) but I'm fairly certain my Unifi switch can handle multiple MACs per physical NIC, and it would allow me to support a lot more containers without resorting to full ipvlan (multiple IPs per MAC) and basically turning my NAS into a router, which is NOT it's job. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
I don't think you need to do anything special other than creating the jail with the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I'm having a very similar problem, but I haven't created any datasets with the "Apps" Share Type. I've defined my jail to use macvlan networking, but it will not configure the interface properly. While creating the jail, it hangs for a while waiting for the network to come up, and then continues, but all the NIC: QNAP QXG-2G2T-I225 The interface I'm trying to use macvlan with has its IP address set via DHCP and I'd like my jail's IP address to be set via DHCP as well. I'm running a DHCP server on my OPNsense router. The only way I'm able to get internet connection within the jail is by running the following three commands inside the jail: ip a add 10.0.0.22/24
ifconfig mv-enp3s0 up
ip r add default via 10.0.0.1 dev mv-enp3s0 But this is obviously not being configured via DHCP like it should. I've attached a number of outputs and configs to this post. @Jip-Hop does anything obvious jump out at you in my logs? I'm happy to dig up anything else that might be useful. TrueNAS Scale Network Settings: docker_jail_config.txt
host_ip_a_output.txt
jail_ip_a_output.txt
jlmkr_create_output.txt
jlmkr_list_output.txt
jlmkr_start_output.txt
jlmkr_log_output.txt
docker_jail_config.txt |
Beta Was this translation helpful? Give feedback.
Solved!
It wasn't the NIC, or the drivers, or any of the configuration settings. It turns out that when you create a dataset and choose "apps" as the type, this somehow prevents systemd-nspawn from properly creating/enabling a macvlan interface. Without knowing what exactly is different about "apps" vs "generic", I couldn't possibly speculate further about what is actually causing the issue, but using "generic" seems to allow it to work as expected.