XCP-ng PCI & USB Pass Through Video Commands

These are all the commands used in the XCP-ng USB & PCIe Pass Through video:

# 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

Great video. Maybe I missed it but can XCP-ng allow multiple VMs running to tap into the pass through device at the same time?

I’m trying to decide if running TrueNAS Scale virtually is going to be a pain or if I should be running it bare metal.

I am able to pass through a BlackMagic Design Decklink card to a VM but if I re-assign it to a different VM it won’t work without a reboot. It does show up in the new VM but won’t actually output video. Is that expected?

That is correct. To pass through devices you have to do this while the VM is off or if it is on you have to reboot.

I get shutting off the VM but I have to shut off the HOST before the card will work after being re-assigned.