When you run TrueNAS or OpenMediaVault as a guest on a Proxmox host, the storage VM wants direct access to the physical disks, not a virtual disk file sitting on top of the hypervisor's filesystem. Passing a physical drive through to a VM in Proxmox hands the whole disk to the guest using its stable hardware identifier, so the VM reads and writes the drive as if it were plugged straight into it. The trick is referencing the disk by a path that never changes between reboots.

Quick Answer

Identify the drive by its /dev/disk/by-id path, then attach it with a single command: qm set VMID -scsi1 /dev/disk/by-id/DISK-ID. This gives the guest raw access to the whole disk without a virtual disk layer. Never use a /dev/sdX name, because those can shuffle on reboot and point your VM at the wrong drive.

Why by-id, not /dev/sdX

The most important rule comes first. Device names like /dev/sda and /dev/sdc are assigned in the order the kernel discovers disks at boot, and that order is not guaranteed. Add a drive, swap a cable, or simply reboot, and yesterday's /dev/sdc can become today's /dev/sdb. If your VM config points at the old name, it now passes through the wrong disk, which for a NAS storage pool is a genuine route to data loss.

The /dev/disk/by-id path solves this. It is tied to the drive's model and serial number, so it stays constant no matter how the kernel enumerates devices. Always use it for passthrough.

Step by step: identify and attach the disk

Work through these on the Proxmox host shell.

  1. Make sure the target drive is not mounted or in use by the host. The host should not have a filesystem on it mounted, otherwise the guest and host fight over the same disk.
  2. List the stable identifiers by running ls -l /dev/disk/by-id/. You will see entries that include the interface and the drive model and serial, for example ata-TOSHIBA_MG09ACA18TE_X220A0X0FJDH.
  3. Match the right disk by its serial number. Cross-check against the output of lsblk or the serial printed on the physical drive label so you are certain you have the correct one.
  4. Note your VM's ID, the number Proxmox assigned, for example 100.
  5. Attach the disk with qm set, incrementing the scsi index for each drive: qm set 100 -scsi1 /dev/disk/by-id/ata-TOSHIBA_MG09ACA18TE_X220A0X0FJDH. For a second drive use -scsi2, a third -scsi3, and so on.
  6. Confirm it landed by checking the VM's configuration, either in the Proxmox web interface under the VM's hardware tab or with qm config 100.

Adding a serial number, and why it helps

When you pass several identical drives to a TrueNAS VM, the guest can struggle to tell them apart. You can attach a unique serial to each passed-through disk in the VM config so TrueNAS sees a distinct identifier per drive, which makes diagnosing a failing disk far easier later. It is a small step that pays off the first time a drive in a pool needs replacing and you need to know exactly which physical bay to pull.

What passthrough does and does not give you

This whole-disk method gives the guest raw block access, which is what TrueNAS and OpenMediaVault want so they can manage their own filesystem and pool directly. It is the standard approach for those storage operating systems. It is worth knowing the limits, though: this is disk passthrough, not full HBA controller passthrough via VFIO. For most home and small-office NAS setups the qm set method is the practical, well-trodden route and works reliably. If you are building out a pool, the diskless NAS and storage range covers the enclosures, and you can match them with drives from the SSD best sellers for a fast all-flash setup or alongside spinning disks for bulk capacity. For a compact always-on host to run Proxmox, the mini PC range has low-power options well suited to a home NAS server, and best-selling PCs give a broader view of capable systems at various price points.

Frequently Asked Questions

Why should I avoid /dev/sda style names for passthrough?

Those names are assigned in boot-time discovery order and can change after a reboot or a hardware change. If your VM config points at a name that has shifted, it passes through the wrong disk. The /dev/disk/by-id path is tied to the drive's serial and stays stable.

Does this give TrueNAS direct access to the disk?

Yes. Whole-disk passthrough hands the guest raw block-level access without a virtual disk layer, so TrueNAS or OpenMediaVault manages the disk and its pool directly. That is exactly what those storage operating systems expect.

How do I pass multiple drives to one VM?

Run the qm set command once per disk, incrementing the scsi index each time, scsi1, scsi2, scsi3 and so on, each pointing at a different by-id path. Adding a unique serial to each helps the guest tell identical drives apart.

Is qm set passthrough the same as PCIe HBA passthrough?

No. The qm set method passes individual disks at the block level, while HBA passthrough hands the entire storage controller to the VM via VFIO. The qm set route is simpler and fine for most home and small-office NAS builds.

Can the Proxmox host still use a disk it passes through?

It should not. Make sure the disk is unmounted and not in use by the host before passing it through, otherwise the host and guest will conflict over the same drive and risk corruption.

Building a Proxmox-hosted NAS? Get the storage foundation right first. Browse the NAS and storage range at Evetech to pick the drives and enclosure for your pool before you flash the VM.