agent/exec with pvesh in PVE8

Nov 16, 2023
I am running a script on a PVE cluster that executes commands in various VMs on different nodes. The script is making use the pvesh command and the API-Endpoint{node}/qemu/{vmid}/agent/exec.
Since the upgrade to PVE 8, pvesh fails to execute commands in VMs that are are running on nodes different from that node were pvesh is executed, as shown below:

root@node1:~# pvesh create /nodes/node1/qemu/1001/agent/exec --command 'whoami'
│ key │ value │
│ pid │ 6224  │
root@node1:~# pvesh create /nodes/node2/qemu/1000/agent/exec --command 'whoami'
proxy handler failed: Agent error: Guest agent command failed, error was 'Failed to execute child process (No such file or directory)'

I assume this occurs because of the change in this specific API endpoint with the upgrade to PVE 8. Am I using the command incorrectly or is this a bug in the pvesh utility?


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!