I have recently setup a system with TrueNAS scale and while it’s been mostly smooth sailing (lies), I can’t figure out why TrueNAS itself cannot connect to virtual machines and vice versa, which kinda sucks for me as I have a wireguard server setup on a virtual machine, which works but clients connecting to it cannot connect to anything hosted on the host itself…
(And the whole reason I have wireguard setup like this is because I couldn’t figure out how to setup the wg-quick app, it just refuses to work for unknown to me reasons… and by “work” I mean that the WG clients just cannot connect to it, the webui itself works).
The VMs are set with Virtio as their NIC and truenas itself is set to a static IP and can connect to everything else…
Any help would be appreciated…
Voroxpete@sh.itjust.works 11 months ago
From what I understand Scale uses libvirtd and KVM virtualization. You’re probably using the builtin virtio virtual network, which uses macvlan if I recall correctly. Anyway, because of the way it’s set up, communication between the VMs and the host is impossible. I’m guessing that what you need to do is create a bridge on the host, and then assign it directly to each of the VMs. That’s how it works with regular KVM anyway. If TrueNAS are doing something different that might throw a wrench.
Sethayy@sh.itjust.works 11 months ago
Though if you have hairpin mode on your router/switch I believe it works, just most not bought specific for it don’t have the option
kylian0087@lemmy.world 11 months ago
This is corect. You need too use a bridge for VMs to communicate with the host. Been doing it like this for about a year. Also i added a special bridge gave the bridge a static IP so i can connect VMs to things like network shares without any fysical network connectivity.