xcp-ng pass through
Bash
# List all the devices
lspci -D
# Hide Realtek NIC from DOM0
/opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(0000:2a:00.0)"
# Hide Avermedia from DOM0
/opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(0000:10:00.0)"
# Show all devices hidden from DOM0
/opt/xensource/libexec/xen-cmdline --get-dom0 xen-pciback.hide
# Hide from Avermedia & Realtek DOM0
/opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(0000:10:00.0)(0000:2a:00.0)"
# Clear all devices hidden from DOM0
/opt/xensource/libexec/xen-cmdline --delete-dom0 xen-pciback.hide
# Show assignable devices
xl pci-assignable-list
# Add Avermedia Device to VM
xe vm-param-set other-config:pci=0/0000:10:00.0 uuid=900973ef-4e6c-ec6c-ee2f-d3625a306840
# Add Avermedia & Realtek Device to VM
xe vm-param-set other-config:pci=0/0000:10:00.0,0/0000:2a:00.0 uuid=900973ef-4e6c-ec6c-ee2f-d3625a306840
# Show Devices Attached to VM
xe vm-param-get param-name=other-config uuid=900973ef-4e6c-ec6c-ee2f-d3625a306840
# Remove all devices attached to VM
xe vm-param-set other-config:pci uuid=900973ef-4e6c-ec6c-ee2f-d3625a306840