Accessing SSD plugged into mobo SATAs from the VM

Startide

New Member
Sep 8, 2023
18
0
1
Hi gang,

So I got proxmox running on an NVME disk, I tried adding my ssds as a RAID1 ZFS, but it turns out that's just more storage for proxmox to use, and not an actual disk I can view and use in the VM (ubuntu). At least I couldn't make it work.

What's the proper way to go about this ?

I found this, but I am a bit confused with the instructions : https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)

Can someone help ? THX
 
qm set 592 -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC
"qm set" is the command.
"592" is the VMID you want to passthrough the disk into (but keep in mind that this is no physical passthrough, your VM is still working with a virtual disk that is mapped to the physical blockdevice)
"-scsi2" is the virtual port the VM should be using for this. So in this case "scsi2" (the third scsi slot) when virtio SCSI should be used. Make sure scsi2 is not aleady in use by the VM.
"/dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC" is the path to the block device you want to passthrough. Don't use /dev/sda and so on but the output based on ls -la /dev/disk/by-id.

Also have a look at the manual for the qm command to understand how that command works: https://pve.proxmox.com/pve-docs/qm.1.html
 
> your VM is still working with a virtual disk that is mapped to the physical blockdevice)

Is that a bad thing ? What would be the alternative, use one of those PCIE SATA hardware controllers ?
 
> your VM is still working with a virtual disk that is mapped to the physical blockdevice)

Is that a bad thing ? What would be the alternative, use one of those PCIE SATA hardware controllers ?
Depends...
Additional overhead (but isn't that bad in my opinion), VM can't manage the power of the disk (can't send it to sleep/spindown), VM can't monitor the disks health via SMART (but PVe host can), not the real physical block size is reported, VM won't start with a failed disk, ...

Only option for the VM to access the real physical disk would be PCI passthrough. But in case of SATA that would mean passing through the whole SATA controller with all disks attached to it and usually this isn't possible without buying a dedicated HBA card because the SATA controller is part of the chipset and therefore sharing a IOMMU group with all the other onboard devices (and you can only passthrough whole IOMMU groups with all devices in it).
 
I assume the NVME disk counts as sata, despite the physical connector being different ?

The card is decently cheap on amazon, I guess I could buy one.


EDIT : ha, they don't often support raid it seems (well at least the ones I find rn)
 
Last edited:
Bonus question : I am adding them with the qm command, I need one SCSI2 and one SCSI3 I assume ? Gotta bind them both ?
 

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!