Hot Plug any new USB device to a running proxmox KVM
npm install proxmox-usb-hotplug* 
This script monitor and plug any new USB device to running KVM hosted by a proxmox server.
``bash
Usage: proxmox-usb-hotplug [options]
Hotplug any new Usb device to your proxmox
Options:
-V, --version output the version number
--vmid
--user
--port
--host
-p, --pass [pass] host password, prefed stdin, nodejs script can not hide password from command line
-c, --config
-h, --help display help for command
`
`username used to connect to proxmox API
username = root@pampassword used to connect to proxmox API
password = prOxmOxp@sswOdhost used to connect to proxmox API should always be localhost
host = 127.0.0.1
sample
`bash
on the dom0
echo password = myPassword > conf.txt
echo flush = 1 >> conf.txt
proxmox-usb-hotplug -c conf.txt
`use as a service
/etc/usb-hotplug.conf
`
password = prOxmOxp@sswOd
deny-usb=001c:100d
deny-usb=1a40:0101
force-usb=258a:1006
force-usb=18f8:0f97
flush = 1
no-hub=1
`proxmox-usb-hotplug.config.js
`javascript
module.exports = {
apps: [{
name: "proxmoxUsbHotplug",
script: "proxmox-usb-hotplug",
args: ["--config", "/etc/hotplug-usb.conf"],
watch: [ "/etc/hotplug-usb.conf" ],
}]
}
``bash
chmod 600 /etc/usb-hotplug.conf
npm install -g proxmox-usb-hotplug
npm install -g pm2
pm2 install pm2-logrotate
pm2 startup
read the instruction
pm2 status proxmox-usb-hotplug.config.js
pm2 save
``- Deal with USB 3.x.
- auto detect current cluster name.