automatically attach usb devices to selected virtual machine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radosław-RPS 6782af0655 removed unnecessary "#" characters from README 10 months ago
LICENSE Initial commit 10 months ago
README removed unnecessary "#" characters from README 10 months ago
usb-vm-attacher Initial commit 10 months ago

README


UsbVmAttacher - automatically attach usb devices to selected virtual machine.


This script automatically attaches usb devices to choosen virtual machines. It requires UsbGuard to work and it attachess only devices that have block policy in usbguard rules (this also includes newly connected devices, if default policy is block). To select virtual machine for target of attaching devices, either use --vm-name option, or set the $USB_ATTACH_VM_NAME variable to the name of virtual machine. You can also optionally set the virtual machine type with --vm-type option, or $USB_VM_ATTACH_VM_TYPE variable, Default is "libvirt-qemu".

---------------------------------------------------------------------

In order to use it you need ensure that you have required permissions to control usbguard. The minimal permissions currently are:

Devices=modify list listen
Policy=list

read usbguard-daemon.conf (5) and usbguard (1) manual pages to learn how to add those permissions.


---------------------------------------------------------------------

USAGE: usb-vm-attacher [options]

Options:

-h, --help This help
-n, --vm-name Virtual machine name to which usb devices should
be attached.
-t, --vm-type Virtual machine type. Default: libvirt-qemu



---------------------------------------------------------------------

Author: Radosław-RPS

This software is licensed under MIT (expat) License, see LICENSE file.