Closed xiehq closed 4 years ago
Add this at the end of your basic.sh file. It will run this code when QEMU is closed or your VM shuts down thus attaching your usb ports back to host.
#restore
echo 0000:xx:xx.x > /sys/bus/pci/drivers/vfio-pci/unbind
echo 0000:xx:xx.x > /sys/bus/pci/drivers/xhci_hcd/bind
Where xx:xx.x is your BDF ID.
All the USB ports are down after running rebind.sh, Please add a script to bring all the usb ports back when finishing the vmra1n. Thanks.