foxlet / vmra1n

Guide on setting up checkra1n in QEMU.
63 stars 24 forks source link

Please add script to bring back usb ports #16

Closed xiehq closed 4 years ago

xiehq commented 4 years ago

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.

purpleshadows commented 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.