Is it possible to passthrough a partition of a drive to a VM? and not the entire disk?

titust11

Member
Nov 18, 2021
48
4
8
64
Hi, you might find my question weird, but I have a good reason for asking this.
I want to partition an nvme drive with 3 partitions, then I want to create a Truenas Scale VM in Proxmox, and to present each partition to the Truenas in a such a way that the VM sees a full block device drive not a partition.
I have to do this because Truenas cannot be installed on a partition, but only on a dedicated drive. A Truenas pool log v-dev also cannot be created on a partition but only on a full drive....
Obviously I can't afford to have so many physical drives.
This will be for home use only, not production purposes, don't worry.
Any idea is welcome

Thanks a lot
 
Last edited:
I think "qm set" disk passthrough should work with partitions too:
https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)

Then its just for example qm set 592 -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC-part3 instead of qm set 592 -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC

But keep in mind that using the same SSD for boot and SLOG isn't a great idea. SSDs are consumabes that die sooner or later. Using it as a sync write cache will extremely wear the disk and it might fail in just months depending on how much you sync write. It you got a whole disk for your SLOG and the then the disk dies (without an power outage), your pool will continue running fine as everything written to the SLOG is just a backup of whats written in RAM. But if you use the same SSD for the OS too, then the whole VM TrueNAS VM will crash. So by putting your SLOG on the OS disks you increase the chance, that your OS fails, by multiple magnitudes.
 
Last edited:
I think "qm set" disk passthrough should work with partitions too:
https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)

Then its just for example qm set 592 -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC-part3 instead of qm set 592 -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC

But keep in mind that using the same SSD for boot and SLOG isn't a great idea. SSDs are consumabes that die sooner or later. Using it as a sync write cache will extremely wear the disk and it might fail in just months depending on how much you sync write. It you got a whole disk for your SLOG and the then the disk dies (without an power outage), your pool will continue running fine as everything written to the SLOG is just a backup of whats written in RAM. But if you use the same SSD for the OS too, then the whole VM TrueNAS VM will crash. So by putting your SLOG on the OS disks you increase the chance, that your OS fails, by multiple magnitudes.
Yes I know it's not good to have both on the same SSD, but my utilization of the NAS is so minimal that I am not too worried, and not only SSDs die sooner or later, but all medium. Yes as long as the pool drives are OK and I have a config file, if I loose the OS, replacing the boot drive (in this case recreating the VM) is a peace of cake with Truenas, I did it a few times for testing it.
As I said, I'm doing this for fun not for production.
 
Last edited:

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!