Virtual machines (VMs) offer a risk-free way to access new operating systems without actually installing them on your system. If you're using a PC, setting up VMs is quite straightforward: all you need to do is enable virtualization in the BIOS, install a hypervisor, and launch a virtual machine using the ISO file of an operating system.

But if you want to access your VMs from any device connected to your network, it's a good idea to launch them on a network-attached storage (NAS) device. Unfortunately, the procedure is vastly different from how you install VMs on a PC. Here’s a step-by-step guide to help you create, configure, and access virtual machines on a NAS.

Before you begin

Unlike the typical NAS workload of transferring and storing data files, you’ll need a lot more headroom to run VMs without experiencing slowdowns. Since the virtual machine will need to run on top of TrueNAS SCALE, your NAS specs should be better than the minimum requirements of the VM’s operating system. For this reason, I recommend using a NAS with at least an Intel Core/Xeon or an AMD Ryzen processor that was released in the past five years, alongside a minimum of 8GBs of DDR4 memory.

How to create a virtual machine on TrueNAS SCALE

Assuming you’ve already installed TrueNAS SCALE and created a dataset, you can log in to the NAS on another system and initiate the setup procedure for your VMs.

  1. From the main Dashboard, head to the Virtualization tab and select Add Virtual Machines.
    A screenshot of TrueNAS SCALE showcasing the Virtualization tab
  2. Pick the Guest Operating System of your choice and give the virtual machine a name.
    A screenshot of TrueNAS SCALE with the OS settings highlighted
    If you want, you can also modify the Boot method, System clock, Display, and other settings. Be sure to tap Next afterwards.
  3. Allocate the number of CPU cores, threads, and memory to the VM before hitting Next.
    A screenshot of TrueNAS scale with the CPU and Memory options highlighted
  4. Pick the dataset of your choice as the Zvol location, enter the amount of storage you’re willing to allocate to the virtual machine under Size, and click Next.
    A screenshot of TrueNAS SCALE showcasing the Disk options
  5. Add the Adapter Type, MAC Address, and NIC on the Network Interface menu and click Next.
    A screenshot of TrueNAS SCALE with the Network Interface options highlighted
  6. Choose the operating system you want to use with the VM, and click Next.
    A screenshot of TrueNAS SCALE showcasing the Installation Media options
  7. TrueNAS prompts you to pick the graphics card for displaying the output. If you don’t have extra GPUs, don’t worry. Just enable the checkbox next to Enable Display Device, and click Next.
    A screenshot of TrueNAS SCALE showcasing the GPU settings for a virtual machine
  8. Finally, click Save.
    A screenshot of TrueNAS SCALE depicting the option to Save the virtual machine configuration

How to access the virtual machine on TrueNAS SCALE

Once you’ve created the virtual machine, it’s time to access it using Virtual Network Computing (VNC).

  1. Power up the virtual machine by clicking the toggle in the State column.
    A screenshot of TrueNAS SCALE depicting the option to boot a virtual machine
    You can also configure it to start automatically when you boot the NAS by selecting the checkbox under Autostart.
  2. Expand the options by clicking the Down arrow, and select Display.
    A screenshot of TrueNAS SCALE depicting the option to display the output of a virtual machine
  3. VNC displays the output of the virtual machine on a separate tab.

(Optional) How to add devices to virtual machines on TrueNAS SCALE

If you’re a power-user, you might want to enable certain functionalities like disks and PCIe passthrough. To do so:

  1. Choose the Devices option on the expanded menu.
    A screenshot of TrueNAS SCALE depicting the Devices option
  2. Click Add.
  3. Pick the type of device and configure its parameters before clicking Save.
    A screenshot of TrueNAS SCALE depicting the option to add a Device to a virtual machine

(Optional) How to reallocate resources to virtual machines on TrueNAS SCALE

If you encounter slowdowns, you might want to allocate more resources to the VM after its initial setup. To modify the CPU and memory parameters:

  1. Click the Edit option under the virtual machine.
    A screenshot of TrueNAS SCALE depicting the option to Edit the settings of a virtual machine
  2. Scroll down until the CPUs and Memory header becomes visible.
    A screenshot of TrueNAS SCALE depicting the procedure to reallocate resources
  3. After you modify the resources allocated to the VM, click Save.

Running virtual machines on a NAS

A screenshot of Lubuntu running on TrueNAS SCALE

That’s it! If you’ve followed the steps correctly, your VM will boot up, and you can use it pretty much the same way you would on a hypervisor. Unless you’re using a low-power device like the Raspberry Pi as a NAS, you shouldn’t encounter many performance hiccups when using the virtual machine.

But if your workload requires you to run multiple virtual machines in tandem, you might need to upgrade to a beefier NAS with better specs. Be sure to check out our list of the best NAS devices if you need help picking out the enclosure.