USB hotplug on pve 5.1

Arcanes06

New Member
Nov 6, 2017
5
0
1
33
Hi all,

I'm using PVE 5.1-36 and i get some issues with usb hotpluging.
Is there a way to hotplug an USB key to a VM without shutdown/reboot?

I know that i had to add some config files on the node to enable hotplug RAM and hotplug CPU.
Is this the same for usb hotplug?
I tried different ways to attach a key from host to VM but every time i'm forced to shutdown and start again to see USB key in VM (Windows server 2012 or 2016)

I tried by adding a usb line in VM config files, i tried via qm monitor, via GUI, etc..
And i tried with USB key 1.0 and 2.0
No successful.

Any takers?

Thanks a lot
 
Okay thakns.
So we can't hotplug USB keys at the moment.

Do you have any idea of when this will be patched?
 
Hi,
Since using a KVM PC as a real PC is complicated without hotplug USB, I made a small script to hotplug USB devices:

this script must be lunch an the proxmox host, in open source, and writen in nodejs.

Code:
npm install -g proxmox-hotplug

proxmox-hotplug --help

Usage: proxmox-hotplug [options] [command]
 
Hotplug any new Usb device to your proxmox
 
Options:
  -V, --version      output the version number
  --vmid <vmid>    vmid will receved USB Devices, by default the first runing VM having an hostpci0
  --user <user>      host to connect if not root@pam (default: "root@pam")
  --port <port>      port to connect if not 8006 (default: "8006")
  --host <host>      host to connect if not 127.0.0.1 (default: "127.0.0.1")
  -p, --pass [pass]  host password, prefed stdin, nodejs script can not hide password from command line
  -h, --help         display help for command
 
Commands:
  byVendor           connect USB by vendorId/productId faster, do not support multiple identical Device
  byBus              connect USB by position slower, support multiple identical Device
  help [command]     display help for command


## examples:

connect every new USB device to the vm having a passthrough to your GFX:
Code:
 proxmox-hotplug --vmid 2000 byBus

connect every new USB device to your VM 2000
Code:
 proxmox-hotplug --vmid 2000 byBus


for now the proxmox password has to be typed at run time, or written to the command prompt, that will evolve soon.
 
  • Like
Reactions: 0-m

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!