Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@host:~# cat /home/petya/vir_mng/vir_mng.sh
- #!/bin/bash
- while :
- do
- read -s -n 1 keypressed
- case "$keypressed" in
- 1) sudo /home/petya/vir_mng/HIDtoWin.sh;;
- 2) sudo /home/petya/vir_mng/HIDtoLin.sh;;
- *) ;;
- esac
- done
- root@host:~# cat /home/petya/vir_mng/HIDtoWin.sh
- #!/bin/bash
- virsh -c qemu:///system detach-device debian9-dt usb_mouse.xml --live > /dev/null 2>&1
- virsh -c qemu:///system detach-device debian9-dt usb_kb.xml --live > /dev/null 2>&1
- virsh -c qemu:///system attach-device win7_440 usb_mouse.xml --live > /dev/null 2>&1
- virsh -c qemu:///system attach-device win7_440 usb_kb.xml --live > /dev/null 2>&1
- root@host:~# cat /home/petya/vir_mng/usb_mouse.xml
- <hostdev mode='subsystem' type='usb' managed='yes'>
- <source>
- <vendor id='0x046d'/>
- <product id='0xc051'/>
- </source>
- </hostdev>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement