WinVM qemu passthrough devices

This commit is contained in:
2023-06-28 22:46:08 +02:00
parent cdc4dfa13b
commit f3d27cc386
5 changed files with 48 additions and 0 deletions

24
WinVM_hotplug_usb.sh Executable file
View File

@ -0,0 +1,24 @@
usbdir='/home/belar/.scripts'
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit 1
fi
if [ $1 == 'attach' ]
then
virsh attach-device WinVM --file $usbdir/usb_lily58.xml --live
virsh attach-device WinVM --file $usbdir/usb_logitech_g502.xml --live
#virsh attach-device WinVM --file $usbdir/usb_scarlett_solo.xml --live
#virsh attach-device WinVM --file $usbdir/usb_ax200_bluetooth.xml --live
fi
if [ $1 == 'detach' ]
then
virsh detach-device WinVM --file $usbdir/usb_lily58.xml --live
virsh detach-device WinVM --file $usbdir/usb_logitech_g502.xml --live
#virsh detach-device WinVM --file $usbdir/usb_scarlett_solo.xml --live
#virsh detach-device WinVM --file $usbdir/usb_ax200_bluetooth.xml --live
fi