No description
Find a file
Mazo Vasiliy 0d9d38ae68 Changed port parsing regexp.
Now it correctly shows nested hubs ports.
2025-10-09 10:09:57 +03:00
README.md Update README.md 2022-05-14 19:36:25 +03:00
usbattach.sh Changed port parsing regexp. 2025-10-09 10:09:57 +03:00

Script to attach (detach) usb devices to (from) virtual machines. Uses qm monitor as backend. Tested only in Proxmox environment.

Requirements: fzf, expect.

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.

https://user-images.githubusercontent.com/20361405/168440463-6e85438f-6614-4593-aca9-5d8237e24a94.mp4