Posted in

I turned this NAS into a Proxmox home server, and TrueNAS inside a VM solved my…

The topic I turned this NAS into a Proxmox home server, and TrueNAS inside a VM solved my… is currently the subject of lively discussion — readers and analysts are keeping a close eye on developments.

This is taking place in a dynamic environment: companies’ decisions and competitors’ reactions can quickly change the picture.

Besides the importance of backups, one of the most essential lessons I learned as a fledgling home labber was that I shouldn’t rely on a single experimental node when running mission-critical services. After all, one botched project is more than enough to bring my entire networking stack to its knees. This also extends to my storage server, which is why I’ve always claimed that it’s not a good idea to host backup services and Proxmox on the same machine, especially if you’re as fond of working on weird projects that can potentially bring down the server as I am.

That said, as long as I avoid running wacky experiments on my PVE node, hosting a TrueNAS instance on the same machine shouldn’t be that big of a deal. Since I recently received a TerraMaster F4-425 Pro, which has some powerful specifications for the price, I figured I could put it to good use as a Proxmox-TrueNAS hybrid. Now that I have completed this project, I have to admit that I was wrong about virtualized TrueNAS setups.

About this article: TerraMaster sent me the F4-425 Pro, but the company had no input into this article’s contents. If anything, it’s a fun shower thought that I ended up turning into a project.

Let me make this clear: TrueNAS is more useful than ever for all-in-one home servers, especially since recent updates buffed its virtualization and LXC-hosting capabilities. That said, it’s still lacking many of the advanced network tools, (free) first-party utilities, and (most importantly) community support that Proxmox is famous for. So, even if I could run virtual machines and containers directly on TrueNAS, I’d still want to use Proxmox for my server tasks.

Meanwhile, it’s technically possible to turn Proxmox into a makeshift NAS server without relying on any LXCs or VMs, but between the risks associated with modifying the host machine with extra packages that may get broken in future updates and the lack of dedicated data protection tools, I’d prefer using a virtualized TrueNAS instance.

Not to mention, the NAS chassis in question has an 8-core, 8-thread N350 processor alongside 16GB of RAM, two 5GbE ports, and three M.2 NVMe drive slots, so I’d rather utilize the full extent of its hardware for my self-hosting tasks instead of letting it run simple backup and data archival tasks. Attempting to run just Proxmox or TrueNAS would cause these bulky specifications to go unutilized, making a hybrid setup ideal for this rig.

If you’ve ever looked at forum posts about virtualized NAS setups, you’d often hear folks mention that adding your physical drives as virtual disks is a bad idea, and there’s a lot of truth to that. Unlike a bare-metal setup, passing full-on drives as virtual disks will add an abstraction layer, one that can hurt performance. Considering that ZFS (the file system used by TrueNAS) favors direct access to the hard drives, the abstraction layer might change the order of writes, which could cause the entire setup to fail out of nowhere.

So, my game plan was to install Proxmox on an NVMe drive, leave the other two M.2 slots free for my PVE virtual guests, and pass the SATA controller to the TrueNAS VM to let it control the hard drives. As always, configuring Proxmox was a piece of cake, though I had to disable the toggle to auto-boot into TOS 7 within the F4-425 Pro’s BIOS.

Once I’d gotten Proxmox up and running, I quickly spun up a new virtual machine for TrueNAS. Since I already had plans to pass the SATA controller to my TrueNAS instance, I created a new virtual disk on my NVMe local-lvm pool as the installation disk for the virtualized storage server. That way, I wouldn’t end up wasting an entire SSD as the boot drive, and if things went south with this virtual disk later, I could spin up a new TrueNAS instance and point it to the HDDs to recover my storage pools without any issues.

With TrueNAS installed, I began tweaking the config files to pass my SATA controller to the VM. I was a bit apprehensive about the IOMMU provisions on this NAS, as the dmesg | grep -e DMAR -e IOMMU command almost confirmed that the Input-Output Memory Management Unit was working, but never explicitly gave the “DMAR: IOMMU enabled” message. Regardless, I began following the PCI passthrough guide I’d written a long time ago, which worked pretty well.

If you want a short version, then I first added intel_iommu=on after the quiet flag in the GRUB_CMDLINE_LINUX_DEFAULT=”quiet” line to the /etc/default/grub config file before running update-grub. Then, I modified the /etc/modules file by adding the following parameters to it:

Finally, I grabbed the device IDs for my SATA controllers using the lspci -nn command and added them to /etc/modprobe.d/vfio.conf via options vfio-pci ids=Device_1,Device_2. Yes, I meant the plural version of SATA controller, as passing just one of them would cause TrueNAS to ignore two of my drive bays. I manually added the SATA controllers to my TrueNAS VM via the hardware tab and, sure enough, the virtualized distro was detecting the HDDs alongside their S.M.A.R.T. statistics.

Once I’d configured the rest of the storage pools, I moved some archived media to my freshly configured NAS before creating some Kopia pipelines for my MacBook and Windows 11 PC. And thanks to the 5GbE port on the F4-425 Pro, I didn’t have to worry about the transfer speeds.

Switching gears to the Proxmox side of things, I began spinning up a handful of services inside LXCs. for example, TrueNAS still doesn’t have a CasaOS template, so I spun up a new PVE LXC using the Proxmox VE Helper Scripts repo. Likewise, I created a Debian LXC with iGPU passthrough provisions just so I could run some edge LLMs on it, alongside a Jellyfin container that can also harness the N350’s Quick Sync functionality. I’ve had some issues passing iGPUs to apps on TrueNAS in the past, so I plan to leave the Proxmox side in charge of these services. I also configured Home Assistant inside a virtual machine, so I could migrate my current HASS instance to this NAS. Although I ended up overprovisioning the CPU cores and TrueNAS immediately hogged all the RAM I allocated to it, the F4-425 Pro handles everything like a champ.

I’ve been using this hybrid setup for well over a few weeks now, and I have yet to encounter any performance or stability issues. While I still believe keeping Proxox and TrueNAS on entirely different machines is ideal for experimental home labs where uptime is more important than everything else, I’ll admit that a virtualized TrueNAS instance works really well on PVE, provided you pass the entire SATA controller(s) to it.