Script to attach (detach) usb devices to (from) virtual machines. Uses
qm monitor
as backend. Tested only in Proxmox environment.
Usage:
usbattach.sh [VM id]
Script does not perform any checks (eg. whether or not device already
attached), only runs qm monitor
commands.
It uses fzf
to show interface and expect
to interact with qm monitor
.
Being started without parameters it shows a list of running VMs.
Being started with VM id as first parameter, it shows a list of attached devices for this specific VM.