A new Proxmox Api client available. (JavaScript / Typescript)

uriel

Member
Apr 12, 2020
36
9
13
43
Hi,

I have just release my new client for proxmox Api, It's perfect for JavaScript / typescript developer.

proxmox-api

Fill free to send me feed back, and to open issues.

Uriel.
 
  • Like
Reactions: Stefan_R
I built this API, to simplify a lot of my proxmox daily usage.


I need to easily switch my USB devices beetween my VMs, this feature is related to the qEmu monitor entry point. This part of the API is only integrated as a function(string) => promise<string>, I have a lot of work to make it easy to use. So I'm going to implement some helper to hotplug USB devices.

if you know some existing GUI / client for qEmu Monitor, or any point of view about a common usage of qEmu Monitor, let me known.
 
How known how to liste USB connected on a qEmu ? By using info usb

I know how to list host USB devices, to connect them, disconnect them but not to list them.
all the information I found on this are here:
https://pve.proxmox.com/wiki/USB_Devices_in_Virtual_Machines#Assign_Devices_to_an_already_Running_VM

first working code sample to connect mouse and keyboard to VM 2000:
const qmMonitor = new QmMonitor(proxmox, node, vmid);
let mouses = await qmMonitor.infoUsbhost({name: /mouse/i});
if (mouses.length)
qmMonitor.deviceAdd('mouse', mouses[0]);

let keyboards = await qmMonitor.infoUsbhost({name: /KB/});
if (keyboards.length)
qmMonitor.deviceAdd('keyboard', keyboards[0]);
 
Last edited:

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!