Passing an entire SATA HDD to TrueNAS Scale VM

alpha754293

Member
Jan 8, 2023
94
18
8
When I am trying to pass an entire SATA HDD to a TrueNAS Scale VM, which interface should I be using? SATA? SCSI? or Virtio Block?

My Gigabyte H110 D3A motherboard only has one SATA controller, and four SATA ports on board.

One of them is used for the Proxmox installation itself. As a result, I couldn't pass the entire SATA controller over to TrueNAS otherwise, if I could, I would.

(And the board only has a single M.2 2242 SATA SSD slot. BIOS says that it's NVMe, but the motherboard manual and after trying to plug a NVMe SSD in, and it not recognising it, means that it's only a M.2 2242 SATA SSD slot.)

I am testing snapshots with a Windows 11 VM and wanted to pass the iGPU through.

TrueNAS Scale, by itself, doesn't let me do that (it cannot run in headless state, so it needs at least one GPU for itself, which I think is silly given that it's managed primarily through its web UI anyways.)

So, now I am running TrueNAS Scale, as a VM, inside Proxmox, so that I can set up my Win11 VM, and pass the iGPU from my Intel Core i5 6500T (Intel HD 530 Graphics) through.

But what I am seeing is that with a 3x HGST 1 TB SATA 3 Gbps 7200 rpm HDD raidz array, it is quite slow, even with the data pass between the VMs via a virtual ethernet bridge (and both TrueNAS Scale and my Win11 is using the virtio NIC driver).

Any suggestions or advice is greatly appreciated.

Thank you.
 
The short answer to your question is I have used scsi and virtio and it didn't seem to make much difference either way. I too only have SATA ports ports on my motherboard, but it doesn't matter. You can use any of the three.

The longer answer for anyone searching this is that the way I do it is by executing ls -n /dev/disk/by-id/ You'll get something like this

1725209807635.png


Then pick the drives you want to pass through, and use the following command (edited to match your drive ID)

qm set 103 -scsi1 /dev/disk/by-id/ata-ST1000DM003-1CH162_S1DFPJXR,serial=myserial001

use the VM id that matched your VM (103 in my case), use just the drive ID, not the partition info. In this case I am passing though /SDB. I like to assign unique serial number to each disk, it makes things easier in TrueNAS. The next disk will be added with the following command. Note the scsi controller is incremented as well as the serial number

qm set 103 -scsi2 /dev/disk/by-id/ata-ST1000DM003-1CH162_S1DFPKZY,serial=myserial002

Right now I am running TrueNAS Scale beta (electric eel) using this approach with no problems.
 
The short answer to your question is I have used scsi and virtio and it didn't seem to make much difference either way. I too only have SATA ports ports on my motherboard, but it doesn't matter. You can use any of the three.

The longer answer for anyone searching this is that the way I do it is by executing ls -n /dev/disk/by-id/ You'll get something like this

View attachment 74019


Then pick the drives you want to pass through, and use the following command (edited to match your drive ID)

qm set 103 -scsi1 /dev/disk/by-id/ata-ST1000DM003-1CH162_S1DFPJXR,serial=myserial001

use the VM id that matched your VM (103 in my case), use just the drive ID, not the partition info. In this case I am passing though /SDB. I like to assign unique serial number to each disk, it makes things easier in TrueNAS. The next disk will be added with the following command. Note the scsi controller is incremented as well as the serial number

qm set 103 -scsi2 /dev/disk/by-id/ata-ST1000DM003-1CH162_S1DFPKZY,serial=myserial002

Right now I am running TrueNAS Scale beta (electric eel) using this approach with no problems.
Thank you.

Yeah, I've already passed the drives through, and I've noticed that it is VERY, VERY slow.

Just swapped over from 3x HGST 1 TB SATA 3 Gbps HDDs to using 3x Samsung 850 EVO SATA 6 Gbps SSDs, and according to `zpool iostat tank 1`, it is currently installing Windows 11 onto the ZFS raidz array at < 20 MB/s (where said raidz pool is being managed by the TrueNAS Scale 24.04 VM) which is SIGNIFICANTLY slower than what the SSDs are capable of.

So, I'm trying to figure out what's causing the slow down.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!