agent/exec with pvesh in PVE8

Nov 16, 2023
1
0
1
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 https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{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:

Code:
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?