Pcie passthrough SATA controller and boot to disk

Blais

Well-Known Member
Mar 28, 2017
32
4
48
Hi,

I managed to make the GPU passthrough in a Windows 10 virtual machine.
For SATA passthrough and more precisely the SATA controller, I block.
Of course, the controller is connected in one of the slots of the motherboard in pcie x1.
Indeed, I want my virtual machine to see the drives as they are, in particular the SSD so that it can benefit from the function TRIM.
For now, W10 sees the discs as QEMU DISK.
I applied the ACS patch, otherwise no separate IOMMU groups.

Code:
root@pve:~# tree /sys/bus/pci |grep "21:00"
│   ├── 0000:21:00.0 -> ../../../devices/pci0000:00/0000:00:01.3/0000:03:00.2/0000:04:03.0/0000:21:00.0

root@pve:~#lspci -k |grep "04:03.0\|21:00" -A2
04:03.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43b4 (rev 02)
        Kernel modules: shpchp
--
21:00.0 SATA controller: Marvell Technology Group Ltd. Device 9215 (rev 11)
        Subsystem: Marvell Technology Group Ltd. Device 9215
        Kernel driver in use: vfio-pci


Here's what works :
Code:
bios: ovmf
boot: c
bootdisk: scsi0
cores: 4
cpu: host
efidisk0: local:170/vm-170-disk-2.qcow2,size=128K
machine: q35
memory: 4096
name: WINDOWS10
net0: virtio=16:5B:55:4C:50:A5,bridge=vmbr0
numa: 0
ostype: win10
scsi0: /dev/disk/by-id/ata-SSD
scsihw: virtio-scsi-pci
smbios1: uuid=137bb604-543c-41c7-909e-d62565c76f24
sockets: 1
vcpus: 4
hostpci1: 24:00,pcie=1,x-vga=on,romfile=960GTX.bin


Here's what I hope will work :
Code:
bios: ovmf
boot: c
cores: 4
cpu: host
efidisk0: local:170/vm-170-disk-2.qcow2,size=128K
machine: q35
memory: 4096
name: WINDOWS10
net0: virtio=16:5B:55:4C:50:A5,bridge=vmbr0
numa: 0
ostype: win10
smbios1: uuid=137bb604-543c-41c7-909e-d62565c76f24
sockets: 1
vcpus: 4
hostpci0: 21:00,pcie=1
hostpci1: 24:00,pcie=1,x-vga=on,romfile=960GTX.bin

Unfortunately, when starting the machine, you can read no mapping found in UEFI.

An idea? please
 
Last edited:
What do you hope to gain by passing the SATA controller instead of the raw disk? You can just pass the disk instead of an image.
 
I want to pass the SATA controler to the virtual machine so that Windows 10 handles the SSD correctly, and have the function TRIM. For now, Windows 10 sees the discs as QEMU DISK.

This works :
Code:
scsi0: /dev/disk/by-id/ata-SSD
scsihw: virtio-scsi-pci

Maybe you have another produre?
 

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!