Complete Guide to TrueNAS CORE Virtualisation Under Proxmox
Complete Guide: Step 2 - Setup Proxmox Networking
Ideally you want to pass through the network card directory into your VM. Unfortunately I cannot do so because the PCI-e slot on my network card is in IOMMU group 1, and that group includes the Realtek controller. Direct passthrough of the network controller might also prevent Proxmox firewall from filtering the network traffic.
This is how I expose the two 10Gbps network connections into the TrueNAS VM. I am going to use Open VSwitch, and the VM is going to have 3 network interfaces. Note ports 2 and 3 are entirely optional, you can do everything from a single network card. As you would have guessed my home network has multiple networks (one network for management only, for IoT, for music streaming, for general use, and so on). Adjust your configuration as needed.
- enp5s0 (On board Ethernet). This should already be setup to point to your Proxmox IP. In my setup this network connection is going to be dedicated for management duties. i.e. The management IP of both Proxmox and TrueNAS administration portals will be via this dedicated network connection. This will be connected to the switch but only one network (or subnet) will be served.
- enp4s0 (Chelsio network, port #0). Passing this into TrueNAS VM. This is a dedicated 10 Gbps port connecting to my other Proxmox node. This is a direct connection to another computer and that is the only two machines on it’s own isolated network.
- enp4s0d1 (Chelsio network, port #1). Passing this into TrueNAS VM. This is a dedicated 10 Gbps port dedicated to file sharing. This port will be connected to the switch but it will be served multiple subnets (Tagged VLANs).
Follow my examples and adapt accordingly, you can always revert to the original Linux bridge setup if you make a mistake by running this command:
cp ~/interfaces /etc/network/interfaces && ifreload -a
Open VSwitch Configuration
It is very important to NOT apply your network settings until the very last step. Applying your network configuration too early may cut your link to your Proxmox host.
First, delete all existing Linux bridges (You should have vmbr0).
Re-create vmbr0 as an OVS Bridge and link it to your onboard Ethernet (enp5s0 in my example):
Create a OVS IntPort and link it to vmbr0, assign a static IP to your Proxmox host. This will be the IP of your Proxmox management interface (the very WebGUI you’re currently on).
At this stage you may want to apply your network configuration and make sure you didn’t break anything. The ifupdown2 package you’ve installed previously should simply apply all these changes without a reboot.
If everything works you can still access the admin panel on the network. Revert your old network configuration if you can’t.
Next you want to setup your additional network ports for your NAS. One Open VSwitch bridge per additional network port:
This bridge will not have any IP address as Proxmox does not need any IP address for this network. If you need an IP address for this, create a OVSInt port, assign it to this new bridge and give it an IP address.
Note I prefer to use Jumbo frames so the MTU for the bridge and it’s OVS Ports are all set to 9000 (you can also try 9216). Do not change MTU if you have not enable Jumbo Frames on your switches/router.
If you are using Gigabit network ports it may be ideal to bond them into a single interface and present them to TrueNAS as one (and let Proxmox and your switch handle the physical layer), like so.
Enter all the OVS ports you want for the bond, and adjust your switch configuration to match. Repeat this step until you configured all your network ports. here is my example setup:
You can read the Proxmox Networking configuration page if you need more advance features.
You’re now ready to setup your TrueNAS VM, go to the next step.