SATA disk passthrough to VM

jyavenard

Patron
Joined
Oct 16, 2013
Messages
361
I'm trying to merge multiple linux machines into one to save space. My thought was using VMs running on my TrueNAS box (which I'm upgrading to an AMD epyc 7302)

The easiest for me would be to simply take the SATA disk of each of those machine and pass it to their respective VM.

Looking at bhyve documentation, this is easily done by simply passing the disk block device to the VM.

But TrueNAS GUI only allows me to create a disk that is linked to a zvol from what I've managed to find.
Funnily enough, the zvol is passed to the VM via the block device too (eg `/dev/zvol/blah`) so passing the block device to the SATA disk shouldn't be a stretch (`/dev/adaX`).

Is there a way to do this from the GUI? like adding a custom device.
Or will I have to set it up using a plain command line and managing the VM all manually.

Yes, I understand that I could use PCI passthrough, but that's not really doable/practical. I don't have enough PCIe slot on this machine to add sufficient SATA controller, and that's an extra cost I want to avoid.
And I can't export the existing SATA controller as some ports are already in use within TrueNAS

Thanks
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Can you write the disk to a pool/zvol instead (using dd)?

I guess you're saying that's not "easy" enough, but it does result in a more flexible end result (that works with the appliance as designed).
 

jyavenard

Patron
Joined
Oct 16, 2013
Messages
361
I guess I could copy the entire SSD from the machines to a zvol. I did consider that.
But I'm rather concerned of the performance impact.
A bit a of waste too.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
A bit a of waste too.
Not if it gives you a backup option in the short-term and in the longer term, some spare disks to create another pool with...
 
Top