Hello,
I'm trying to automate the VM management via scripts that will reconfigure sets of VMs. However I'm struggling with changing file content. Here's an example:
curl -sSk --header ${AUTH} -X POST --data-urlencode command="echo 1 > /path/to/file" https://IP:8006/api2/json/nodes/NODE/qemu/100/agent/exec
The agent exec works fine with everything else but when I try to echo something into file nothing happens.
I tried with all sorts of escapes I could think of but without any result.
I know I'm supposed to do this with file write instead of agent exec but further in the project I'll have to use sed substitution and I need a way to figure out the escapes.
Proxmox version is 6.2-4
Thanks. Any help will be greatly appreciated.
I'm trying to automate the VM management via scripts that will reconfigure sets of VMs. However I'm struggling with changing file content. Here's an example:
curl -sSk --header ${AUTH} -X POST --data-urlencode command="echo 1 > /path/to/file" https://IP:8006/api2/json/nodes/NODE/qemu/100/agent/exec
The agent exec works fine with everything else but when I try to echo something into file nothing happens.
I tried with all sorts of escapes I could think of but without any result.
I know I'm supposed to do this with file write instead of agent exec but further in the project I'll have to use sed substitution and I need a way to figure out the escapes.
Proxmox version is 6.2-4
Thanks. Any help will be greatly appreciated.