"sharing" a PCI controller between the host and a VM (passthrough)?

rcd

Active Member
Jul 12, 2019
245
23
38
62
If I have a 2 (or more) port PCI controller on the server, is it possible to pass it through to a VM so the VM can use one disk on the controller, while the host is using another disk on the controller?

I could of course just try it, but since the host disk is the boot disk it might cause the server to no longer boot and cause more pain that I'm prepared to handle ;)
 
Last edited:
No, the PCI(e) controller (and all other devices in the same IOMMU group) cannot be shared between VMs or between a VM and the host. This also includes anything connected to a passed through controller, like disks, USB peripherals or network connections etc.

You can pass a whole disk drive, which will show up as a QEMU HARDDISK and does not give you full access to the drive (like SMART and serial number) but it does give access to the whole disk space.
 
Thanks, yes that makes sense.

So passing through a disk drive this way, other than limiting access to things like SMART, is there a noticeable performance loss with this?

The plan is to pass through 5 drives for a zfs pool for a Truenas VM.
 
So passing through a disk drive this way, other than limiting access to things like SMART, is there a noticeable performance loss with this?
No, it is not noticeable.

The plan is to pass through 5 drives for a zfs pool for a Truenas VM.
What about just adding another controller as a test? Try different PCIe slots and use the one that has not the same iommu group as your other controller.
 

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!