Building your network-attached storage (NAS) is a great way to create somewhere to stash files and backups, but it's also a platform for hosting services such as media streaming and even home surveillance. It's not the most efficient way of running services, however, compared to something like Proxmox. Proxmox is a fantastic virtualization platform that can handle anything you throw at it. This includes the aforementioned services, as well as NAS operating systems. Yes, you can run a NAS as a virtual instance through a VM. Here's why and how to do it.
Why virtualize instead of building a NAS?
It's easier, cheaper, and sometimes better
There are many reasons why virtualizing a NAS is better than building a device specifically for running a NAS OS. Firstly, there's no requirement to dedicate an entire machine to running just the NAS OS. Using software such as Proxmox, you can use the same system for other virtualized services and applications as well as running a NAS. It's possible to run VMs on some NAS OS but these would be Type-2 hypervisors and they're not too efficient, at least not compared to running such instances through Proxmox. It's also better suited for running countless Docker containers and applications.
Keeping everything together is a good idea for building out your home lab. Things can get messy, especially when diving deep into the home lab rabbit hole. Run a NAS, home automation, surveillance, game servers, media servers, and much more on the same system. This also means if your NAS needs to go down for whatever reason, none of the other services will be affected unless data is pulled from its storage pool. You can even create your own NAS deployment with an OS like Debian. Proxmox and other virtualizers are great for deploying services, but their throughput won't match dedicated NAS hardware.
4 reasons why Proxmox is great for hosting a NAS
There's a lot you can do with a Proxmox home lab, including building a robust NAS for all your storage, backup, and file-sharing needs
How to virtualize your NAS using Proxmox
You'll be up and running in no time
Setting up TrueNAS CORE on Proxmox is identical to any other virtual machine, including Windows and Linux. Simply fire up a new VM, load the ISO, and configure system resources.
- Download TrueNAS CORE.
- Transfer the downloaded image file to your Proxmox server.
- Click Create VM.
- Provide the VM with a name.
- Click Next.
- Under ISO image, select the transferred TrueNAS CORE image file.
- Click Next.
- Click Next.
- Select the storage and allocated space.
- Click Next.
- Select the number of CPU cores. (Two or more is recommended.)
- Click Next.
- Allocate RAM. (At least 8 GB is recommended.)
- Click Next.
- Configure your networking to match the Proxmox server.
- Click Next.
- Click Confirm.
- Click Finish.
Now TrueNAS CORE is ready for deployment. But don't get ahead of yourself! We need to add some drives to the VM for the NAS OS, similarly to how we'd enable PCI passthrough on Proxmox.
Passing through your Proxmox storage
Required for actually storing data on the NAS
Before we can use the NAS to store data on the drives managed by Proxmox, we need to pass the storage controller through to the virtual machine. Don't worry, things don't get too tricky, though we will need to run a few commands in SSH. First, you need to add the storage controller in the settings of the VM on Proxmox. We'll need to grab the names of the drives using SSH and run the command ls /dev/disk/by-id.This will display all the installed drives and their serial numbers. You can then add these drives to the VM using the serial numbers, which is handy should the drive names change.
Once this is accomplished, TrueNAS CORE can be installed using the same method you'd do on a dedicated system. Launch the VM through Proxmox and follow the installation wizard. And there you have it! You're now running TrueNAS CORE on your PRoxmox system as a virtualized network-attached storage device.
I tried gaming on a VM hosted on a Proxmox server – here’s how it went
Despite the ridiculous premise, the Proxmox-powered gaming machine worked extraordinarily well after some tweaks
