api exec

  1. C

    How to Execute shell command properly

    Hi Guys, I am new to proxmox. I am currently using the Corsinvest C# API to interface with proxmox. Execute API: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/execute I am trying to execute the cmd "ip link show vmbr1", but it says bad format. What changes should I do to the...
  2. K

    Proxmox VE API 596 Broken pipe

    Hey guys, I've had this problem back in 2022 but the fix that someone gave me doesn't work anymore. Also reastarting the Server doesn't change anything. Getting the 596 broken Pipe error always happens when using a API call involving the guest agent. For Example...
  3. P

    Proxmox 8 API exec not working

    Hello everyone, we use the API in Proxmox quite extensively, especially the agent -> exec function to execute commands in VMs. After upgrading from Proxmox 7 to Proxmox 8, this specific function no longer works properly, we get specifically: array(2) { ["data"]=> NULL ["errors"]=>...
  4. R

    Problem with Proxmox 8.0 API qemu exec

    Hi, I have install new Node with Proxmox 8.0.3. Before this node I used API for config IP, DNS, firewall, etc.. But this Node cannot use API I setting same as other node if it work It will return pid. I'm try with shell command: qm guest exec 101 kvm fwoff It actually work Turn off...
  5. BelCloud

    Proxmox 8 API agent/exec changes

    Hello I have noticed that in Proxmox 8, the <command> parameter for the API call POST /api2/json/nodes/{node}/qemu/{vmid}/agent/exec has been changed from <string> to <array> in the format: [string, ...] Does anyone have a working example with the new format? I have tried to send it as...
  6. B

    agent exec api windows command problem

    hello, you are having a problem with the api, you can help. I am trying to send a terminal command to windows on agent. https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/qemu/{vmid}/agent/exec data = [ 'command' = "cmd.exe dir" ] I don't know the parameters. I want to create a...
  7. K

    Proxmox VE API: 596 Broken Pipe

    Hello guys, first it might be good to know what I'm trying to archieve with my program: Currently I'm building a Backend for a Hosting Company, wich has to create and Manage multiple Proxmox KVM Servers. For changing hostname etc. etc. we're using the guest-agent wich is also documented in the...
  8. S

    [SOLVED] Execute command in node with API

    Hi, i'm trying to do this : $params = array("commands" => json_encode(array( "pct exec ". $lxcid." -- bash -c 'echo PermitRootLogin Yes >> /etc/ssh/sshd_config'" )))); if($pve->post("/nodes/proxmox/execute/", $params){ echo '{"result": "good", "desc": "cmd 1 ok"}'; }else{ echo...
  9. U

    Use PsExec to run commands on user session via qemu guest agent

    Hi, I'm trying to execute a script on a vm via the qemu guest agents api exec. However all the commands get executed without a connection the the current user session. so when I for example run powershell via the api it only shows up in task manger as a process but does not show the console on...


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!