WinVM qemu passthrough devices

This commit is contained in:
Lord Of Nougate 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

6
usb_ax200_bluetooth.xml Normal file
View File

@ -0,0 +1,6 @@
<hostdev mode="subsystem" type="usb" managed="yes">
<source>
<vendor id="0x8087"/>
<product id="0x0029"/>
</source>
</hostdev>

6
usb_lily58.xml Normal file
View File

@ -0,0 +1,6 @@
<hostdev mode="subsystem" type="usb" managed="yes">
<source>
<vendor id="0x04d8"/>
<product id="0xeb2d"/>
</source>
</hostdev>

6
usb_logitech_g502.xml Normal file
View File

@ -0,0 +1,6 @@
<hostdev mode="subsystem" type="usb" managed="yes">
<source>
<vendor id="0x046d"/>
<product id="0xc08b"/>
</source>
</hostdev>

6
usb_scarlett_solo.xml Normal file
View File

@ -0,0 +1,6 @@
<hostdev mode="subsystem" type="usb" managed="yes">
<source>
<vendor id="0x1235"/>
<product id="0x8211"/>
</source>
</hostdev>