I am running a virtual machine that requires vfio access to a PCI card. Using this script I am able to successfully bind the PCI device and its iommu group to vfio-pci, which then lets me boot up the VM:
virsh start myvm
I want to do this automatically instead of having to manually bind to vfio-pci every time. Is there some sort of preflight/preboot script I can make virsh run before it attempts to boot a vm?