diff --git a/WinVM_hotplug_usb.sh b/WinVM_hotplug_usb.sh new file mode 100755 index 0000000..bd18e43 --- /dev/null +++ b/WinVM_hotplug_usb.sh @@ -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 + diff --git a/usb_ax200_bluetooth.xml b/usb_ax200_bluetooth.xml new file mode 100644 index 0000000..504cf7d --- /dev/null +++ b/usb_ax200_bluetooth.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/usb_lily58.xml b/usb_lily58.xml new file mode 100644 index 0000000..7b6bfac --- /dev/null +++ b/usb_lily58.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/usb_logitech_g502.xml b/usb_logitech_g502.xml new file mode 100644 index 0000000..590c9d7 --- /dev/null +++ b/usb_logitech_g502.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/usb_scarlett_solo.xml b/usb_scarlett_solo.xml new file mode 100644 index 0000000..aaefb42 --- /dev/null +++ b/usb_scarlett_solo.xml @@ -0,0 +1,6 @@ + + + + + +