api

  1. Excecute commands on each node using pvesh

    I want to execute several commands to each one of my nodes, looking at Proxmox API is possible to send commands to a node using: pvesh create /nodes/{node}/execute --commands '["apt update", "apt upgrade pkg1, pkg2, pkg3"]' However I can't seem to find a proper way to create the JSON. Can...
  2. LXC Options via API

    Hi, Is there a way to change the "low-level" LXC options via API? https://pve.proxmox.com/wiki/Linux_Container#_file_format I could not find any suitable options under path "/nodes/{node}/lxc/{vmid}/config". Thanks, Andreas
  3. Creating snippets using PVE API

    Hello, Thank you for Proxmox! I'm running 5.4-3 in a test lab right now. I am trying to use the `customci` configuration parameter for VM's, so I can provide arbitrary `user-data` in the cloud-init configuration. For that, I see that the new snippet feature is the way to go if I understood...
  4. HAProxy for API calls ?

    We do have a lot of API calls from different external applications. Each currently pointing to a master host which we expect to have as stable as possible. Should we put a haproxy beforehand to have to the api calls distributed over the different hosts ? If the application would be able to get...
  5. Give user access to a specific vm using API

    I'm working on a project for a professor where I script the creation of a bunch of users an make 3VMS for each of them . The catch is each user should only be able to access their own VMs but i can only use API requests to make this happen. I want to add the following roles to each user on each...
  6. Bug with CLI pvesh

    Hello i have problems with the command "pvesh create /nodes/{node}/migrateall". When i try from pve01: "pvesh create /nodes/pve03/migrateall -target pve01 -maxworkers 1 -vms 501" I can see the task and the migration in the webgui but in the cli i get following error: From pve03 the command...
  7. API - Add user to VM as Administrator

    Hello. I am trying to integrate Proxmox API into a PHP based tool we have, and I have been able to create a virtual machine, start it up and create a user. I want to add the created user to the created VM as an administrator of that machine. $fields = array( 'user' =>...
  8. Why does maxdisk only account boot disk ?

    I'm querying PVE API to monitor resource usage with Zabbix. And I'm wondering, why does the maxdisk prop (in /cluster/resources or /pools/<pool name> for example) only accounts the size of the boot disk ? Wouldn't it make more sense to sum all the disks attached to the VM / attached to VM of the...
  9. container features deployment limited to root

    I have recently began deployment of nested containers following an orderly upgrade to 5.3, when I noticed that only a root user may actually flag the features. What is the rationale for this limitation? What are the implications of setting these flags I'm not considering?
  10. pvesh command list

    Hi, I tried to run a command via the new qemu command api endpoint via pvesh, but do not know how to format this correctly. I haven't found any hints or usage examples in the usual places. root@proxmox ~ > pvesh create /nodes/proxmox/qemu/109/agent/exec -command id ┌─────┬───────┐ │ key │...
  11. Proxmox API questions about user data

    Let's say my username is "pveuser@pve". If I query ACCESS/USERS, I get all the user data I'm allowed to see, among it my own, but ACCESS/USERS/PVEUSER@PVE gives a 403 Forbidden error. Problem is I can't GET (or POST) ACCESS/USERS/PVEUSER@PVE to read (or write) my own data, unless I have the...
  12. Was definiert den Fingerprint für Cluster

    Hallo zusammen, ich habe Testweise ein Cluster von mit 2 Systemen installiert. Ich hatte direkt nach der Installation beide Systeme zu einem Cluster verbunden. Lief scheinbar soweit ganz gut. Was mich etwas irritierte, die Logs, Tracking Center und Statistics zeigen immer nur Aktionen des...
  13. Get current status without table of VM/LXC

    Hello, Unable to retrieve data about the status of the machine, unfortunately no longer. The reason for this is that Proxmox version change. Before: root@prox:~# pvesh get /nodes/prox/lxc/101/status/current running root@prox:~# So I could get data with PHP but with the new version it has...
  14. elurex

    PVE 5.3.6 - pve-api feature request

    My PVE Version proxmox-ve: 5.3-1 (running kernel: 4.15.18-9-pve) pve-manager: 5.3-6 (running version: 5.3-6/37b3c8df) pve-kernel-4.15: 5.2-12 pve-kernel-4.15.18-9-pve: 4.15.18-30 pve-kernel-4.15.18-8-pve: 4.15.18-28 pve-kernel-4.15.18-7-pve: 4.15.18-27 ceph: 12.2.10-pve1 corosync: 2.4.4-pve1...
  15. Change api token life

    Hello, it's possible to change api token life ? Thank you.
  16. Help with API - disk creation and assignment

    Hello! I'm making a tool to migrate from vmware to proxmox. I've got everything done except for handling the disks. I can't quite get the syntax right for creating LVM disks. Ideally I want to create a bunch of 1gb LVMs when I import the configs, then resize them to the correct size later as...
  17. PVE API for cloud-init drive

    hey guys, I'm working on extending current salt cloud module to support cloud-init (for qemu new vm's/clones) from a first look, looks quite simple, just add ide[n] config with the following for example: "ide0" : "local:101/vm-101-cloudinit.qcow2,media=cdrom" (this varies based on the next...
  18. get nodes/$node/storage showing 0 byte for ceph pool

    I have this intermittent problem with storage returning 0 values for a specific rbd pool. Its only happening on one cluster, and there doesnt seem to be a corrolation to which node context is being called...
  19. [SOLVED] pvesh output changes

    Within the last month or so pvesh has changed from outputting json to "pretty" output by default. I'm trying to obtain json output again but cant figure out how; pvesh refers to format options: # pvesh USAGE: pvesh set <api_path> [OPTIONS] [FORMAT_OPTIONS] Call API PUT on <api_path>...
  20. View total number of running VM/LXC

    Hi, How can I view the total of machines running with API? I'm trying to reach the values here; I couldn't find it in the APIs document.

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!