XCP-NG PCI Passthought

Find the PCI device ID:
# lspci

Example of a PCI device ID, 01:00.0
Here’s the command to Passthrough the PCI devie:

# /opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(01:00.0)"

# reboot

List the PCI device Passthrough
# xl pci-assignable-list

Find the vm uuid and assign the PCI Passthought
# uuid=vm_uuid
# xe vm-param-set other-config:pci=0/0000:01:00.0 uuid=$uuid

To passthrough two PCI devices:

01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection
83:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981

# /opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(01:00.0)(83:00.0)"

Reboot the Server

# xe vm-param-set other-config:pci=0/0000:01:00.0,0/0000:83:00.0 uuid=$uuid

Command to delete the PCI Passthought:
# /opt/xensource/libexec/xen-cmdline –delete-dom0 “xen-pciback.hide=(01:00.0)”